[thelist] How to pass variables between 2 SWF movies
Arief Zaki B Jumodi
arief at erp21.com.my
Wed Jan 7 21:07:12 CST 2004
Thank you very much Mr. Christopher & Mr. Guy Bowden
To Mr. Guy Bowden:
-I've tried '_global' naming on my variables.. but it seems not working
To Mr. Cristopher:
-I mean this one.. :D
> movie1.swf --> movie2.swf
Thanks for the help.. I think I have the solution for now(it seems working
for me). Instead of using _global prefix, i used something else.. as
follow:
I defined this var in movie1.swf
Object.prototype.myGlobalVar = "This is my global var";
then in movie1.swf .. I called loadmovienum(movie2.swf)..
and in movie2.swf.. I display those global var..
trace(Object.prototype.myGlobalVar);
and it works :)
i'm referring to this book.. ActionScript The Definitive Guide or
http://skaiste.elekta.lt/Books/O'Reilly/Bookshelfs/books/webdesign/action/ch02_05.htm
if anyone got any advanced technique.. i'm willing to learn ;)
Thanks again
AZJ
>
> Hi AZJ,
>
> Do you mean that under a parent movie a child swf ends and initiates
> another child level swf.
>
> e.g.
>
> Main.swf
> |
> movie1.swf --> movie2.swf
>
>
> Or do you mean that one move initiates another.
>
> movie1.swf --> movie2.swf
>
> It makes a difference since you can take advantage of the parent to hold
> child accessible variables
>
> Perhaps if you try to explain how you have it set up and what you are
> using to initiate the second movie it would give the list a better idea
> of what you trying to acheive?
>
> In the interim take a look at the use of levels in flash. OR global
> variables (in particular variable scope).
>
More information about the thelist
mailing list