Passing variables to flash, (jumping straight to a selected frame)

Hey all,

Im working on a project, on a basis of evey frame is a new movie clip.

Now i need to do the following!

From a link in html,
i need to send some sort of information (guessuing through javascript)
to my flash file, telling it to load the movie, and goto the frame which is syncronised by each link!

eg.

im on a retail page called “cigars r us”
I click the button called “map”

it then needs to open up my flash file, let it pre-load, then jump to scene 3 frame 33, because its the 33rd store for example!

i dont want it to show any other frame but this one!

is this possible?
how could i do it?
can some one help me write a script!

Thanks very much!

what do you mean by “to open up my flash file”, is that a new browser window, another frame, the same page…?

read/google “flashvars” and these:
http://www.macromedia.com/support/flash/ts/documents/java_script_comm.htm
http://www.macromedia.com/support/flash/ts/documents/flashvars.htm

sorry about the clarity!

i mean,

on clicking a link in a html page.
it would load the swf in a new window, or the same window,
it doesnt matter.

then pre-load the whole movie, then jump to that specified frame.

And i dont want it to be specifiying the frame in the pre-loader,
because i only want 1 single swf.

which mean, some how, i need to pass some information to flash saying the following…

open the swf (in new window or not)
onload (letting the preloader completly load)
goto and play frame 33 or someting similar.

and i need that all to happen from a link in a html page.

it cant be the actual swf doing that, it needs to be the link passing those variables into the flash doccument!

can anyone help?

am i on the right track?
i jsut cant get anything to happen.
in this attatched fla i didnt include this actionscript cause i cant get anyhting to work!
grrrrrrr

click link…
opens swf in the same page…
sending a variable like… ?movie=2 on the end of a link
or something similar!

then it needs to

pre-load the movie (in scene-1) on load checks the following variables
then… jump to specified frame…
something like…

if (movie==1 or movie=="") {
trace(“default”);
}
if (movie==2) {
gotoAndPlay(“Scene 3”, 33);
}
if (movie==3) {
gotoAndPlay(“Scene 3”, 34);
}

ill post the actual fla…
Ill be extremely greatfull, if some you can help me out, by inserting some actionscript to so that when this html link is clicked, it pre loads the flash and then recgonises the sent variables and jumps to the correct frame!

you can download it here…

http://www.dag-international.com/test/Map-4.zip

Thanks heaps everyone!

The preload is handled by the swf.
The variable you send (flashvars or added to the swf as in mysite.swf?frame=1) will be available right from the start.
Don’t use scenes/frame numbers, use labels for your goto’s!!