A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: How Do I get The Object Variable Name?

  1. #1
    Member
    Join Date
    Sep 2010
    Posts
    32

    How Do I get The Object Variable Name?

    Can something help me get this to work without using name properties?
    Can it even be done?

    PHP Code:
    var bottomRight:Sprite = new Sprite();
        
    bottomRight.graphics.beginFill(0x00FF000.2);
        
    bottomRight.graphics.drawRect(7756152525);
        
    bottomRight.graphics.endFill();
        
    this.addChild(bottomRight);
        



            
    this.addEventListener(MouseEvent.MOUSE_OVERtoolTip);        
    function 
    toolTip(event:MouseEvent):void{

             
    // I Want something like this to work : )

             
    if(event.target.varName == 'bottomRight'){
                       
    trace('WORKING');
             }
            

         

         
        
        


  2. #2
    Total Universe Mod jAQUAN's Avatar
    Join Date
    Jul 2000
    Location
    Honolulu
    Posts
    2,429
    would this be alright?
    Code:
    if(event.target == bottomRight){}

  3. #3
    Member
    Join Date
    Sep 2010
    Posts
    32
    Quote Originally Posted by jAQUAN View Post
    would this be alright?
    Code:
    if(event.target == bottomRight){}
    omfg, im such an idiot, thx bro, ive been using name properties
    rookie mistake, and thx for taking the time to answer my question

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