Growing

Code Actionscript 2.0

Instance action

onClipEvent (load) {
this._width = 1;
this._height = 1;
}

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

Code Actionscript 3.0

addEventListener(Event.ENTER_FRAME, enterFrame); square.width = 1; square.height = 1; function enterFrame(event:Event){ square.width = square.width + 1; square.height = square.height + 1; }

Description

With this script, the width and height of the square are increased incrementally. This causes the square to grow continuously until filling the stage entirely.

Download

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


Share