View Full Version : level select when loading into an iframe

02 February 2003, 09:59 AM
hey everyone, sorry i post from time to time here about scripting but there doesnt seem to be anywhere but here on cgtalk for flash...

anyway, ...

is there a way to tell which level to load into, if i was to use getURL and load an swf into an iframe?



fraggle two
02 February 2003, 02:11 PM

what do u mean with "iframe"?
when u want to load an swf into an frame or into an other mc
u can use the action loadMovie and there u can point to the level where u want the movie to load.

is that what u mean?


02 February 2003, 02:47 PM

an iframe in a html page.

ive loaded two swfs in one html page and have the bottom one in an iframe. the top has a button in the swf at one point with a script as follows-

getURL("flash/whatever.swf", "flash-btm");

that loads whatever.swf onto the bottom swf in the iframe 'flash-btm'. BUT it takes over the bottom swf. i want to load it on top of the swf, so, onto another level.

tried this but the sytax is wrong-

on (release) {
set(flash/whatever.swf, "_level4");
loadVariables("flash/whatever.swf", "flash-btm");


any clues anyone?



02 February 2003, 03:55 PM
thats not as easy as you might think
if you have flash mx you can use localconnection ( to "tell" the bottom swf to load the swf on a new layer.

02 February 2003, 04:40 PM
ah, right.

:) ill have a look at that when i get a sec a little later, thanks a lot...


02 February 2003, 10:31 PM
you just have to match the name of the IFrame with the name you put in the "window" field in flash where _blank or _self normaly is. like this:

in the HTML

<IFRAME name=nameofwindow
src="home.htm" frameBorder=0 width=70%

in flash:

getURL("", "nameofwindow");

with or without the "" (i can't remember right now :p )

02 February 2003, 10:34 PM
i forgot to mention that you can't load a swf in a iframe. a easy way around this is to put that swf in a html without the top and left margins

be cool

02 February 2003, 10:13 AM
thanks fredd, but if you read my posts i already have the swf loading in the iframe.

i want the swf i load on top of the other swf in the iframe to be specific to a level.

gonna read through the white paper etc, later.


CGTalk Moderation
01 January 2006, 01:00 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.