Skip to main content
Participant
October 20, 2006
Question

Passing variables from one swf to another

  • October 20, 2006
  • 1 reply
  • 336 views
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.
    This topic has been closed for replies.

    1 reply

    October 20, 2006
    first of all:
    this is the Flash Media Server and your problem is not related to FMS....

    second thing related to the "somewhat urgent" :
    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.


    Possibles solutions:
    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(*)