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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

gotoAndStop(frame);? ... won't go to correct frame

Status
Not open for further replies.

DGTLguy

Technical User
Jul 23, 2003
125
US
i have a small flash website. each page is 10 frames apart on the timeline. the menu buttons(movieclips) are on a "global" layer spanning across the entire document. when i use the following code (placed on a global layer) for each instance of the movieclip it moves to the right frame but the movieclip animation does not play (basically the button does not spin):

ABOUT.onPress = function() {
gotoAndStop(10);

}

SERVICES.onPress = function() {
gotoAndStop(20);

}

NEWS.onPress = function() {
gotoAndStop(30);

}

CONTACT.onPress = function() {
gotoAndStop(40);

}

when i try to use (onMouseDown), the movieclip animation plays but it does not move to the correct frame... it moves to frame 10 no matter which movieclip you press and then its stuck there...

here's a snapshot of my flash gui to get a better idea of my project:
myflashproject.gif
 
i think u misread the code... ABOUT, SERVICES, etc. is the name of the movieclip instances (menu buttons) i am using to take me to those frames, but in the code i simply inserted 10, 20, 30, 40 for which frame i would like it to take me to...

i labeled the frames but i am not actually using it for anything but personal reference...
 
i have triple checked to make sure instance names are correct... unfortunately, thats not the case (though i wish it was)...

attaching "_root." did not do anything...

the ABOUT button seems to work properly, as far as when you click it, it goes to frame 10, but when i click SERVICES, CONTACT, it does not go to its prospective frame...

as a matter of fact, whichever button i press first takes me to frame 10
 
i'm sorry... let me clarify some things...

using onPress does work... i go to each frame as i should... what does not work is the movieclip animation (the button is suppose to 'spin')...

when i try to use other event handlers such as onMouseDown, the actual animation works but it does not navigate to the correct frame...

i tried applying the code directly to each instance and on the main timeline with no luck...

thank you 4 ur patience
 
hey i really appreciate u helping me... i got everything working properly...

if u happen to know how to open a 'popup' browser window w/ no scoll, address, status bar, etc. at 375 x 375 by clickin on different movieclips within the flash movie that would help a lot...

otherwise, i can probably figure it out...

(i would like to use this feature to display thumbnails which you can click on and view the larger image in a separate window)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top