So I have an animation triggered by a button...I want it to stop half way through it's timeline until another button is pressed: anyone have an idea of how would I code this???
having the first frame of the mc empty with a stop action keeping it invisible untill called...goto and play 2 starts the animation..have a stop action half way through your animation say frame 25..
on (press) {
with (mc1) {
gotoAndPlay (26);
}
}
with another button put these actions..making the animation play through the second half of the animation..
don't forget to label your mc in the instance panel..in this case i used "mc1"..
this is all assuming that you have the animation and the buttons on the same level..if not you would need to use _root to call the mc..
Ah-ha!! I just didn't quite know how to target the MC to the middle of it...good deal.
Now to take it a level deeper. Let's say I have three animated buttons, all in a line. When pressed, any given button will drop like a trap door and a whole other set of actions will ensue (yet to be programmed...another day, another fight).
When another of the buttons is pressed (while the first is still "open", any of the buttons that are "open" need to finish their timeline to be "closed" (back where they started) before the recently pressed button will "open". Question is, how do i code this (I imagine with an IF statement somehow?) so that buttons that aren't open to begin with don't play?
Maybe the first step would be to figure out how to get one button, when clicked, to set to different movie clips into action. It seems I can get one to animate, but not two...
will be back later on and see if we can come up with something..i know dav design or wangbar could come up with something alot faster then i could..but if there not around i will try when i get home later..be back around 8:00pm( i'm in florida if that helps)will give it ago..
thanks! I probably won't be here (it's an anniversary evening...will be out wining and dining), but I'll try to get back to it ASAP without shortchanging the little lady. Meanwhile, you can see the animation I've done and the .fla can be downlaoded at these two links:
I want the buttons to be active when "closed", and not active when "open".
When a button is "open" and another button is pressed, the first button should "close" and then the pressed button should "open"
It seems that the buttons, once pressed once, are no longer active whether returned to "closed" state or not.
you have buttons that are in mc's..half way through the mc have it tween to the down position..the other half have it tween back to the closed position..the you would use invisible buttons that have the mc's play accordingly..when you click on the button it activates the mc for that button putting it in the down position..then when you click on another button the actions would be something like
on release _root.gotoandplay("previousmc",25);...
25 being the second half of the mc going back to the closed position..it's called a reverse mc..
that would close the first..then you would need another action in the same button to play the mc for that button..
once again you might fair better asking dave or wangbar for the exacts on this..
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.