A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: [CS3] Evidently I need a lesson in buttons

  1. #1
    Junior Member
    Join Date
    Jul 2008
    Posts
    12

    [CS3] Evidently I need a lesson in buttons

    I have info coming in on the time line and I stop it with stop (); I want to give the people time to read the info, I also have a next button on the page called NextBtn. I want the user to be able to click the next button and have the animation continue. My problem is I can't get the next button to work. I tried just using Action 2.0 since I'm not good at action script and just saying play(); but it doesn't work. I'm sorry if this is so elementary but it is totally frustrating me. I could go into much more detail but I don't want to bore you. But I should note, if I don't activate the Next button my stop action works, as soon as I try to activate the Next button, stop doesn't even work.

  2. #2
    Flasher
    Join Date
    Jun 2005
    Posts
    1,365
    Put this on the same FRAME as the button is on:
    NextBtn.onRelease = Function () {
    play();
    };
    Make sure NextBtn is the instance name and not just the symbol name of the button .

    -Sportzguy933

  3. #3
    Junior Member
    Join Date
    Jul 2008
    Posts
    12

    Thanks

    Thank you, I'm giving it a go right now.

  4. #4
    Bald By Choice jasondefra's Avatar
    Join Date
    Mar 2008
    Location
    Wisconsin, USA
    Posts
    205
    Jan808, what sportzguy933 suggested will work if you're using AS2, for AS3 you'll have to modify it just a tad.

    PHP Code:
    //Actionscript 3 Button Script, make sure you put this in your Actions layer//
    NextBtn.addEventListener(MouseEvent.CLICKonNextBtnClickfalse0true);

    function 
    onNextBtnClick(evt:MouseEvent):void{
             
    play()


  5. #5
    Junior Member
    Join Date
    Jul 2008
    Posts
    12

    Wow

    Wow, thanks so much, you are both awesome. Interesting you should post, it originally still wasn't working though I chose AS 1&2, on my Actions page. After numerous sounds of my head hitting the keyboard, I grabbed a co-worker and he spotted that I had not chosen AS 2 in my Publish settings. We were discussing that it would work differently in AS 3, now I know how. Thanks again.

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