PDA

View Full Version : embedded swf resource talking to an external swf .. in same html wrapper page


d~l
11-03-2004, 01:08 PM
I have a Flash movie (swf) embedded within a Laszlo app ..

I am trying to send variables from this embedded Flash movie
to an external Flash movie embedded in the same HTML page containing the embedded Laszlo app

there is FSCommand javascript in the HTML wrapper page .. as required in this Tech Note

http://www.macromedia.com/support/flash/ts/documents/flash_to_flash_comm.htm

but I can't find a way of executing this simple action to transmit variable from internal (embedded) Flash movie to external Flash movie


on (release) {
fscommand ("send_to_flash", "displayVar");
}


where the external movie ID="send_to_flash", NAME="send_to_flash"

I have added ID and NAME to the object and embed code.

Should I be navigating the DOM?

window.document.lzapp ...

related questions

Q1. How to send internal variables in embedded Flash movie to be variables in Laszlo host app?

Q2. How to send variables from external Flash movie to internal Flash movie (in Laszlo app)

see the Macromedia Tech Note - which works fine outside the Laszlo app, but not if one of the movies is inside Laszlo canvas.


________________________________________________


postscript ..

I have just searched this forum and read this old thread ..

http://www.laszlosystems.com/developers/community/forums/showthread.php?s=&threadid=1084&highlight=swf


by Antun ..

" SWFs can be used as resources and as animations, but you can't have ActionScript inside of them.
There's a number of reasons for this, not the least of which are that it's virtually impossible to support,
and the next runtime that Laszlo supports might prohibit this."


This can't be true .. since I can run an actionscript from an embedded swf to launch a "hello world!" alert window

on (release) {
getURL ("javascript:alert('hello world!')");
}

boga
01-27-2005, 08:09 AM
I'm wondering if you found a way to transfer variables from an embedded Flash movie to the Laszlo host application!?
Thanks for a note!

d~l
01-27-2005, 11:09 AM
I tend to use PHP5 now as an intermediary script between lzx and external Flash ..

but giving some thought to this problem again .. it occurs to me (without yet trying the theory) that a SOAP interface might be setup to the external Flash

read one thread here to get the idea .. http://archive.devx.com/webdev/articles/ib100201/ib100201-1.asp

another ploy could be to use an external XML file for communication between swf (lzx) and swf (embedded).

Currently, my attention is on on targetting embedded svg objects and communicating back to lzx.

Direct swf(lzx) <-> swf(embedded) is still on the "things to do" list.

boga
02-14-2005, 11:31 AM
thanks a lot for your thoughts. couldn't get them earlier since there's a lot of other work to do for the moment.
soap could be a solution but i don't want two client-side layers communicate with each other using a webservice. i'll take a look at the laszlo sources as soon as i have some time left (but i'm afraid this could take some time)