A Flash Developer Resource Site

Results 1 to 1 of 1

Thread: Button and actions

  1. #1
    up to my .as in code Chris_Seahorn's Avatar
    Join Date
    Dec 2004
    Posts
    4,389

    Button and actions

    I got a few questions about button actions and Koolmoves, like flash, has a bunch of ways to set actions to them.

    The main problem seems to be users see actionscript that uses something like:

    on(press){
    _root.txt1.text="something";
    }

    and place it in the Click Handler inside the Koolmoves GUI for the buttons. This will not work and would simply be:

    _root.txt1.text="something";



    To show 3 different ways to set actions I made a simple koolmoves file.

    It shows a:

    1. GUI button with actions (an actual button instance, actions in GUI)
    2. A button with scripted actions (an actual button instance, actions in script panel)
    3. A shape converted to a button (actions entered in GUI when highlighting the newly converted button and showing properties)

    The third way is how you would also script button actions to a movie clip.


    The rule of thumb is...if you need multiple actions for anything used as a button ( on press, on release, on rollover, on rollout, etc)....you should avoid the "On Click" in the GUI as it lets you define only one handler (press) .


    Hope this helps clear up some confusion.

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