On Sun, Dec 14, 2008 at 1:03 AM, hughesmatt78 <[email protected]> wrote:

> "A SWF file may also call Security.allowDomain() with the wildcard
> parameter "*" to allow any domain.
> This is necessary to allow a local-with-networking SWF file to
> cross-script a network SWF file."

[snip]

> SimpleModule.mxml (the module hosted at localhost)
> <?xml version="1.0" encoding="utf-8"?>
> <mx:Module xmlns:mx="http://www.adobe.com/2006/mxml";
> initialize="Security.allowDomain('*')" >
>    <mx:Text text="Hi there" />
> </mx:Module>

The problem here is that the initialize event is dispatched _much
later_ in the cycle, so your allowDomain call never actually happens
-- you get an error before that. If you can find a way to call
allowDomain inside your module before it is intialized, this can work.
I don't think there's a way though: normally you'd call allowDomain in
the module's constructor, but there's no constructor here.

Even if you succeeded in calling allowDomain with a "*", you would be
opening up a potential security hole in your app. So I would go with
Alex's suggestion and try loading off the same host.

-- 
http://manishjethani.com/

Reply via email to