An easy way is to define the variable on the root:
_root.foo = this.mouseY; // or _root.mouseY (getting the mouse coordinates is different depending on what's calling it)
Then just call the variable from anywhere by calling it from the root.
Hello everyone -
I have an event listener (mouseDown) on a movieclip which captures the y co-ordinates of the mouse and passes to a variable.
I need to pass over the variable to the actionscript within the same movieclip for it to act on.
I have tried .this _root _parent etc - how do I do this?
Thanks for any suggestions!
salt mustard vinegar pepper
An easy way is to define the variable on the root:
_root.foo = this.mouseY; // or _root.mouseY (getting the mouse coordinates is different depending on what's calling it)
Then just call the variable from anywhere by calling it from the root.
Subtlety is my middle name... and first and last in case you didn't get the point.
http://www.eoingriffin.com
I see what you are saying - thanks for the pointer!
salt mustard vinegar pepper
Check the forum often for the latest design announcements. Everything from graphic design and web design, to films and music. Estetica is a great place for people to get together and help each other out.
Bookmarks