A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: [CS4] help with EventHandler, mouseover, etc

  1. #1
    Junior Member
    Join Date
    Jan 2009
    Posts
    5

    [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.

  2. #2
    Space Midget Wrangler
    Join Date
    Sep 2002
    Posts
    129
    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
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center