all groups > flash actionscript > january 2005 >
You're in the

flash actionscript

group:

Cannot pass variable between two .swf


Cannot pass variable between two .swf virtualeman
1/6/2005 10:22:48 PM
flash actionscript:
Situation : I have a main movie that call external SWF on event button.
Everything works fine, but I want to implement a 'toggle state' to detect some
user interactivity. So I create a global variable in my main movie, and affect
to it a Zero value, then my sub movie need to reaffect the variable to 1, and
so on.... Concept: Main Movie : anim.pic1.onRelease = function() {
_root.padzoom._visible = true; loadMovie (path+employee[content1]+'.swf',
_root.padzoom); _global.toggleUser= 1; }; ====== this script above works
fine =============== Sub Movie (external .swf) : panneau.onRelease =
function() { _root.padzoom._visible = false; _root._global.toggleUser =
0; trace ('content return'); trace (_global.toggleUser); }; ============
this script above don't change my global variable in the main movie. I also
tried some : _root._global.toggleUser = 0; _parent._global.toggleUser = 0;
_global.toggleUser = 0; toggleUser = 0; Nothing !!! Please can anyone help me
on this issue
Re: Cannot pass variable between two .swf juankpro
1/6/2005 10:27:43 PM
Re: Cannot pass variable between two .swf juankpro
1/6/2005 10:32:32 PM
Maybe what is happening is that you are not exporting the two flashes to the
same Flash Player version. This will cause the two different movies create two
diferrent _global object, making the original _global unaccesible
Re: Cannot pass variable between two .swf virtualeman
1/6/2005 10:44:37 PM
Wow !!! you're right!!! Thanks you so much, I can beleave that I spend a lot
of time on this issue. My Main movie was set to Flash 6, and my sub to flash
7. I also delete _root. and everything works fine now ! Thanks again Eman
AddThis Social Bookmark Button