var array:Array = [], result:Array = [];
while(array.length <= 42)
array.push(array.length);
while(result.length < 6)
result = result.concat(array.splice(int(Math.random()*array.length), 1));
trace(result);
like this?
fscommand("fullscreen", "true");
var BitmapDataClass:Class = Class(array[i]); var bitmapData:BitmapData = new BitmapDataClass(0,0); var bitmap:Bitmap = new Bitmap(bitmapData); addChild(bitmap);
The idea was make a fake shape which have same 2D geom information with your source bitmap (can use transform.pixelBounds get the bound), put it into same display list as your source, and apply source’s Matrix3D (in case it is dirty already) to the fake shape.
After this, you can apply 3D transform like rotationX on the fake shape and get its 2D information like height, before you apply the transform to your source.
notice when DisplayObject in different display list, if it’s Matrix3D is dirty already, you will get different height/width information because it will effect by ancestor.
This is stupid way, kinda waste CPU , and only work with rectangle shape DisplayObjects…... but if you really need get bound before apply 3D transform to your target DisplayObject…
var source:Bitmap;
// ... scripts for build source
var sourceBound:Rectangle = source.getBounds(source);
var shape:Shape = new Shape();
var g:Graphics = shape.graphics;
g.beginFill(0);
g.drawRect(sourceBound.x, sourceBound.y, sourceBound.width, sourceBound.height);
g.endFill();
shape.transform.matrix3D = source.transform.matrix3D.clone();
shape.rotationX = 30;
if (shape.height > someValue)
{
source.transform.matrix3D = shape.transform.matrix3D.clone();
}
it is better generate id on server side, in php, consider use uniqid(); 
(or you can generate id by time)
marpies said
savorks saidI see. I’ll redo it to my project. You were really helpful, thank you!
alphaLayer should contains graphics witch Alpha infomation.
It is my pleasure 
alphaLayer should contains graphics witch Alpha infomation.
here is a example
Example
Source
EDIT : you can apply filters to alphaLayer’s children (don’t apply to alphaLayer self)
Example with Filters
var container:Sprite = new Sprite(); var alphaLayer:Sprite = new Sprite(); var maskLayer:Sprite = new Sprite(); var content:Sprite = new Sprite(); container.addChild(content); container.addChild(maskLayer); container.addChild(alphaLayer); // add in last for make sure it above content content.mask = maskLayer; addChild(container); alphaLayer.blendMode = BlendMode.ALPHA// or BlendMode.ERASE (invert version); container.blendMode = BlendMode.LAYER;
You can do it in timeline, the display objects setup is same with this.
alphaLayer only render with DisplayObjects under it in same parent container, so remember put it above the contents you with to render with fade effect.
In BlendMode.ALPHA mode the alphaLayer’s AlphaChannel will override target contents AlphaChannel, and BlendMode.ERASE will do just the opposite:)
Glad you solved it now 
theflyingtinman said
I’m not sure what you mean by “state change”.
What I mean was something like this Example
Bottom clip contains Top clip and its text flash when MOUSE _OVER trigger on Bottom clip, and the Top clip have two different states (change by MOUSE _DOWN on Top clip), and you can see Bottom fire MOUSE _OVER event when MOUSE _DOWN on Top clip.
