I have a timline with acctions occuring at the frame 5, 10, 15, 20.
On each of these frame there are several buttons for a menu
I build "on release" action for each of them , so pressing the first button , it suppose to lead to an animation sitated on frame 5 - witch is correct...the only thing is , when you press again on the same button, it goes to the frame 10...pressing again it goes back to frame 5....the same for the rest of them...
Does soemone know what I mean?
cheers
andrei
Re: hi there by LeeBrimelow on Apr 27, 2005 at 5:54:25 pm
"I build "on release" action for each of them"
I'm assuming that you are placing actionscript directly on the buttons and not on the timeline? You should have a locked actions layer where all of your actionscript lives. Then for your button you would have on frame 1...
myButton.onRelease = function() {
_root.gotoAndPlay(whatever frame to go to);
}
The above code will make your movie play until it hits the stop action at frame 5. Then on frame 5 of the actions layer you would put...
myButton.onRelease = function() {
_root.gotoAndPlay(whatever frame to go to);
}
Re: hi there by andrei on Apr 27, 2005 at 6:23:47 pm
thanks a lot Lee,
I think I've send you the file by email...
yes, I've placed actionscript directly on the buttons....I will try this way,
Thanks a lot
andrei
Re: hi there by LeeBrimelow on Apr 27, 2005 at 6:25:46 pm
Yeah it will help you so much in the long run to make your movies this way. Sorry I couldn't look at your file more but work has been a little hectic this week.
Re: hi there by andrei on Apr 27, 2005 at 6:46:37 pm
great..it's working great - but you know I have 5 buttons , so once I replace myButton instance with another name, it's not working any more...
Right now I named the first instance myButton, so it's working...what should I do for the next one...
Thank you so much
andrei
Re: hi there by andrei on Apr 27, 2005 at 7:49:39 pm
Hi Lee,
I've fallowed your advise, and it's still for nothing....once I press a button is ok...if I press it second time - jumps to the next item...
strange....
Thanks anyway
andrei