Forum Topic: Urgent And Simple Action Script!

(172 views • 8 replies)

This topic is 1 page long.

<< < > >>
None

SpikeVallentine

Reply To Post Reply & Quote

Posted at: 1/1/09 06:06 AM

SpikeVallentine NEUTRAL LEVEL 05

Sign-Up: 03/30/07

Posts: 94

Please help me! THANK YOU!
LETS CUT TO THE CHASE!
Here's the sitaution, i got 10 scenes,
each scene has a 1-3 minute Movie Clip.
THe first scene has a movie clip....but when it's done...it doesn't go to Scene 2, it restarts from within it's own movie clip!
i want it to stop being self centered and let the next Scene and movie clip happen.

THANK YOU SO MUCH! Someone helped me before , i really apreciate this place
thank you so much!

it's for the winter contest too!


None

Kuoke

Reply To Post Reply & Quote

Posted at: 1/1/09 06:13 AM

Kuoke DARK LEVEL 23

Sign-Up: 05/25/06

Posts: 2,504

If it isn't already, make the scene's frame length the same as the animation inside the movieclip.

...OR

Put _root.stop(); on the first frame of the movieclip, and at the end put _root.gotoAndStop("Scene 2", 1);

If you choose the latter, the root.stop is optional in a theoretical sense.
BBS Signature

None

SpikeVallentine

Reply To Post Reply & Quote

Posted at: 1/1/09 06:17 AM

SpikeVallentine NEUTRAL LEVEL 05

Sign-Up: 03/30/07

Posts: 94

": If it isn't already, make the scene's frame length the same as the animation inside the movieclip."
Done that one already, and that's making it not work/have my problem.

and wow...number 2...wow, that looks beautiful...i am going to try that, thank you so much...wow.....

thanks mate!!!!!!!!!!!!!!

At 1/1/09 06:13 AM, Kuoke wrote: If it isn't already, make the scene's frame length the same as the animation inside the movieclip.
...OR
Put _root.stop(); on the first frame of the movieclip, and at the end put _root.gotoAndStop("Scene 2", 1);
If you choose the latter, the root.stop is optional in a theoretical sense.

None

SpikeVallentine

Reply To Post Reply & Quote

Posted at: 1/1/09 06:19 AM

SpikeVallentine NEUTRAL LEVEL 05

Sign-Up: 03/30/07

Posts: 94

by the way...why put "root stop" at the beigning? wouldn't that, make the movie clip not even start?
i have about 10 movie clips, if i put stop at the begining of each movie clip...woudln't the movie have small intersections of pauses?

BUT THANKS IM GONNA TRY!!!!!!!!!!!

At 1/1/09 06:13 AM, Kuoke wrote: If it isn't already, make the scene's frame length the same as the animation inside the movieclip.
...OR
Put _root.stop(); on the first frame of the movieclip, and at the end put _root.gotoAndStop("Scene 2", 1);
If you choose the latter, the root.stop is optional in a theoretical sense.

None

Kuoke

Reply To Post Reply & Quote

Posted at: 1/1/09 06:22 AM

Kuoke DARK LEVEL 23

Sign-Up: 05/25/06

Posts: 2,504

At 1/1/09 06:19 AM, SpikeVallentine wrote: by the way...why put "root stop" at the beigning? wouldn't that, make the movie clip not even start?
i have about 10 movie clips, if i put stop at the begining of each movie clip...woudln't the movie have small intersections of pauses?

BUT THANKS IM GONNA TRY!!!!!!!!!!!

"_root" anything refers to the main timeline. Meaning if your entire animation is in a movieclip, it's stay on frame one, but the movieclip will play as a movieclip would play on a single frame flash, per say.

BBS Signature

None

SpikeVallentine

Reply To Post Reply & Quote

Posted at: 1/1/09 06:43 AM

SpikeVallentine NEUTRAL LEVEL 05

Sign-Up: 03/30/07

Posts: 94

