-
[CS4] help with EventHandler, mouseover, etc
Hello,
Can someone please help me with this code, it is throwing an error?
aero = small MC located on stage (image of .aero logo)
textbox = dynamic textbox also located on stage, has no text at start
Code:
aero.addEventHandler ('mouseOver', callback_handler) = function() {
textbox.text = "This is the .aero extension";
}
aero.addEventHandler ('mouseOut', callback_handler) = function() {
textbox.text = " ";
}
The error I'm getting is saying Line 1:
1105: Target of assignment must be a reference value.
-
It looks like you're confusing as2 and as3 commands. Here is what it will look like using as3.
PHP Code:
aero.addEventListener ('mouseOver', over_handler); // aero.addEventListener ('mouseOut', out_handler) // function over_handler(e:MouseEvent):void{ trace("the outhandler has been accessed"); textbox.text = "this is the .aero extension"; }
function out_handler(e:MouseEvent):void{ trace("the over handler has been accessed"); textbox.text = ""; }
Regards,
Stuart
A little pain never hurt anyone
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|