# Flash to iFrame

**URL:** <https://forum.kirupa.com/t/flash-to-iframe/11879>\
**Category:** flash\
**Created:** [January 23, 2003, 4:27pm UTC](https://forum.kirupa.com/t/flash-to-iframe/11879 "2003-01-23T16:27:31Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![slim\_webjaz](https://avatars.discourse-cdn.com/v4/letter/s/4491bb/32.png) [@slim\_webjaz](https://forum.kirupa.com/u/slim_webjaz)\
**Post date:** [January 23, 2003, 4:27pm UTC](https://forum.kirupa.com/t/flash-to-iframe/11879/1 "2003-01-23T16:27:31Z")

</div>

I recently discovered a website that appearantly uses a way of linking from a Flash button to load content into an iFrame on that page. I quickly figured out how to do the iframe, but have quite gotten how to link from flash to load content into the iframe. I tried the obvious of linking a test page to the flash button and telling it to load to the “Name” of the iframe. This didn’t work, so I was hoping someone here would have some ideas.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [January 23, 2003, 4:43pm UTC](https://forum.kirupa.com/t/flash-to-iframe/11879/2 "2003-01-23T16:43:32Z")

</div>

```php

InstanceName.onRelease = function () {
     getURL("yourPage.html", "iFrameName")
}

```

don’t forget to replace _InstanceName_ with the actual name of your button … _yourPage.html_ with your document and _iFrameName_ with the iframe name

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [January 23, 2003, 4:49pm UTC](https://forum.kirupa.com/t/flash-to-iframe/11879/3 "2003-01-23T16:49:55Z")

</div>

yea, an iframe target is just like “\_blank” “\_parent” etc;

just instead of blank, parent you put your IFRAME name

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [January 23, 2003, 5:01pm UTC](https://forum.kirupa.com/t/flash-to-iframe/11879/4 "2003-01-23T17:01:49Z")

</div>

Wow! That was fast…ok but I have a question…do I put in the name of the button as I named in the library or do I provide it with a instances name. For example. The button is called “NKSL” I want to link to a page called “NKSL.HTM” and the IFrame name is “snkyContent” However, my button “NKSL” does not have an instance name so I gave it one and called it “nksl” So should the code look like this…

on (release) {  
nksl.onRelease = function() {  
getURL(“test.htm”, “snkyContent”);  
};  
}

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [January 23, 2003, 5:07pm UTC](https://forum.kirupa.com/t/flash-to-iframe/11879/5 "2003-01-23T17:07:33Z")

</div>

BTW…thanks for the help…but…I have an issue.

The code works, that you gave me except the page doesn’t load until the second press of the button…not the first. Any ideas. I find that really bizzare…hehe

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [January 23, 2003, 5:11pm UTC](https://forum.kirupa.com/t/flash-to-iframe/11879/6 "2003-01-23T17:11:27Z")

</div>

ok …

```php

instanceName.onRelease = function () {
     getURL ("myPage.html", "iFrame")
}

```

if you use that one … paste it on the main timeline  
replacing instanceName with the instance name of your button … not the name in the library

or you can use

```php

on (release) {
     getURL ("myPage.html", "iFrame")
}

```

in the button actions

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [January 23, 2003, 5:16pm UTC](https://forum.kirupa.com/t/flash-to-iframe/11879/7 "2003-01-23T17:16:38Z")

</div>

> \*Originally posted by slim@webjaz \*  
> The code works, that you gave me except the page doesn’t load until the second press of the button…not the first. Any ideas. I find that really bizzare…hehe

:cyclops: no idea

i’ve never had that problem … sorry

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [January 23, 2003, 5:21pm UTC](https://forum.kirupa.com/t/flash-to-iframe/11879/8 "2003-01-23T17:21:08Z")

</div>

Dude you awesome! hehe I was doing it wrong but finally figured out what you were saying to me. Thanks soo much for the help. If you want…check out the site I’m doing this for…it is [http://www.swimnky.com](http://www.swimnky.com) I’ll be putting your code into play. If you want credit I’ll give it or a link or something. Just let me know. Thanks again!!!

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [January 23, 2003, 5:29pm UTC](https://forum.kirupa.com/t/flash-to-iframe/11879/9 "2003-01-23T17:29:35Z")

</div>

anytime slim =)

by the way … i’m doing this because i want to … you don’t need to give any credit. thanx anyway 😉

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [January 23, 2003, 5:35pm UTC](https://forum.kirupa.com/t/flash-to-iframe/11879/10 "2003-01-23T17:35:16Z")

</div>

I certainly appreciate it! If you need anything let me know. BTW I have another question. This is a tough one and I’ve ask it on here before and really didn’t get any answers. I while ago I was thinking about building a Flash Trivia game. I was cruising through it until I got stuck on the how to keep the scoring. The main reason (I think) for the problem is I was building the game to load external flash files (which are the questions) into the main movie. However, I never could get the score to work because either I didn’t know where to put the “Score” clip or because of all the movies loading and unloading. I’ll send what I’ve done with the game to you if you want to look at it, but I haven’t worked on it for months, because I have been stuck…hehe. Any ideas would be appreciate, but you’ve done enough so if you don’t want to deal with it. Its no big deal. Thanks again!

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [January 23, 2003, 5:52pm UTC](https://forum.kirupa.com/t/flash-to-iframe/11879/11 "2003-01-23T17:52:03Z")

</div>

ok … if you don’t want to post your file in the forum  
send it to me and i’ll take a look at it

\*\*\*\*\*@msn.com
