Posted: Tue Jan 07, 2014 7:20 pm
Post subject: load Flash SWF file generate through stand alone conversion
|
|
Hi, Gurus,
I have some technical issue. I can convert the slides nicely with ispringsdk.exe without issue. But when I try to load the files generated into my presentation controller I developed in AS3. I got error messages with the stand alone flash swf file generated with the "make-slides" option. But it works with the solid flash file converted with "make-solid-swf" option.
the conversion I used is as follows "ispringsdk.exe l my.ppt myfolder"
The codes I am using for loading the converted stand alone flash swf file is as follows.
var loaderContext:LoaderContext = new LoaderContext(); loaderContext.applicationDomain = ApplicationDomain.currentDomain; loaderContext.securityDomain = SecurityDomain.currentDomain;// Sets the security trace(loaderContext.applicationDomain + " || " + ApplicationDomain.currentDomain);
m_loader.load(new URLRequest(url), loaderContext);
The event processing function cannot get the IPresentationPlayerContainer. It is NULL. Does it mean stand alone SWF file has not IPresentationPlayerContainer?
function onMovieLoaded(e:Event):void { var contentInfo:LoaderInfo = LoaderInfo(e.target); m_playerView = contentInfo.content;
// Query IPresentationPlayerContainer interface of the loaded SWF file m_playerContainer = m_playerView as IPresentationPlayerContainer; if (m_playerContainer == null) { // The loaded file is not an iSpring presentation throw new Error("The loaded SWF file is not a presentation created with iSpring Pro"); }
// Wait for the player to initialize m_playerContainer.addEventListener(PlayerContainerEvent.PLAYER_IS_AVAILABLE, onPlayerAvailable);
// Add the presentation to stage; addChild(m_playerView); }
|