hey. thanks for your time and effort, i truly appreciate it. but man, i tried option two...and...it's doing literealy the opposite of what iw ant it to do. it's looping . here's the situation.
It's 18 minutes, so I have to break it up into 10 scenes, and 10 movie clips.
It starts with movie clip 1 inside of scene 1(that's the tricky part, after scene 1 is completely done, it loops the movie clip in it!) what it needs to do is go from Movie Clip 1, in Scene 1, to MovieClip 2, in Scene 2, and so on.

There's gotta be some code like, "after the movieclip is done, imediately, in a heart beat go to scene 2, and let movie clip 2 play" you know what i mean?

THANKY OU!!!!!!!!!

At 1/1/09 06:22 AM, Kuoke wrote:
At 1/1/09 06:19 AM, SpikeVallentine wrote: by the way...why put "root stop" at the beigning? wouldn't that, make the movie clip not even start?
i have about 10 movie clips, if i put stop at the begining of each movie clip...woudln't the movie have small intersections of pauses?

BUT THANKS IM GONNA TRY!!!!!!!!!!!
"_root" anything refers to the main timeline. Meaning if your entire animation is in a movieclip, it's stay on frame one, but the movieclip will play as a movieclip would play on a single frame flash, per say.

None

Kuoke

Reply To Post Reply & Quote

Posted at: 1/1/09 06:57 AM

Kuoke DARK LEVEL 23

Sign-Up: 05/25/06

Posts: 2,504

At 1/1/09 06:43 AM, SpikeVallentine wrote: There's gotta be some code like, "after the movieclip is done, imediately, in a heart beat go to scene 2, and let movie clip 2 play" you know what i mean?

Movieclips loops, that's what they're designed to do. Provided there's no other interfering script, the previous solution should work fine.
On the very last frame, if you put _root.gotoAndPlay("location of mc2");, mc2 should play if mc1 isn't there.

You could also try...

Just a personal opinion, but I'd probably try obliterating all scenes completely by having all the movieclips in order in one scene, then at the start of each movieclip, have _root.stop();, and at the end of each movieclip have _root.play();.
This way, you wouldn't have to bother with frames, and scenes.

(mc's play automatically, even when the main timeline is stopped)

The script means that after the preloader, the movie will automatically go to the frame mc1 is on, the code inside will tell it to stop the main timeline, while the mc1 plays. At the end of mc1, the _root.play will make it go to the next frame, and the process will repeat until the end.

Oh hey, you're that guy with all those awards and stuff.
BBS Signature

None

SpikeVallentine

Reply To Post Reply & Quote

Posted at: 1/1/09 07:56 AM

SpikeVallentine NEUTRAL LEVEL 05

Sign-Up: 03/30/07

Posts: 94

THAAAANNNNKKYUU!!!

"Just a personal opinion, but I'd probably try obliterating all scenes completely by having all the movieclips in order in one scene, then at the start of each movieclip, have _root.stop();, and at the end of each movieclip have _root.play();.
This way, you wouldn't have to bother with frames, and scenes."

That one, i'm doing it now, it rocks, SO FAR.....i'm celebrating over 2 scenes, it went from 1 movie clip, to the second, to the third.....I've only gotten as far as 5 or something, out of the 10.........

thank you! however, it's not 1,00000000000% accurate, when it goes to the next scene....it gets lots of glitches...BUT THE FUNCTION WORKS, but like...ther'es like 1 split second of random frames in it....
why.....................................
..... why does flash have to kill me?

At 1/1/09 06:57 AM, Kuoke wrote:
At 1/1/09 06:43 AM, SpikeVallentine wrote: There's gotta be some code like, "after the movieclip is done, imediately, in a heart beat go to scene 2, and let movie clip 2 play" you know what i mean?
Movieclips loops, that's what they're designed to do. Provided there's no other interfering script, the previous solution should work fine.
On the very last frame, if you put _root.gotoAndPlay("location of mc2");, mc2 should play if mc1 isn't there.
You could also try...
Just a personal opinion, but I'd probably try obliterating all scenes completely by having all the movieclips in order in one scene, then at the start of each movieclip, have _root.stop();, and at the end of each movieclip have _root.play();.
This way, you wouldn't have to bother with frames, and scenes.
(mc's play automatically, even when the main timeline is stopped)
The script means that after the preloader, the movie will automatically go to the frame mc1 is on, the code inside will tell it to stop the main timeline, while the mc1 plays. At the end of mc1, the _root.play will make it go to the next frame, and the process will repeat until the end.

Oh hey, you're that guy with all those awards and stuff.

None

GustTheASGuy

Reply To Post Reply & Quote

Posted at: 1/1/09 08:13 AM

GustTheASGuy LIGHT LEVEL 08

Sign-Up: 11/02/05

Posts: 11,330

I think it would be best to have the movieclips in one scene and stop timeline on each one because it seems you are encountering glitches with scenes. At the end of each movieclip have '_root.nextFrame ();' which will cause the movie to hop to the next movieclip.

#ngprogramming at irc.freenode.net
haXe | Keel imperative | Spyro! | Thru you


All times are Eastern Standard Time (GMT -5) | Current Time: 02:26 PM

<< Back

This topic is 1 page long.

<< < > >>
You need a Grounds Gold Account to post on the NG BBS! If you don't have one, click here to sign up now! It's fast, free, and easy — and opens up tons of great NG features!