tags:

views:

260

answers:

1

Hello everyone,

i'm trying to load a local SWF Application in my Air Application via the SWFLoader class. The SWFLoader class is displayed in a new Window. Therefore, i'm trying to resize the window automatically, when the Flash Application is resizing. But here's the problem. The SWFLoader does not get any events when the loader App has been resized.

The Problem seems to be the Sandbox Restrictions. I'm able to call methods in the childSandboxBridge and parentSandboxBridge Objects that i've set in the LoaderInfo of the SWFLoaders content (the loaded SWF Application). But i cannot listen to any ResizeEvents or something like that when i'm resizing the loaded App.

I'm aware of the workaround with the Loader Class and the codeExecution Property, but i don't want to bypass the Air Sandbox - if possible.

Can anyone help me with this?

Thanks in advance

+1  A: 

(Note: other security sandbox issues may be part of your problems. That said...) IF your sandboxBridge is set and you can call methods though it as you mentioned, then you can dispatch and listen for events that bubble up through the swfLoader (and they do bubble through).

As a test I would try dispatching a test flash.events.Event with bubbles=true when your loaded swf captures its internal resizeEvent. (ResizeEvents, by default, do not bubble and could be the source of your issue).

jeremy.mooer
"(ResizeEvents, by default, do not bubble and could be the source of your issue)." Ah ok, that may be indeed the problem.I've solved this with a workaround, where i'm listening to the ResizeEvent in the loaded App and call a function to resize in the parentSandboxBridge Object. But i will give your tip a try. Thanks!
t.stamm