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

Load MovieClip from Library to Stage ActionScript 3 Tutorial

This flash ActionScript tutorial series show how to load MovieClips from the Library to the stage with ActionScript 3. We usually drag MovieClips from the Library to the stage in developing stage. However this is also easy to do it with Flash ActionScript 3.

Please update flash player to view this Flash ActionScript tutorial!

Flash Tutorial Content:

Sometimes we wish to add MovieClip to the Flash stage in the runtime. We already show how to load external swf and external image in other Flash ActionScript tutorials. In this tutorial, we shows how to load MovieClip from the library to the stage with Flash ActionScript.

Flash ActionScript Codes:

Preparation: Create Linkage for the MovieClip

STEP 1: Prepare MovieClip
You already prepared a MovieClip in the library
In this example, the name of the MovieClip is called "Tree"


STEP 2: Create Linkage
Select the "Tree" movieclip from the library window
Select "Linkage..." from the pop up window
The Linkage Properties window appear
Check the "Export for ActionScript"
Enter "Tree" in the Class field.


// Create a new MovieClip
var myMovieClip:MovieClip = new Tree();


// Add the new MovieClip to the MainTimeline
// so that we can see it.


// Set the location of the new MovieClip
myMovieClip.x = 150;
myMovieClip.y =210;

Download Flash Source File:

Flash Source File load-mc-1.fla


This Flash ActionScript tutorial shows how to load MovieClip from the library to the stage .In next Flash ActionScript tutorial, we will create an empty MovieClip on the stage of Flash. The MovieClip from the library is then added to the empty MovieClip.