Question

I have a Flash applet which I want to embed in a Flex file this loads a panorama file inside a SWF player (Immervision's PurePlayer)- I am using the following code:

<mx:SWFLoader id="mapLoader" 
    width="740" 
    height="588" 
    source="../bin-debug/PurePlayer.swf?flashvars='panorama=../bin-debug/untitled.ivp'" />

The applet loads fine but it is does not execute the file...

The PurePlayer documentation uses the following var: panorama=myPano.ivp"

If I load the same SWF via a browser window it works fine with the following URL: http://localhost/pureplayer/PurePlayer.swf?panorama=untitled.ivp

Was it helpful?

Solution

Have you tried playing the movie after in your complete handler

// Play it
Object(mapLoader.content).play();

You also might also consider listening for an event once your movie has completed playing or when based user interaction takes place in your Flash app by adding adding an event handler in your Flex application in the complete handler before you play it. You obviously will need to know the type of the event the Flash App is going to dispatch but if bot applications are yours that should be no problem.

mapLoader.content.addEventListener( "yourFlashEvent", handleYourFlashEvent )

OTHER TIPS

You can provide the panorama parameter in the URL to swf file, instead of as a flashvar, like this:

<mx:SWFLoader id="swfLoaderPure"
  width="100%" height="100%"
  source="../bin-debug/PurePlayer.swf?panorama=myPano.ivp" 
  complete="onLoadComplete(event)" 
  />
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top