level select when loading into an iframe


#1

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?

thanks

cuse


#2

hi,

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?

m.b.:shrug:


#3

no.

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?

thanks

cuse


#4

thats not as easy as you might think
if you have flash mx you can use localconnection (http://www.actionscript.org/tutorials/intermediate/LocalConnections/index.shtml) to “tell” the bottom swf to load the swf on a new layer.


#5

ah, right.

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

cuse


#6

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%
height=70%></IFRAME>

in flash:

getURL(“www.homepage.com”, “nameofwindow”);

with or without the “” (i can’t remember right now :stuck_out_tongue: )


#7

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


#8

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.

cuse


#9

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.