ok… now lets say i have 5 buttons and if i click on one than it goes and play 355 how do i tell each button to goto another scene after its done playing the end of the frame 455
another way to do this is through the use of variables. in which you can have the animation of that closing movie in a movie clip on the last frame, and then have a variable determain which button has been clicked.
on the buttons you should tell flash to go to that frame where the movie is. your case frame 355, and also set the variable ‘content’ to a number
//for button 1 (put this on button 1)
on (press) {
_root.closingmovie.content = 1;
gotoAndPlay(355);
}
//for button 2 (put this on button 2)
on (press) {
_root.closingmovie.content = 2;
gotoAndPlay(355);
then in the mc in which the closing animation is in (in the above code i gave this mc the instance name “closingmovie” remember to give this movie that instance name.)
put this code in a frame after your animation
if (content == 1) {
gotoAndPlay("scene2");
if (content == 2) {
gotoAndPlay("scene3");
and so on
this is not tested, off the top of my head, so give it a go, iam going to check it out when i get home, hope it helps.
here is what i had and was trying to do, i think its something to do with the scene issue in mx, though i thought i fixed that problem. have a look anyway. ill keep at it.:crazy:
ok it is , but i think you guys mixed up … its not a movie really its just the main frame going from 355 - to 555 or something its not a movie clip! Its just animation of stuff de-loading on the main timeline so how then would i do it ?
ok here is the file using the code on the maintimeline ,
ok, now what i changed was the following::
got rid of the _root. tags on the if statments
changed the buttons to go to frame label on the main timeline
copy and pasted the animation of the rectangle on the main timeline. as well as the code (if statements)
::: added some buttons on scene 2-4 to get back to the main scene.
here is the file
Hope this can help you
:::::Can i just add and this is no means to tell you off.
i hope you understand whats happening in the fla , because this is for you to learn not just to get the flas and make a website. if you dont understand what i have done, please tell me , and i will explain it… i dont mind helping, i enjoy helping others. just hope your learning from all this.
Oh no way , you are actually helping me im learning little by little i always get confsued with using variables and stuff. But i try to do a lot of looking around on tutorials and how to do stuff… I actually look at your .fla you send and try to compare on what im trying to do , just the .root stuff gets way out of hand for me and i get lost.
the code go to frame 15 is so that the if statement can loop, so if the if statement in frame 14 is false it would just play, so i put that code in 15 so it can go back until the if statement is true.
if (content == 1) {
_root.gotoAndPlay(“section2”);
this is asking flash if the content = 1, i make the content = 1 in the button, but this is asking it. (if statment)
and the reason i used _root.gotoAndPla(“section2”) is that there is a bug in flash that dosent allow you to directly go to a scene so you have to use a framelabel in the next scene and point to that.
yes if you have section2 in your main timeline, it would go to that, but just name it something original like “startscene2” and it will be ok
This coding stuff is giving me a headache but i do get it , just writing it is the worse , whats a good place i can learnt eh variables and commands and stuff like that?
ok , im busting my brains out… ive already did the code for the deloading of the movie… now lets say
i have another button and if they click on that one it loads something else??? im going insane im using the format u gave me but where do i put the new label and the code?? im going insane$#@()$()#@#@ ahhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
::hangover: :hangover: :hangover: :hangover: :hangover: :hangover: :hangover:
If i have scene2 and with the same buttons do i put a new label called end2 and then do that??? or what im really confused
do i still use
if (content == 1) {
_root.gotoAndPlay("pressreviews");
}
if (content == 5) {
_root.gotoAndPlay("thirsty");
}
if (content == 2) {
_root.gotoAndPlay("events");
}
if (content == 3) {
_root.gotoAndPlay("smile");
}
if (content == 6) {
_root.gotoAndPlay("munchies");
}
if (content == 7) {
_root.gotoAndPlay("callus");
}
this is not in the main page this is from scene2(thirsty) so does th _root level still apply?
i think you are going the wrong way with this, if what your doing is making a website with scenes i would advice against it, simply use external movies, this way you could keep the menu of the main movie and just bring in section with a seperate external movie.