Load it from a different domain. You will need to load your main app from
HTTP in order to get the SecurityDomain set up.
Thank you very much !
when I load the swf form a different domain I get this error:
SecurityError: Error #2070: Security sandbox violation: caller http://apps.cooliris.com/embed/cooliris.swf cannot access Stage owned by http://18.104.22.168/MusicShopWorkspace/CoolirisLoader/bin-debug/CoolirisLoader.swf.
at flash.display::Stage/set align()
What am I missing ?
Looks like cooliris.swf has a bug where it was not written to handle being
in a security sandbox. The code in the SWF will need to be adjusted.
Thank you for your reply,
I don't think that they will do anything :/
Ive put an example together :
I just unload the swf now to destroy the cooliris eventListeners and set the SWF loaders trustContent to "true"
Do you know how I can make the swf fit into the Navigator content?
When I set the SWFLoader width manually its even different in Firefox, Safari, Chrome and on OS X.
I tried setting the SWFLOader to the width of the Navigator Content but than its displayed much to wide.
If the SWF is not well-behaved as a sub-SWF it will be tricky or impossible
to control. You will have to understand its sizing logic and compensate.
By setting trustContent to true, it is no longer isolated.
Thank you very much for your time.
Looks like that I go the iFrame Path, seems to work good enough and its much easier to control.
But I keep trying just to learn and improve my knowledge.
Is there a way to find out which eventListeners and how they have been added ?
How to remove them ?
If you're listening for events from a child SWF, you don't have to remove
them. It won't cause a memory leak. Listeners create a reference from the
listened-to object to the object receiving the event.
Hello and thank you for your reply!
I am not trying to prevent memory leaks.
I am trying to embedd the cooliris gallery into a Flex Project.
When I load the Cooliris.swf it adds global key event listeners .
When I try to enter text into a text area, cooliris is getting the focus immediately so that you cannot enter any text.
I tried destroying the swfloader object after loading but the listenerds will still keep allive so that I get a null exception when hitting a key.
A way might be to catch this exception ?
Try stopImmediatePropagation on the events so their listeners don't see the
Thank you fort your answer,
how would I do that ?
It depends on where and how they add their listeners. If they are using
bubble phase from the stage, you can capture on the SystemManager and call
stopImmediatePropagation there. If they are using capture on the
SystemManager, you will have to use a higher priority capture phase