1

Good morning;

Do any 1 here know how to get the value stored in a global variable from other movie?
to use it in current movie?

Example:
in movie one.dir
there is a global called name
stored the name

in movie two,dir
i need to use that global name
to be in the code

how to do it???

Votes + Comments
Your question made me experiment with flash after long time.
2
Contributors
1
Reply
2
Views
9 Years
Discussion Span
Last Post by vishesh
0

Nice Question. Never thought of that. Anyway after doing a bit of experimenting, I come to this conclusion.

As soon as external movie is loaded, you could retrieve the data ( not necessarily global ) from that clip, using regular syntax for accessing variables.

Suppose you do this. It wont work.

_root.mo.loadMovie("test2.swf"); // mo is movieclip
trace(f);    // f is global var in test2.swf

I don't know but why the movieclip "mo" doesn't get loaded when trace(f) is reached.

Now, now add this somewhere _root.mo.loadMovie("test2.swf"); like _root.onLoad and in another move clip which will be used as button I add this

onClipEvent (mouseUp) {
	trace(f);
}

Then it would work.

In this case the external movie is loaded. So for now the second one is the solution available. If you want to update the data regularly, use EnterFrame clipEvent. If you get any other solution, post here.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.