A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: "deactivating" a button

  1. #1
    Senior Member
    Join Date
    Jun 2007
    Posts
    204

    "deactivating" a button

    I have 3 invisible buttons and I'd like to "deactivate" and "reactivate" them using script. When one button is clicked it will deactivate (not be interactive) and the other two are activated (interactive).

    Can this be done in AS 3.0?

  2. #2
    Senior Member jweeks123's Avatar
    Join Date
    Mar 2006
    Posts
    1,124
    btn_name.removeEventListener(event, function);

    or

    btn_name.enabled = false;

  3. #3
    trace("AKA: Biro Barna");
    Join Date
    Oct 2007
    Location
    RO.Timişoara
    Posts
    1,403
    It might be better to choose to remove the listener then disable the button, especially if the user won't be toggling. But if he'll be switching between buttons often using the second method would be better. Good luck.



    | 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