A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Referencing instanceName

  1. #1
    Senior Member
    Join Date
    Apr 2007
    Posts
    269

    Exclamation Referencing instanceName

    If I have a function that references a Button Component inside a predefined movieClip on stage and the trigger for the button is as follows:

    Actionscript Code:
    hud.*theName*.addEventListener(MouseEvent.CLICK, buttonClicked);
    function buttonClicked(e:MouseEvent):void {
        //How would I get the *theName* of the button in use?
    }

    Thanks in Advance.

  2. #2
    Senior Member
    Join Date
    Apr 2007
    Posts
    269
    Got it after about half hour of searching

    Actionscript Code:
    e.target.name

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