A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: button targeting seems so obvious, but not working

  1. #1
    Member Mofo SwirlyKing's Avatar
    Join Date
    Feb 2003
    Location
    Seattle, WA
    Posts
    476

    button targeting seems so obvious, but not working

    I'm thinking this should be so simple, but I can't get the scaleX to work.
    PHP Code:
    fishName.infoBtn.addEventListener(MouseEvent.CLICKfishClick);
    function 
    fishClick(e:MouseEvent):void{
        
    btnClick btnClickSound.play();
        
    fishName.infoBtn.scaleX .1;


  2. #2
    trace("AKA: Biro Barna");
    Join Date
    Oct 2007
    Location
    RO.Timişoara
    Posts
    1,403
    PHP Code:
    // disable the children of "infoBtn" so they won't react to the click event
    fishName.infoBtn.mouseChildren false;
    fishName.infoBtn.addEventListener(MouseEvent.CLICKfishClick);

    function 
    fishClick(e:MouseEvent):void
    {
        
    btnClick btnClickSound.play();
        
    e.target.scaleX .1;




    | Windows MSN: birobarna [at] hotmail [dot] com | Skype: barna.biro |
    WebLog: http://blog.wisebisoft.com/ |
    | Software Developer / Flash & Flex Developer | Student ( Computer Science ) | Interested in: Sharing Knowledge |
    |
    Romanian Adobe Flash, Flex, AIR Forum: http://www.flashforum.ro/
    | By perseverance the snail reached the ark. |


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