PDA

View Full Version : Goto frame from outside swf file



rowdy
May 15th, 2003, 09:34 AM
Is it possible to goto a frame in a swf file from a external html link?

I have set up a website with a flash navigation in a top frame (top.htm) and a html page in the lower main frame.

I hope its possible or i am stuffed!

Please help (code would be great!)

Actionscript MX

Stephen
May 16th, 2003, 07:09 AM
It is possible but gets a little complicated. You need to pass a parameter into the flash movie for the part you want to go to. This is done in the html page that calls the flash movie

PARAM NAME=movie VALUE="/home/myFlash.swf?loadpage=anyone"

loadpage is the name of the variable that you want to pass in and anyone is its value. You also need to include it in the embed tag eg

EMBED src="/home/myFlash.swf?loadpage=anyone" etc



Then in your flash movie on the first frame you can add


if (loadpage=="anyone"){
gotoAndplay("anyone")
}


To change what page you want to go to the call in to the swf needs to pass a different variable. Hopefully you can do this by changing the varibale dynamically in the html page as it is served. Otherwise youll need to call different html pages with different values ifor loadpage in.

jarenjel
August 22nd, 2005, 08:03 AM
I have the same problem, but I donīt understand when exactly should I put the variables.
Can someone give a little example for this, please? Sorry but I am a simple mortal that donīt use to much html. :puzzled:

I hope someone could help me.
Thanks