-
[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.
-
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
-
Thanks
Thank you, I'm giving it a go right now.
-
Bald By Choice
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.CLICK, onNextBtnClick, false, 0, true);
function onNextBtnClick(evt:MouseEvent):void{
play()
}
-
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|