all groups > flash actionscript > april 2004 >
You're in the

flash actionscript

group:

Detecting SetVariable


Detecting SetVariable EnigmaticPhoenix
4/3/2004 5:46:32 PM
flash actionscript:
How can I detect when JavaScript performs a SetVariable action in ActionScript?
I know how to set parameters when an swf is first loaded, but how can I detect
when the variables are dynamically changed with JavaScript?

- Enigmatic Phoenix
Re: Detecting SetVariable Jan-Paul K.
4/3/2004 6:39:37 PM
I had the same problem once, what I did was to first set the variable and then
call a certain frame within the movie to perfom all as needed to react to the
new variable value.

But maybe you can also set some event listener to this variable, but I don't
know if that is possible.

An easy way of simulating an event listener would be to place a mc in your
movie that loops all the time and checks in the first frame if the variable has
been changed, and perform some actions if this happened.

Regards,
Paul
Re: Detecting SetVariable EnigmaticPhoenix
4/3/2004 10:21:16 PM
Object.watch worked perfectly.

The best information that I found on it was at
[L=Sephiroth.it]http://www.sephiroth.it/function.reference.php?id=00000000000000
000555[/L], which explained it very well.

Thanks!

- EnigmaticPhoenix
Re: Detecting SetVariable Jensen
4/3/2004 10:34:33 PM

Check out object.watch in the help documents ... maybe that solves your
problem.

/Jensen/

AddThis Social Bookmark Button