Welcome Guest [Log In] [Register]
Welcome to Brackenwood. We hope you enjoy your visit.


You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
Help With Moving Between Frames; using a button held in a movie clip
Topic Started: Oct 16 2004, 01:31 AM (283 Views)
kotchin
Member Avatar
Brackenwood Lightweight
in the website i'm making ive got a drop-down menu made of a series of buttons held in a movie clip which appear when another button is pressed. that bit works fine. however i want the user to be able to click one of buttons that have just popped up and be moved to another frame in the main movie. i've used the code:

Code:
 
on (release) {
gotoAndPlay("home", 2);
}


so it should move to fram 2 in scene 'home', and it works fine when i test it in flash. when it is compiled into .swf format it doesn't tho...any help? if u don't understand what i mean jus ask n i'll try to explain better :)

oh yeh, to look at the site to get a better understanding of what i mean click the banner below

thanks
tom
Offline Profile Quote Post Goto Top
 
Ranoka
Member Avatar
Teacosy is watching you! ♂
I've used exacly the same script in one of my movies on a button, to change scene...

Only things I can think of is, check that the scene you named the right scene the right name, and put the right scene name on the right button. Make sure the code is on an instance of the symbol, and that it's either a button or a movieclip... and that the code isn't inside the symbol.

Another thing I thought of... is the button in a loop cycle, but only in part of the loop... when you're testing it in Flash it might be on the one part of the loop where the button has the code on it... if that makes sense.

Other then that, it should work when you compile it, not sure why it wouldn't
Offline Profile Quote Post Goto Top
 
Vector
Member Avatar
Resident Actionscript Guru ♂
Admin
kotchin
Oct 16 2004, 01:31 AM
in the website i'm making ive got a drop-down menu made of a series of buttons held in a movie clip which appear when another button is pressed. that bit works fine. however i want the user to be able to click one of buttons that have just popped up and be moved to another frame in the main movie. i've used the code:

Code:
 
on (release) {
gotoAndPlay("home", 2);
}


so it should move to fram 2 in scene 'home', and it works fine when i test it in flash. when it is compiled into .swf format it doesn't tho...any help? if u don't understand what i mean jus ask n i'll try to explain better :)

oh yeh, to look at the site to get a better understanding of what i mean click the banner below

thanks
tom

I know what you need to do..

The thing is, movie clips have their own timeline. So instead of saying

on(release) {
gotoAndPlay("home", 2);
}

You need to say

on(release) {
_root.gotoAndPlay("home", 2);
}

You see, _root refers to the main object of the entire movie, but if you just typed play Inside a movie clip it would think you were instructing the movie clip to play, not the main movie.

Hope that helps

Cheers
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Actionscript · Next Topic »
Add Reply