我对你的问题有点困惑,但它仍然是一个有趣的问题。
您是否有一些等距工作并想要渲染透视投影视图或其他方式?您有透视图并想要等轴测图?
在 Flash CS4 IDE 中,您可以使用“3D”几个参数进行游戏。我已经将一堆电影剪辑组装成一个立方体来说明这一点。
这是立方体,在 Y 轴上旋转 45 度,然后在 X 轴上旋转 45 度,如变换面板中所示:

这是同一个立方体,在右侧 Property Inspector 的 3D Position And View 组中更改了 Perspective Angle。

IDE中的属性可以通过actionscript来控制。每个 DisplayObject 都有一个 transform 属性,它包含控制 2D 和 3D 属性的对象的引用,例如:Matrix、Matrix3D、PerspectiveProjection等。
您可以通过 PerspectiveProjection 的fieldOfView属性控制透视变形。
假设盒子剪辑被命名为box,我可以将它的 fieldOfView 设置为非常小的值(因为您允许的值仅大于 0 且小于 180 ),就是这样。
例如
var isometric:PerspectiveProjection = new PerspectiveProjection();
isometric.fieldOfView = 0.00001;
box.transform.perspectiveProjection = isometric;
对于轨道,请查看devnet 上的这篇文章。它还解释了一种绕行的方法。根据您要达到的目标,它可能是Ralph Hauwert 的 Arcball 文章。
这里有一些 as3 等距库,例如FFilmation和as3isolib,但我不确定您到底需要什么。正如 antpaw 所说,如果你在做更大的事情,你可能会使用像Papervision或Away3D这样灵活的 3D API 。
在干扰时,我们制作了有趣的等距界面,用于可视化名为Twigital的推文。我们为此使用了papervision。
更新
看来您需要动态地围绕枢轴旋转。您可以使用变换矩阵来做到这一点。以下是您在 2D 中的操作方式:
/**
* Rotates a matrix about a point defined inside the matrix's transformation space.
* This can be used to rotate a movie clip around a transformation point inside itself.
*
* @param m A Matrix instance.
*
* @param x The x coordinate of the point.
*
* @param y The y coordinate of the point.
*
* @param angleDegrees The angle of rotation in degrees.
* @playerversion Flash 9.0.28.0
* @langversion 3.0
* @keyword Matrix, Copy Motion as ActionScript
* @see flash.geom.Matrix
*/
public static function rotateAroundInternalPoint(m:Matrix, x:Number, y:Number, angleDegrees:Number):void
{
var point:Point = new Point(x, y);
point = m.transformPoint(point);
m.tx -= point.x;
m.ty -= point.y;
m.rotate(angleDegrees*(Math.PI/180));
m.tx += point.x;
m.ty += point.y;
}
/**
* Rotates a matrix about a point defined outside the matrix's transformation space.
* This can be used to rotate a movie clip around a transformation point in its parent.
*
* @param m A Matrix instance.
*
* @param x The x coordinate of the point.
*
* @param y The y coordinate of the point.
*
* @param angleDegrees The angle of rotation in degrees.
* @playerversion Flash 9.0.28.0
* @langversion 3.0
* @keyword Matrix, Copy Motion as ActionScript
* @see flash.geom.Matrix
*/
public static function rotateAroundExternalPoint(m:Matrix, x:Number, y:Number, angleDegrees:Number):void
{
m.tx -= x;
m.ty -= y;
m.rotate(angleDegrees*(Math.PI/180));
m.tx += x;
m.ty += y;
}
虽然代码不是我的,但它是 Adobe 的(我猜是 Robert Penner 的),是MatrixTransformer类的一部分。
现在,对于 3D来说,它更容易了,因为 Matrix3D 类具有像prependRotation和appendRotation这样的旋转方法,它们接受 3 个参数:
- 度数:数字
- 轴:Vector3D
- 枢轴点:Vector3D
因此,您可以轻松地将一个框在 X 轴上旋转 30 度,大约 0,0,0,如下所示:
var m:Matrix3D = box.transform.matrix3D;
m.prependRotation(30,Vector3D.X_AXIS,new Vector3D(0,0,0));
再次查看 devnet 文章,Matrix3D 类和Vector3D类。
如果你想更深入地了解向量、矩阵和变换,可以查看3D Math Primer,整件事解释得很好,而且只是数学,所以你学到的东西在任何 3d 设置中都很方便(纯as3、away3d、papervision、openGL 等)。
HTH,乔治