Hi !
I’m trying to make a wall with some frames in it. I don’t want to use PV3D or any other because they are too heavy and slow, so I’m using Flash 10 to simulate the 3D perspective.
The problem is Flash 10 limits the size of my wall (because the limit in bitmapData). Therefore I’m creating the wall in this way:
The background is 2D (a gradient fill) and only the frames are 3D.
But I don’t know why this doesn’t work, this is what I’m doing:
//CREATE EACH FRAME ROTATE AND ASSIGN THE Z POSITION IN THE WALL
framesContainer = new Sprite();
addChild(framesContainer);
frames= new Vector.<Frame>(numFrames);
for(var i:int=0; i<numFrames; i++)
{
frames* = new Frame();
framesContainer .addChild(frames*);
var XFactor:Number = frames*.width/(frames*.width+1);
var YFactor:Number = frames*.height/(frames*.height+1);
frames*.scaleX = XFactor;
frames*.scaleY = YFactor;
frames*.x = (i-1)*separationFrames;
frames*.y = -frames*.height*0.5;
frames*.z = frames*.x*Math.sin(angle*Math.PI/180);
frames*.rotationY = -angle;
}
And that works fine, but not perfect, if we let Flash trasnform ALL the frames (not one by one like before):
framesContainer2 = new Sprite();
addChild(framesContainer2 );
frames2= new Vector.<Frame>(numFrames);
for(var j:int=0; j<numFrames; j++)
{
frames2[j] = new Frame();
framesContainer2.addChild(frames2[j]);
frames2[j].x = (j-1)*separationFrames;
frames2[j].y = -frames2[j].height*0.5;
}
framesContainer2.rotationY = -angle;
framesContainer2.alpha = 0.5;
You can see the result in the image.
I don’t know what I’m doing wrong, I hope you can help me.
Thanks !!!
Enrique
PS: sorry for my bad english