A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: need help with migration from AS2 to AS3

  1. #1
    Junior Member
    Join Date
    Feb 2008
    Posts
    7

    need help with migration from AS2 to AS3

    Hi there,

    I have some old AS2 code from another Flash developer...

    item2.onRollOut=item.onReleaseOutside = function() {
    this.mytext.textColor = 0x666666;
    };

    ...and I need to get it migrated to AS3.

    I'm slowly migrating the whole animation to AS3 code and this bit has me confused (now with the strict nature of AS3's event handling). So how can you do something like "item2.onRollOut=item.onReleaseOutside = function()" in AS3?

    Any help appreciated!

    Kind regards,
    M.

  2. #2
    Junior Member
    Join Date
    Feb 2008
    Posts
    7
    Actually this was simpler than I thought, just create two event handlers!! duh

    PHP Code:
    item2.addEventListener(MouseEvent.MOUSE_OVER, function(e){
                
    trace('this is a mouse over = ' e.target);
            })
            
            
    // Add mouse up event
            
    item2.addEventListener(MouseEvent.MOUSE_UP, function(e){
                
    trace('this is a mouse up = ' e.target);
            }) 

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