Flash to iFrame

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.


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

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

just instead of blank, parent you put your IFRAME name

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”);
};
}

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

ok …


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


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

in the button actions

*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

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 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!!!

anytime slim =)

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

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!

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