Flash AS3 Tutorials Center | Interesting Flash Animation Tutorials | Valuing Flash Animation Tutorials | Flash ActionScript and Animation Home

AS3 Beginner Tutorials | AS3 Basic Lessons | AS3 Valuing Courses | AS3 Components Tutorials | AS3 and PHP Interaction Tutorials
AS3 Practical Tutorials | AS3 Animation Techniques | AS3 Transition Effects Tutorials | AS3 Download Upload Files | AS3 Particle Systems
Communication Between Flash Movies with AS3 | AS3 and JavaScript interaction | AS3 Matrix Transformation | AS3 Physics Simulation Tutorials

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.

Please update flash player to view this Flash ActionScript tutorial!

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.