[Laszlo-dev] dependence on ExternalInterface in swf9
Henry Minsky
hminsky at laszlosystems.com
Fri Aug 22 21:06:16 PDT 2008
I added a conditional on the "available" flag, which seems to work OK
if (this.isroot && DojoExternalInterface.available) {
// Expose your methods
DojoExternalInterface.addCallback("getCanvasAttribute",
lz.History, lz.History.getCanvasAttribute);
DojoExternalInterface.addCallback("setCanvasAttribute",
lz.History, lz.History.setCanvasAttribute);
DojoExternalInterface.addCallback("callMethod", lz.History,
lz.History.callMethod);
DojoExternalInterface.addCallback("receiveHistory", lz.History,
lz.History.receiveHistory);
// Tell JavaScript that you are ready to have method calls
DojoExternalInterface.loaded();
}
the layouts are working fine now, it must have been the error getting thrown
before that messed up
app initialization
On Fri, Aug 22, 2008 at 11:53 PM, Henry Minsky <hminsky at laszlosystems.com>wrote:
> When I try to debug a swf9 app from the fdb command line debugger, I get
> this error
>
>
> [Fault] exception, information=Error: Error #2067: The ExternalInterface is
> not available in this container. ExternalInterface requires Internet
> Explorer ActiveX, Firefox, Mozilla 1.7.5 and greater, or other browsers that
> support NPRuntime.
> Execution halted in 'gcursor.lzr=swf9.swf' at 0xffffffff (-1)
>
>
> Error: Error #2067: The ExternalInterface is not available in this
> container. ExternalInterface requires Internet Explorer ActiveX, Firefox,
> Mozilla 1.7.5 and greater, or other browsers that support NPRuntime.
>
> at Error$/throwError()
>
> at flash.external::ExternalInterface$/call()
>
> at
> DojoExternalInterfaceClass/addCallback()[/private/tmp/lzswf9/lzgen16038/DojoExternalInterfaceClass.as:33]
>
> at LzSprite/init()[/private/tmp/lzswf9/lzgen16038/LzSprite.as:99]
>
> at LzCanvas/__LZcallInit()[/private/tmp/lzswf9/lzgen16038/LzCanvas.as:418]
>
> at
> LzCanvas/__LZinstantiationDone()[/private/tmp/lzswf9/lzgen16038/LzCanvas.as:343]
>
> at
> LzInstantiatorService/makeSomeViews()[/private/tmp/lzswf9/lzgen16038/LzInstantiatorService.as:188]
>
> at
> LzInstantiatorService/checkQ()[/private/tmp/lzswf9/lzgen16038/LzInstantiatorService.as:132]
>
> at Function/http://adobe.com/AS3/2006/builtin::call()
>
> at LzEvent/sendEvent()[/private/tmp/lzswf9/lzgen16038/LzEvent.as:87]
>
> at
> LzIdleService/__idleupdate()[/private/tmp/lzswf9/lzgen16038/LzIdleService.as:51]
>
> at
> LzIdleKernel$/__update()[/private/tmp/lzswf9/lzgen16038/LzIdleKernel.as:27]
>
> at Function/http://adobe.com/AS3/2006/builtin::apply()
>
> at SetIntervalTimer/onTimer()
>
> at flash.utils::Timer/_timerDispatch()
>
> at flash.utils::Timer/tick()
>
>
>
> Is there a way we can make the calls to ExternalInterface optional, or wrap
> them in a try-catch, so that it is possible to debug
> without being in a browser? It looks like the canvas size or layout
> computations may depend on some callback, if I continue through that error,
> the canvas comes up with all the components on top of each other.
>
>
>
> --
> Henry Minsky
> Software Architect
> hminsky at laszlosystems.com
>
>
>
--
Henry Minsky
Software Architect
hminsky at laszlosystems.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.openlaszlo.org/pipermail/laszlo-dev/attachments/20080822/580c84e4/attachment.html
More information about the Laszlo-dev
mailing list