将Adobe Encore生成的带有外部视频的.swf文件嵌入到带有Flash Pro的Adobe AIR应用程序中

将Adobe Encore生成的带有外部视频的.swf文件嵌入到带有Flash Pro的Adobe AIR应用程序中,air,flash,embed,loader,Air,Flash,Embed,Loader,各位。我希望有人能帮我。我正在做一个AIR应用程序项目,需要嵌入一个由Encore生成的swf文件,该文件反过来嵌入一个视频(F4V)文件。使用Loader对象加载时,我会出现以下错误: TypeError: Error #1009: Cannot access a property or method of a null object reference. at mx.managers::FocusManager/activate() at spark.components:

各位。我希望有人能帮我。我正在做一个AIR应用程序项目,需要嵌入一个由Encore生成的swf文件,该文件反过来嵌入一个视频(F4V)文件。使用Loader对象加载时,我会出现以下错误:

 TypeError: Error #1009: Cannot access a property or method of a null object reference.
    at mx.managers::FocusManager/activate()
    at spark.components::Application/initManagers()
    at spark.components::Application/initialize()
    at EncoreSWF/initialize()
    at mx.managers.systemClasses::ChildManager/childAdded()
    at mx.managers.systemClasses::ChildManager/initializeTopLevelWindow()
    at mx.managers::SystemManager/initializeTopLevelWindow()
    at mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::kickOff()
    at mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::preloader_completeHandler()
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at mx.preloaders::Preloader/timerHandler()
    at flash.utils::Timer/_timerDispatch()
    at flash.utils::Timer/tick()
我很了解Flash Professional,但Flash Builder一点也不了解。以下是我的代码:

    import flash.display.Loader;
import flash.net.URLRequest;
import flash.events.Event;

var showBusinessPlay:Loader = new Loader;
showBusinessPlay.x = 0;
showBusinessPlay.y = 0;
showBusinessPlay.width = 1024;
showBusinessPlay.height = 768;
showBusinessPlay.visible = true;
showBusinessPlay.load(new URLRequest("TestFlash/flashdvd.swf"));
showBusinessPlay.addEventListener(Event.COMPLETE,addToStage);
function addToStage(event:Event):void{
    stage.addChild(showBusinessPlay);
}
如果有任何方法可以做到这一点,我知道会有,请帮助我。如果需要使用Flash Builder和swc文件来完成,请告诉我必须遵循哪些步骤来完成


大流士

我认为这与主权财富基金无关。你能再给我们看一点代码吗

这一行是不正确的:

var showBusinessPlay:Loader = new Loader;
这是必须的

var showBusinessPlay:Loader = new Loader();

谢谢你的回答,佛陀。不幸的是,我删除了这些文件,并决定自己用老式的方式对所有视频控件进行编码,但我还是想用encore进行编码。没有太多的代码,但你能告诉我你认为可能是什么吗?