dcsimg
A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Negating later actionscript

  1. #1
    Member
    Join Date
    Aug 2006
    Posts
    64

    Negating later actionscript

    I am having a little stumper here I was hoping you all could help me out with on the below actionscript. The actionscript is for a button that I have created. When I rollover the button, it expands fluidly and makes a sound.
    When I rollout from the button, it contracts fluidly and makes a sound.

    The problem comes when I want to use onRelease. I want the button to make a sound and flash a color, but as soon as I release the mouse button, it looks at this as an onRollOver action and immediately goes to _over without even playing what was in _click and . Is there some way to put actionscript in here that will negate the onRollOver command once I execute the onRelease command? I would also like to lock out the onRelease function at this point so that when people are on the home page they don't have to reload if they keep pressing it. Thanks a lot! OH, BTW, this button is actually a mc setup to act like a button.

    home_btn.onRelease=function () {
    home_btn.gotoAndPlay("_click");
    }

    home_btn.onRollOver=function () {
    home_btn.gotoAndPlay("_over");
    }

    home_btn.onRollOut=function () {
    home_btn.gotoAndPlay("_away");
    }
    Last edited by GoodtimeJ; 10-19-2006 at 09:15 AM.

  2. #2
    Member
    Join Date
    Jan 2006
    Posts
    62
    No,
    If you want to click the button,you must move the mouse over it.So the onRollOver Event is active
    Come from PeKing of China

  3. #3
    Member
    Join Date
    Jan 2006
    Posts
    62
    but if you need that you want.
    I think this way is not bad.
    You can use timeline to realize it.
    Every frame put same button,but different codes in the button.
    Come from PeKing of China

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