Short Tag – Web Development Blog

Entries Tagged ‘as3’

As3 mouseChildren – mouse events and relation with MovieClip children

Let’s take the following example:
We have a toolbar (MovieClip) that contains other movieclips and buttons or other display objects. If I want to create an MOUSE_OVER, MOUSE_OUT event listener on the toolbar, every time you move your mouse over a children of the toolbar a MOUSE_OUT and a MOUSE_OVER event is triggered. This can cause [...]

Flash CS4 AS3 FLVPlayBack Component indicator not moving

Flash CS4 AS3 FLVPlayBack Component indicator not moving?
FlvPlayBack Component indicator is not moving if the isLive field is set to true, it just simply stand there and the movie is playing without problems.
So you just have to:
fpb.isLive = false;
If you need to use it with isLive I don’t know what to do, if you know [...]

FLASH CS4 AS3 TextField width not returned correctly?

FLASH CS4 AS3 TextField width not returned correctly?
You have to set the textfield’s multiline property to false else the field will be considered a multiline textfield and this will result in incorrect calculations.
Example:
textField.multiline = false;
I’ve seen this problem in Flash CS4 with AS3. It may be present in other versions too.
AS3 Freaks me out [...]

[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;
addChild(mc);
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 [...]