Embedding external SWF openlaszlo into laszlo

View: New views
2 Messages — Rating Filter:   Alert me  

Embedding external SWF openlaszlo into laszlo

by Omar BELKHODJA-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

I don't know if it is possible to display an externel SWF file into a
laszlo view. I need to make some interaction with this swf, that are
more complicated than play/stop. In fact, my suited use case is to
have an external graphing swf library, to which I send information to
make it draw a graph. Does anyone know if this is possible or not, and
how to achieve it ?

Re: Embedding external SWF openlaszlo into laszlo

by Henry Minsky-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

In SWF8 one way might be to get a hold of the sprite movieclip that
belongs to the view (you can ask for view.getMCRef(),  actually was just renamed  to getDisplayObject()). Then you could call loadMovie on it to load the swf file into that movieclip at runtime.


Compiling the swf into the app would be trickier, as the swf8 compiler does some parsing
and regenerating of the swf, and would probably break it.

In SWF10, I would also recommend using the flex as3 equivalent of loadMovie (the URLLoader API, you could look at how it is used in the kernel swf9/LzSprite.as file).
Note that if you're using  swf10 apps, the swf file you load must also be swf10 or you will
not have any runtime control over it).

On Fri, Oct 30, 2009 at 8:08 PM, Omar Belkhodja <omar.belkhodja@...> wrote:
Hello,

I don't know if it is possible to display an externel SWF file into a
laszlo view. I need to make some interaction with this swf, that are
more complicated than play/stop. In fact, my suited use case is to
have an external graphing swf library, to which I send information to
make it draw a graph. Does anyone know if this is possible or not, and
how to achieve it ?



--
Henry Minsky
Software Architect
hminsky@...