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并非如此。任何人都知道,我做错了什么???