Apr
10
2008
Simple Mix picture animation PDF Print E-mail
This very useful tuts will show you how to create picture animation using the action script code and mouse moving. If you move your mouse right, the animation will go right, and when you move your mouse left, the animation will go left, like dj on pult.;) To make this tuts, you have to use instance name, convert some objects into a movie clip, apply on it action script code and much more. Just follow the following steps and everything will be clear.;)
hariesdesign.com 
Step 1

Open a new flash document. Press Ctrl+J key on the keyboard (Document Properties) and set the dimensions of your document as whatever you like. Select any color as background color.Set your Flash Movie frame rate to 33 and click ok.
 
hariesdesign.com
 
Step 2

Create or import any picture, object into a flash on which you want to apply this animation. For this example, I will use picture.
 
hariesdesign.com
 
 Step 3

After that, select the object or picture that you just drawn or imported and press F8 key (Convert to Symbol) to convert this picture or object into a Movie Clip Symbol.
 
hariesdesign.com
 
Step 4

While the new made Movie Clip is still selected, go to the Action Script Panel (F9) and enter this code inside the actions panel:

onClipEvent (load) { init = int(Math.random()*50)+75;
this._xscale = init;
this._yscale = init;
sc = 3;
}

onClipEvent (enterFrame) {


mod= this._xscale/100;


this._x+=(_root.distance/50)*mod;


if (this._x > 375) {
this._x = -75;
} else if (this._x <-75) {
this._x = 375;
}


if (Up == 1 && this._xscale<=scTar) {
this._xscale += sc;
this._yscale += sc;
} else if (Up == 0 && this._xscale>=scTar) {
this._xscale -= sc;
this._yscale -= sc;
}

}
 
Step 5

Duplicate (Ctrl+F key) Your movie clip as many time as you like.

Step 6

Create a new layer above the layer 1 and name it action.

Step 7

While you're still on layer action, take the Oval Tool (O) and draw a little rectangle beside the stage. See the picture below.
 
hariesdesign.com
 
Step 8

While the circle is still selected, press F8 key (Convert to Symbol) to convert this circle into a Movie Clip Symbol.
 
hariesdesign.com 
 
Step 9

While the new made Movie Clip is still selected, go again to the Action Script Panel (F9) and enter this code inside the actions panel:

onClipEvent (enterFrame) { _root.distance = 150-_root._xmouse;
}

Test your Movie Clip (Ctrl+Enter).
 

 
 
< Prev   Next >

Gallery Photography

Login

Sponsors


Get Chitika Premium