More information about the Underscore mailing list

[_] flash cross domain loading help please

s'unya sunya.dickman at gmail.com
Wed Sep 21 12:04:03 BST 2011

On 20 September 2011 19:40, Richard Davey <rdavey at gmail.com> wrote:

> Hi,
>
> If it's a crossdomain issue (and it almost certainly is) then it'll fire a
> SecurityError event.
>
> So capture it and read it, it'll tell you what's up :)
>
> (wow, my first _ post this year I think!)
>
> Cheers,
>
> Rich
>
>
> On 20 September 2011 17:19, s'unya <sunya.dickman at gmail.com> wrote:
>
> > Hi mighty [_],
> >
> > I'm having some strange inter-domain loading behaviour that I'm having
> > trouble understanding/ searching for answers on. Any help would be
> greatly
> > appreciated.
> >
> > The scenario:
> >
> > Application on domain A loads a skin from domain B (actually all part of
> a
> > massive domain structure (test.domain.co.uk, assets.domain.co.uk, etc),
> > but
> > for Flash's purposes they are different). Currently some of the files are
> > on
> > a testing environment and will move through several environments before
> it
> > goes live, so I'm keeping all security calls relatively loose.
> >
> > onSkinLoaded(e:Event):void{
> >     addChild(_skinLoader);
> >     _skin = e.currentTarget.content as ISkin;
> >
> >     trace("SHELL: Skin loaded:"+_skin); //======== traces out null when
> > online but traces out [object SkinObject] locally
> >    trace("SHELL: Skin target:"+e.currentTarget.content); //===== traces
> out
> > [object SkinObject] on both
> >   ...............
> >
> > }
> >
> > So it works when the skin is on the same domain as the shell application,
> > but not when they are separate. As you may tell from the code above the
> > skin
> > implements ISkin and extends and abstract class ASkin; to deal with
> > security
> > I have this as the constructor of the skin class (which is the base class
> > of
> > the fla).
> >
> > public function SkinObject(){
> >            Security.allowDomain(this.root.loaderInfo.loaderURL);// allow
> > calling swf to script  functions.
> >            super();
> > }
> >
>
Hi Richard,

Thanks for the suggestion, unfortunately I'm getting no security errors,
though I agree that it looks like it is one what with the same domain vs
cross domain behaviour. Any other ideas what may cause this type of issue?

-- 
                      o
            o                 o
                O   O   O
      o  o   O s´unya O   o  o