On 2006-04-29, at 13:01 EDT, DL wrote:
> 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.
Correct. You need the longer path (to get to the Flash runtime).
>
> 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 suspect you might need to say _root.flash...
_______________________________________________
Laszlo-user mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-user