Short Tag – Web Development Blog

Entries Tagged ‘as coding’

[AS3] Create SimpleButton with Action Script 3

ShortTag shows you how you can create a Button with AS3:
var sb:SimpleButton = new SimpleButton();
//we create the SimpleButton object
//as you know a Button in Flash has 4 state: up, down, over and hit
//we create a MovieClip for the up, down and hit state and an other one
//for the over state
var mc:MovieClip = new MovieClip();
//we create [...]

As3 Create Movie Clip by Coding

You want to create a movieclip with Action Script 3?
ShortTag shows you how:
var mc:MovieClip = new MovieClip();
mc.x = 100;
mc.y = 100;
mc.width = 500;
mc.height = 600;
MovieClip mc = new MovieClip(); // we create a MovieClip object
mc.x = 100; mc.y = 100; // we set the x and y coordinates
mc.width = 500; mc.height = 600; // we [...]