[Laszlo-user] Flash 8 - ExternalInterface class

DL dl.lists at ntlworld.com
Sat Apr 29 13:01:40 EDT 2006


On 29 Apr 2006 at 11:47, P T Withington wrote:

> Even better.  Debugger transcript showing it working:
> 
> lzx> flash.external.ExternalInterface.addCallback("testing", null,  
> function () { Debug.write("Hello") })
> true
> lzx> LzBrowser.loadJS('document.getElementById("lzapp").testing()')
> Hello

Thanks for testing this ..

First problem ..

this line is required ..

var connection = flash.external.ExternalInterface.addCallback("myFunctionId", null, 
callMeFromJavascript);

not this shorter path .. as in the example given in the deconcept link .. 

var connection = ExternalInterface.addCallback("myFunctionId", null, 
callMeFromJavascript);

which spits out WARNING messages 

I noticed this by reading your inspect output.


Second problem ..

The lzx compiles without debugger errors in openlaszlo tomcat environment (clicking 
on swf8 compile in dev console)

but not so when I embed same movie in SWFObject (aka FlashObject) ..

WARNING: test.lzx:8: reference to undefined variable 'flash'
WARNING: test.lzx:8: undefined object does not have a property 'external'
WARNING: test.lzx:8: reference to undefined property 'external'
WARNING: test.lzx:8: undefined object does not have a property 'ExternalInterface'
WARNING: test.lzx:8: undefined object does not have a property 'addCallBack'


I'll investigate further.

I'm using just version "8" in the SWFObject embed code .. it might require a more 
accurate definition.

DL

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.openlaszlo.org/pipermail/laszlo-user/attachments/20060429/82bee557/attachment.html


More information about the Laszlo-user mailing list