Home | Contact Us | Store

Control MovieClip Inside Another MovieClip with Flash ActionScript 3

Sometimes, a Flash MovieClip will be contained inside another MovieClip. This Flash ActionScript tutorial shows how to control a MovieClip that residue inside another MovieClip.
Your flash player version is too old to see this video file!

Flash Tutorial Content:

Like Sprite, a Flash MovieClip is also a container. That is, a MovieClip can contain another MovieClips inside it. This Flash ActionScript tutorial shows how to control a MovieClip that residue inside another MovieClip. In our example shown above, the small circle is also a MovieClip. The small circle MovieClip has it's own timeline and animation.

The completed Flash Movie of this ActionScript tutorial is shown as above. Please play around to see how it works.

Flash ActionScript Codes:

// Play Circle MC Button
playCircle_btn.addEventListener(MouseEvent.CLICK, playCircle);

 

function playCircle(evt:Event) {

// square_mc serve as a container for circle_mc
// In other words circle_mc is inside square_mc
square_mc.circle_mc.play();

}

 

// Play Square MC Button
playSquare_btn.addEventListener(MouseEvent.CLICK, playSquare);

 

function playSquare(evt:Event) {

square_mc.play();

}

Download Flash Source File:

Flash Source File control-movie-clip-2.fla

Remarks:

This Flash ActionScript tutorial shows how to control Movieclip that contained in other Movieclip.

Control Movie Clip ActionScript Tutorial