Manipulating movie clips

Can any one help?

I have 4 movie clips all on the one frame not visible until a button is clicked. simple enough

What i would like to do is script the buttons so that before a new clip opens up the clip which is visible goes to a frame to play out an animation where it fades out and shrinks. (one clips fades out and shrinks before the next one opens.)

Can anyone help. Please keep your answers simple as i am still only learning flash.

Thanking you
Minky

for an example go to http://www.triplandesign.com/#
what i want to do is not as elaborate but it gives an idea of finishing a clip off before another opens

Hi Minky,

You could try putting a stop action in each movie clip where you want the animation to stop before fading out, and generic code on the last frame of each movie clip that will make it invisible and start playing the chosen clip.

Then, when the visitor hits the button, you could then have a gotoAndPlay action that would finish off the movie clip. Also, set a variable to indicate which movie should begin playing once the fade out amimation is complete.

Example:

On main timeline you have:
movieClip1
movieClip2
movieClip3
button1
button2
button3

Main Timeline:
movieClipNum = 3; //you can change that number to however many movie clips you need. It’s also changeable that way for down the road…
playing = 0;

All movieClips, first frame:
_root.playing = x; //x is the number of the movie Clip, substitute the real number…

All movieClips, where ever you want the animation to stop before fade-out:
stop();

All movie Clips, frame after stop action: label the frame “fadeOut”

All movie clips, last frame:
_this._visible = false;
_root[“movieClip” + _root.NumToPlay]._visible = true;
_root[“movieClip” + _root.NumToPlay].gotoAndPlay(1);
stop();

All buttons:
on(release, releaseOutside) {
_root.NumToPlay = x //again, change that x to be the real number!
if(_root.playing == 0) {
_root[“movieClip” + _root.NumToPlay].gotoAndPlay(1);
}else{
for(i=1; i<=movieClipNum; i++) {
if(i == _root.playing) {
_root[“movieClip” + i].gotoAndPlay(“fadeOut”);
}
}

Like that. It’s <b>extremely</b> likely that code is way buggy. I just typed it fast so you would have a quick example of the logic. I don’t recommend a cut ‘n’ paste job with it, because you’ll probably get syntax errors like crazy. But I do hope it helps you.

Just one idea.

-Karen

thanks KarenInPA

I shall try this. Wish me luck ! :smiley: