Fade in

Code Actionscript 2.0

Instance action

onClipEvent (load) {
this._alpha = 0;
}

onClipEvent (enterFrame) {
this._alpha = this._alpha + 1;
}

Code Actionscript 3.0

addEventListener(Event.ENTER_FRAME, enterFrame); square.alpha = 0; function enterFrame(event:Event){ square.alpha = square.alpha+0.01 ; }

Description

With this script, the opacity alpha of the square is increased incrementally. This causes the square to continuously fade in, until it reaches full opacity.

Download

Right click: Flashfile AS 2.0 | Flashfile AS 3.0 | SWF-File


Share