Groups | Blog | Home
all groups > macromedia flash flashcom > october 2006 >

macromedia flash flashcom : Passing variables from one swf to another


chintuChamp
10/20/2006 12:00:00 AM
I am facing problem to pass variable from one swf to another. I am using
loadMovie to load another swf. how can I pass a variable value to another swf.
Can anyone help me plz? It is somewhat urgent.
thanx in advance.
anonymous thing
10/20/2006 2:48:40 PM
[i]first of all:[/i]
this is the Flash Media Server and your problem is not related to FMS....

[i]second thing related to the "somewhat urgent" :[/i]
we, users on this forum, are not there to do your job... so calm down
otherwise no people will answer your question. This forum is a free support
forum that community of Flash developer use to learn tricks and to solve
problems.


[b]Possibles solutions:[/b]
If the two swf are seperate you can use LocalConnection to establish a
connection between different swf.

If you load a second swf into the first one you can interact like a standard
movieClip(only if there from the same domain or if you a policy file on the
other server)

You can use SetVariable(via Javascript) to modify a root variable on the other
swf and check with an _root.onEnterFrame to see if the variable had changed in
the second swf.

* MovieClipLoader will do a better job, in your specify case, than the
loadMovie. Use the onLoadInit event to see when the swf is really totaly loaded
into the first one otherwise you will have timing issues.


My final answer(lol) is the solution 2 with the notice(*)
AddThis Social Bookmark Button