Hi,

first of all you need to understand what the sandbox security is :)

when you load a swf from a server, it is placed in a remote sandbox, by
default this swf can access all the resources from the same server from
where it got downloaded, in order to give access to this swf to load
resources from other domain, you need a cross domain file. if you are clear
with this, then we should understand what you can actually do with the
loaded resources, its natural for the player and for our understanding that
if you are loading an external asset you dont really own it :) n this flash
player wont allow you to modify the resources simply because you down own
it, what you are trying to do is that you are trying to modify a resource
outside of your sandbox, if it had been a local sandbox file (i.e loaded
from the local filesystem), you could do what ever you wanted to do with
it.but you are trying to modify the file which is outside of your sandbox.

to do this you need to cehck out loaderContext class and use this as a
second parameter in the load function, check these links


http://www.bigresource.com/Tracker/Track-flash-dnJPVrMGdD/
http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/system/LoaderContext.html
http://livedocs.adobe.com/flex/3/html/help.html?content=05B_Security_04.html


saurabh
http://blog.saurabhnarula.com/

On Fri, Dec 25, 2009 at 4:18 PM, avinash <[email protected]> wrote:

> I have already used crossdomain.xml on both the http domains.
>
> Still its not working..
>
> You have any other pointer
>
> On Dec 4, 11:40 am, priya gupta <[email protected]> wrote:
> > Use crossdomain.xml it will help to prevent your problem...
> >
> > On Fri, Dec 4, 2009 at 11:16 AM, s shyam <[email protected]
> >wrote:
> >
> >
> >
> > > Try to check it out whether is there any dependency between the files.
> >
> > > On Thu, Dec 3, 2009 at 2:49 PM, avinash <[email protected]> wrote:
> >
> > >> Hi guys,
> >
> > >> I am going crazy, so now was the time to post ;-)
> >
> > >> I have two swf-files, lets call them A and B.
> >
> > >> Each one is hosted on a seperate domain, both are standard http-
> > >> domains.
> >
> > >> A is loading B using the Loader class, but when it does, it throws a
> > >> security sandbox violation error 2121.
> > >> The error is thrown at exactly the point in my code, where A tries to
> > >> change the loader.content.scaleX (i.e.chaging width of B).
> >
> > >> The error in detail is:
> > >>       Error #2121: Security sandbox violation:
> > >>       Loader.content:http://XXDomain/files/A.swfcannot
> > >> access
> > >>      http://YYDomain/abc/def/assets/flash/B.swf.
> > >>       This may be worked around by calling Security.allowDomain.
> >
> > >> However, my application code also include the code:
> > >> Security.allowDomain("*");
> >
> > >> I think I have done everything I can to get it to work:
> >
> > >> Distributor domain(YYDomain) has a crossdomain.xml file which allows
> > >> access for all (*),
> > >> and I even force client Flex application to load it by using
> > >> Security.loadPolicyFile().
> >
> > >> And, now I am all out of ideas, what else can I possible do?
> >
> > >> Thanks in advance!
> >
> > >> --
> >
> > >> You received this message because you are subscribed to the Google
> Groups
> > >> "Flex India Community" group.
> > >> To post to this group, send email to [email protected].
> > >> To unsubscribe from this group, send email to
> > >> [email protected]<flex_india%[email protected]>
> <flex_india%2bunsubscr...@googlegrou­ps.com>
> > >> .
> > >> For more options, visit this group at
> > >>http://groups.google.com/group/flex_india?hl=en.
> >
> > >  --
> > > You received this message because you are subscribed to the Google
> Groups
> > > "Flex India Community" group.
> > > To post to this group, send email to [email protected].
> > > To unsubscribe from this group, send email to
> > > [email protected]<flex_india%[email protected]>
> <flex_india%2bunsubscr...@googlegrou­ps.com>
> > > .
> > > For more options, visit this group at
> > >http://groups.google.com/group/flex_india?hl=en.- Hide quoted text -
> >
> > - Show quoted text -
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "Flex India Community" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<flex_india%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/flex_india?hl=en.
>
>
>

--

You received this message because you are subscribed to the Google Groups "Flex 
India Community" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/flex_india?hl=en.


Reply via email to