A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: What's your favourite way to code reusable buttons/menu items?

  1. #1
    Junior Member
    Join Date
    Jun 2009
    Location
    London
    Posts
    12

    What's your favourite way to code reusable buttons/menu items?

    A good button should have all the available out, over and down states, and often there are a bunch of nice to haves such as animation, disabled states, filters, you name it.

    I seem to change my mind in each project I do.

    • The last one, I reskinned and extended the Button Component.
    • The project before I extended SimpleButton
    • Before that I built my own custom class using a Sprite and TweenLite.


    Then of course you need to work out if you will use library items which is great for laying out on stage, or do everything from scratch using code, which is more powerful but crap for design.

    I haven't looked at the swc or component route myself.

    I'd be really interested to know how everyone else tackles this pivotal task in AS3 development.

    Cheers,
    Dave

  2. #2
    Ө_ө sleepy mod
    Join Date
    Mar 2003
    Location
    Oregon, USA
    Posts
    2,441
    I'm a big fan of using buttonMode on a MC and leveraging the _up, _over, _down states - takes all the trouble out of writing handlers and if you use a textfield that spans all the frames you can dynamically set the label for each button at runtime.

Tags for this Thread

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