Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Button Problems

Status
Not open for further replies.

MidnightRaven

Technical User
Mar 20, 2007
3
GB

I have two buttons which are within a movieclip.
I have given the buttons actionscript to tell them to play a movieclip on the main timeline.
For some reason the buttons are playing the keyframes rather than its specified frame. Each time you press the button it will play one keyframe, press it again it plays the next one and so on...

Here is the actionscript...

on (release) {
this._parent._parent.play(20);
//plays the frame on the main timeline
this._parent.play(17);
//plays a motion on the movieclip in which the button is placed in
gotoAndPlay(11);
//moves the button back to its previous position
}

Any help would be appreciated.

Many Thanks
 

it doesnt seem to fix it...and i am now getting this error:

**Error** Symbol=Navigation Boxes, layer=box 3 - about, frame=5:Line 1: Mouse events are permitted only for button instances
on (release) {

Total ActionScript Errors: 1 Reported Errors: 1

I am really struggling to solve this problem.
When you click the button the first time it goes to the right frame, click it again it takes you to the next keyrame!?
 

I have solved it.

It needs to be gotoAndStop.

Many Thanks for your help!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top