无法使Spark VideoDisplay在as3项目中运行

时间:2013-06-27 12:31:40

标签: actionscript-3 flex videodisplay

package
{
    import flash.display.Sprite;

    import spark.components.VideoDisplay;
    import spark.components.VideoPlayer;

    [SWF(width="850", height="630")]
    public class mainApp extends Sprite
    {
        public var com:VideoPlayer;

        public function mainApp()
        {
            var d:VideoDisplay = new VideoDisplay();
            addChild(d);

            d.addEventListener("creationComplete", function(event:*):void {
                d.videoObject.attachCamera(null);
            }
        }

    }
}

videoObject始终为null。如果它是flex项目,那就完美了。纯粹的as3并非如此。任何人都知道,我做错了什么???

0 个答案:

没有答案