Code your button to play(); If you don't know how to code a button yet, indicate which version of actionscript you are using and an example can be provided (or someone can take the time to explain all the possibilities)
I haven't learned to code buttons yet. I looked in the help menu for some codes, but I found it
confusing. If anyone could show me a good place to find tutorials on coding buttons, I would be
All's I need to know is what version of actionscript you plan to be using and I'll provide you a quick solution, possibly an explanation too. If you don't know what version of AS you're using, check the Flash section of your Publish Settings. If you don't know where your Publish Settings are, find them via the File option on the main toolbar.... and if it took telling you all that to get there... you oughta spend some time digging around the menu options of Flash and learn what's where and stuff. The Help documents can be really handy as well.
sorry. It's actionscript 3.0.
I've made an attempt. This is what I have:
home_btn.addEventListener (MouseEvent.CLICK, buttonClicked);
function buttonClicked (event: MouseEvent) : void
It goes to the frame I want, but it doesn't play the timeline. It just goes there automatically.
Instead of ...
Note: unpredictably, sometimes the timeline needs an extra push, so if that change does play out, put a play(); command in frame 2 for added incentive.
Thank you, Ned!
By the way... If I want the clicked button to fade away before the timeline rolls on to the next page, would it be best to
do this by writing a code which makes the button disappear and then the timeline plays, or just to do it all in the timeline?
i.e maybe have 50 frames where the button alpha goes from 100 - 0%, then on frame 50 make the background start rolling to the new page.
Or would it be better to write a code?
Thanks for your help
1 person found this helpful
You can do it either way, though if you're not familiar/comfortable with doing it in a coded manner, you may want to stick with the timeline approach.
There's a posting I just answered in the AS3 forum that gives an example of the coded approach, though it deals with the rotation property. You'd want to use the alpha property instead. Here's a link to that posting... you'd only need to deal with the last line in the moveIt function:
One thing you should do as well, assuming you don't want the user to use that button again once it starts moving down the timeline. In the button event handler you can add:
home_btn.removeEventListener (MouseEvent.CLICK, buttonClicked);