【发布时间】:2011-07-28 18:00:37
【问题描述】:
我使用 Flex 3.5(也尝试过 Flex 4.1)编译了一个简单的 AS3 项目,以创建一个小的 swf,它在屏幕上绘制一个简单的红色方块。没有什么太复杂需要特殊的 flashplayer 支持(见下面的代码)
package
{
import flash.display.Sprite;
/**
* @author John Lindquist
*/
[SWF(width="1024", height="768", frameRate="24")]
public class EasingATimeline extends Sprite
{
private var square:Sprite;
private static const STEP_DURATION:Number = 1;
public function EasingATimeline()
{
square = new Sprite();
square.graphics.beginFill(0xcc0000);
square.graphics.drawRect(0, 0, 50, 50);
square.graphics.endFill();
square.x = 100;
square.y = 50;
addChild(square);
}
}
}
并尝试将其加载到我使用 Flash CS4 编译的 AS2 swf 中。但这只是行不通。加载时我没有收到任何错误,AS2 swf 可以加载任何 swf,无论是在 AS2 中编译还是由 Flash 编译的 AS3。
有什么想法吗?
【问题讨论】:
标签: apache-flex actionscript flash-cs4 flash-builder