PDA

View Full Version : Create 4 MC's which fades in/out and moves.



Wampiro-UHA
December 7th, 2008, 02:05 PM
I'm new to ActionScript 3 and would love to se a code-example for my problem.

I have a stage which is 100 % in height and width according to the browser.

In my library I have a MovieClip which has the identifier "Line".

I would like to create 4 MovieClips with "Line" with the height 100 %, fade them in and out slowly while moving them either to the left or to the right. And each MovieClip should be placed randomly on the stage. After each fade-out the MovieClip should fade-in again, but again on a randomly place at the stage.

Wampiro-UHA
December 7th, 2008, 02:21 PM
I've just noticed that I cannot use identifiers in ActionScript 3, so I don't know how to link to the library.

Pier25
December 8th, 2008, 09:01 AM
??? you can use identifiers in AS3

Left mouse button on the library item, then linkage, then class name.

To put it on stage:



var myclip:MovieClip = new myclass();
addChild(myclip);


Then to do the fades use a tween engine such as TweenLite

Easy or not? :)