[flexcoders] Re: CROSS-DOMAIN POLICY HELP PLEASE!!!

2010-02-24 Thread jaywood58
I ran into this same issue recently. When you load the image, you just need to 
specify a LoaderContext with checkPolicyFile set to true. 

Here's a link to a blog post that explains it pretty well: 
http://www.toybot.nl/blog/2008/03/19/bitmapdatadraw-and-checkpolicyfile/


--- In flexcoders@yahoogroups.com, s_hernandez01 s_hernande...@... wrote:

 Hey does anyone know why I get this error:
 
 SecurityError: Error #2122: Security sandbox violation: BitmapData.draw: 
 http://localhost/beta/Test-debug/Test.swf cannot access 
 http://MyDomainName.com/beta/images-standard/backgrounds/paper.png. A policy 
 file is required, but the checkPolicyFile flag was not set when this media 
 was loaded.
 at flash.display::BitmapData/draw()
 
 I have the xml file crossdomain.xml on the root of my webserver:
 
 ?xml version=1.0?
 cross-domain-policy
 allow-access-from domain=www.MyDomainName.com/
 /cross-domain-policy
 
 but when I run the app locally I always get this error.  All I'm doing is 
 trying to retreive images from my database.  What more do I need to do?
 
 
 Thanks
 
 Sal





[flexcoders] Re: CROSS-DOMAIN POLICY HELP PLEASE!!!

2010-02-11 Thread s_hernandez01
Okay well, thanks everyone for your help, but I got too frustrated with 
figuring it out so my last resort is just have to upload my php files to the 
server and call them with a url so I don't get the sandbox error with testing 
them locally.  This sucks that I get the error locally, I hope Flash Builder 
works this out when released.  Thanks again.


--- In flexcoders@yahoogroups.com, Alex Harui aha...@... wrote:

 Timing is important, and so is configuration.  If you launch the app via 
 file:// then you need the put the folder in the FlashPlayerTrust file(s).  If 
 you are launching the app via http:// then you need a crossdomain.xml file on 
 the root of www.MyDomainName.com and make sure it gets loaded before the 
 request for the image.
 
 I've never bothered to figure out when you have to use a LoaderContext and 
 when the player will automatically look for crossdomain.xml.  It might be 
 documented in the security whitepapers on the Adobe sight
 
 
 On 2/10/10 2:36 PM, s_hernandez01 s_hernande...@... wrote:
 
 
 
 
 
 
 Yup tried that and no luck either.  I even tried using
 
 Security.loadPolicyFile(http://www.MyDomainName.com/crossdomain.xml;);
 
 to push it to the flash player since I put the * in the cross domain and 
 still keep getting the error.
 
 --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , 
 Adnan Doric astronaute@ wrote:
 
  On 10/02/2010 23:14, s_hernandez01 wrote:
   Well, I'm using Flex 3 and the sandbox error pops up when I run it
   from Flex.
  URL should be file:///something if you want it to work.
 
  You can also try to put a * in your crossdomain.xml and start from
  there if it works.
 
 
 
 
 
 
 
 --
 Alex Harui
 Flex SDK Team
 Adobe System, Inc.
 http://blogs.adobe.com/aharui





[flexcoders] Re: CROSS-DOMAIN POLICY HELP PLEASE!!!

2010-02-11 Thread valdhor
You could try just adding the bin-debug folder to the trusted locations at 
http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html

--- In flexcoders@yahoogroups.com, s_hernandez01 s_hernande...@... wrote:

 Okay well, thanks everyone for your help, but I got too frustrated with 
 figuring it out so my last resort is just have to upload my php files to the 
 server and call them with a url so I don't get the sandbox error with testing 
 them locally.  This sucks that I get the error locally, I hope Flash Builder 
 works this out when released.  Thanks again.
 
 
 --- In flexcoders@yahoogroups.com, Alex Harui aharui@ wrote:
 
  Timing is important, and so is configuration.  If you launch the app via 
  file:// then you need the put the folder in the FlashPlayerTrust file(s).  
  If you are launching the app via http:// then you need a crossdomain.xml 
  file on the root of www.MyDomainName.com and make sure it gets loaded 
  before the request for the image.
  
  I've never bothered to figure out when you have to use a LoaderContext and 
  when the player will automatically look for crossdomain.xml.  It might be 
  documented in the security whitepapers on the Adobe sight
  
  
  On 2/10/10 2:36 PM, s_hernandez01 s_hernandez01@ wrote:
  
  
  
  
  
  
  Yup tried that and no luck either.  I even tried using
  
  Security.loadPolicyFile(http://www.MyDomainName.com/crossdomain.xml;);
  
  to push it to the flash player since I put the * in the cross domain and 
  still keep getting the error.
  
  --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , 
  Adnan Doric astronaute@ wrote:
  
   On 10/02/2010 23:14, s_hernandez01 wrote:
Well, I'm using Flex 3 and the sandbox error pops up when I run it
from Flex.
   URL should be file:///something if you want it to work.
  
   You can also try to put a * in your crossdomain.xml and start from
   there if it works.
  
  
  
  
  
  
  
  --
  Alex Harui
  Flex SDK Team
  Adobe System, Inc.
  http://blogs.adobe.com/aharui
 





[flexcoders] Re: CROSS-DOMAIN POLICY HELP PLEASE!!!

2010-02-10 Thread s_hernandez01
I guess my question would be why would it give me a security sandbox error when 
I'm running the app locally, wouldn't the sandbox error be executed when you 
have your app on a webserver with no crossdomain.xml on the server you're 
trying to access?



--- In flexcoders@yahoogroups.com, Jake Churchill reyna...@... wrote:

 Looks like you are trying to access MyDomainName.com but your policy is set
 for www.MyDomainName.com.  Those are treated as separate domains even though
 they are only sub domains.
 
 On Wed, Feb 10, 2010 at 2:35 PM, s_hernandez01 s_hernande...@...wrote:
 
 
 
  Hey does anyone know why I get this error:
 
  SecurityError: Error #2122: Security sandbox violation: BitmapData.draw:
  http://localhost/beta/Test-debug/Test.swf cannot access
  http://MyDomainName.com/beta/images-standard/backgrounds/paper.png. A
  policy file is required, but the checkPolicyFile flag was not set when this
  media was loaded.
  at flash.display::BitmapData/draw()
 
  I have the xml file crossdomain.xml on the root of my webserver:
 
  ?xml version=1.0?
  cross-domain-policy
  allow-access-from domain=www.MyDomainName.com/
  /cross-domain-policy
 
  but when I run the app locally I always get this error. All I'm doing is
  trying to retreive images from my database. What more do I need to do?
 
  Thanks
 
  Sal
 
   
 





Re: [flexcoders] Re: CROSS-DOMAIN POLICY HELP PLEASE!!!

2010-02-10 Thread Jake Churchill
try manually loading the policy file:

import flash.system.Security;
...
Security.loadPolicyFile(“http://domainname.com/crossdomain.xml“);

On Wed, Feb 10, 2010 at 3:06 PM, s_hernandez01 s_hernande...@yahoo.comwrote:



 I guess my question would be why would it give me a security sandbox error
 when I'm running the app locally, wouldn't the sandbox error be executed
 when you have your app on a webserver with no crossdomain.xml on the server
 you're trying to access?


 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Jake
 Churchill reyna...@... wrote:
 
  Looks like you are trying to access MyDomainName.com but your policy is
 set
  for www.MyDomainName.com. Those are treated as separate domains even
 though
  they are only sub domains.
 
  On Wed, Feb 10, 2010 at 2:35 PM, s_hernandez01 s_hernande...@...wrote:

 
  
  
   Hey does anyone know why I get this error:
  
   SecurityError: Error #2122: Security sandbox violation:
 BitmapData.draw:
   http://localhost/beta/Test-debug/Test.swf cannot access
   http://MyDomainName.com/beta/images-standard/backgrounds/paper.png. A
   policy file is required, but the checkPolicyFile flag was not set when
 this
   media was loaded.
   at flash.display::BitmapData/draw()
  
   I have the xml file crossdomain.xml on the root of my webserver:
  
   ?xml version=1.0?
   cross-domain-policy
   allow-access-from domain=www.MyDomainName.com/
   /cross-domain-policy
  
   but when I run the app locally I always get this error. All I'm doing
 is
   trying to retreive images from my database. What more do I need to do?
  
   Thanks
  
   Sal
  
  
  
 

  



[flexcoders] Re: CROSS-DOMAIN POLICY HELP PLEASE!!!

2010-02-10 Thread s_hernandez01
Yeah I thought of that too, but no success :(  The Flex Project is setup with a 
PHP application server type.  It's like if Flash Player is saying hey this 
domain does not have access to get these images but the thing is I'm not 
calling them from domain to domain,   I'm calling them locally to a domain. 
It's really frustrating. Any other solutions? 



--- In flexcoders@yahoogroups.com, Jake Churchill reyna...@... wrote:

 try manually loading the policy file:
 
 import flash.system.Security;
 ...
 Security.loadPolicyFile(http://domainname.com/crossdomain.xml;);
 
 On Wed, Feb 10, 2010 at 3:06 PM, s_hernandez01 s_hernande...@...wrote:
 
 
 
  I guess my question would be why would it give me a security sandbox error
  when I'm running the app locally, wouldn't the sandbox error be executed
  when you have your app on a webserver with no crossdomain.xml on the server
  you're trying to access?
 
 
  --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Jake
  Churchill reynacho@ wrote:
  
   Looks like you are trying to access MyDomainName.com but your policy is
  set
   for www.MyDomainName.com. Those are treated as separate domains even
  though
   they are only sub domains.
  
   On Wed, Feb 10, 2010 at 2:35 PM, s_hernandez01 s_hernandez01@wrote:
 
  
   
   
Hey does anyone know why I get this error:
   
SecurityError: Error #2122: Security sandbox violation:
  BitmapData.draw:
http://localhost/beta/Test-debug/Test.swf cannot access
http://MyDomainName.com/beta/images-standard/backgrounds/paper.png. A
policy file is required, but the checkPolicyFile flag was not set when
  this
media was loaded.
at flash.display::BitmapData/draw()
   
I have the xml file crossdomain.xml on the root of my webserver:
   
?xml version=1.0?
cross-domain-policy
allow-access-from domain=www.MyDomainName.com/
/cross-domain-policy
   
but when I run the app locally I always get this error. All I'm doing
  is
trying to retreive images from my database. What more do I need to do?
   
Thanks
   
Sal
   
   
   
  
 
   
 





Re: [flexcoders] Re: CROSS-DOMAIN POLICY HELP PLEASE!!!

2010-02-10 Thread Adnan Doric

http://localhost is considered as a domain.

If you want it to work, launch it directly from your Flash Builder. It 
will create a rule for the folder containing the swf in order to bypass 
the security.




On 10/02/2010 22:54, s_hernandez01 wrote:


Yeah I thought of that too, but no success :( The Flex Project is 
setup with a PHP application server type. It's like if Flash Player is 
saying hey this domain does not have access to get these images but 
the thing is I'm not calling them from domain to domain, I'm calling 
them locally to a domain. It's really frustrating. Any other solutions?


--- In flexcoders@yahoogroups.com 
mailto:flexcoders%40yahoogroups.com, Jake Churchill reyna...@... 
wrote:


 try manually loading the policy file:

 import flash.system.Security;
 ...
 Security.loadPolicyFile(http://domainname.com/crossdomain.xml 
http://domainname.com/crossdomain.xml);


 On Wed, Feb 10, 2010 at 3:06 PM, s_hernandez01 s_hernande...@...wrote:

 
 
  I guess my question would be why would it give me a security 
sandbox error
  when I'm running the app locally, wouldn't the sandbox error be 
executed
  when you have your app on a webserver with no crossdomain.xml on 
the server

  you're trying to access?
 
 
  --- In flexcoders@yahoogroups.com 
mailto:flexcoders%40yahoogroups.com flexcoders%40yahoogroups.com, Jake

  Churchill reynacho@ wrote:
  
   Looks like you are trying to access MyDomainName.com but your 
policy is

  set
   for www.MyDomainName.com. Those are treated as separate domains even
  though
   they are only sub domains.
  
   On Wed, Feb 10, 2010 at 2:35 PM, s_hernandez01 
s_hernandez01@wrote:

 
  
   
   
Hey does anyone know why I get this error:
   
SecurityError: Error #2122: Security sandbox violation:
  BitmapData.draw:
http://localhost/beta/Test-debug/Test.swf 
http://localhost/beta/Test-debug/Test.swf cannot access

http://MyDomainName.com/beta/images-standard/backgrounds/paper.png. 
http://MyDomainName.com/beta/images-standard/backgrounds/paper.png. A
policy file is required, but the checkPolicyFile flag was not 
set when

  this
media was loaded.
at flash.display::BitmapData/draw()
   
I have the xml file crossdomain.xml on the root of my webserver:
   
?xml version=1.0?
cross-domain-policy
allow-access-from domain=www.MyDomainName.com/
/cross-domain-policy
   
but when I run the app locally I always get this error. All 
I'm doing

  is
trying to retreive images from my database. What more do I 
need to do?

   
Thanks
   
Sal
   
   
   
  
 
 
 






[flexcoders] Re: CROSS-DOMAIN POLICY HELP PLEASE!!!

2010-02-10 Thread s_hernandez01
Well, I'm using Flex 3 and the sandbox error pops up when I run it from Flex.


--- In flexcoders@yahoogroups.com, Adnan Doric astrona...@... wrote:

 http://localhost is considered as a domain.
 
 If you want it to work, launch it directly from your Flash Builder. It 
 will create a rule for the folder containing the swf in order to bypass 
 the security.
 
 
 
 On 10/02/2010 22:54, s_hernandez01 wrote:
 
  Yeah I thought of that too, but no success :( The Flex Project is 
  setup with a PHP application server type. It's like if Flash Player is 
  saying hey this domain does not have access to get these images but 
  the thing is I'm not calling them from domain to domain, I'm calling 
  them locally to a domain. It's really frustrating. Any other solutions?
 
  --- In flexcoders@yahoogroups.com 
  mailto:flexcoders%40yahoogroups.com, Jake Churchill reynacho@ 
  wrote:
  
   try manually loading the policy file:
  
   import flash.system.Security;
   ...
   Security.loadPolicyFile(http://domainname.com/crossdomain.xml 
  http://domainname.com/crossdomain.xml);
  
   On Wed, Feb 10, 2010 at 3:06 PM, s_hernandez01 s_hernandez01@wrote:
  
   
   
I guess my question would be why would it give me a security 
  sandbox error
when I'm running the app locally, wouldn't the sandbox error be 
  executed
when you have your app on a webserver with no crossdomain.xml on 
  the server
you're trying to access?
   
   
--- In flexcoders@yahoogroups.com 
  mailto:flexcoders%40yahoogroups.com flexcoders%40yahoogroups.com, Jake
Churchill reynacho@ wrote:

 Looks like you are trying to access MyDomainName.com but your 
  policy is
set
 for www.MyDomainName.com. Those are treated as separate domains even
though
 they are only sub domains.

 On Wed, Feb 10, 2010 at 2:35 PM, s_hernandez01 
  s_hernandez01@wrote:
   

 
 
  Hey does anyone know why I get this error:
 
  SecurityError: Error #2122: Security sandbox violation:
BitmapData.draw:
  http://localhost/beta/Test-debug/Test.swf 
  http://localhost/beta/Test-debug/Test.swf cannot access
  
  http://MyDomainName.com/beta/images-standard/backgrounds/paper.png. 
  http://MyDomainName.com/beta/images-standard/backgrounds/paper.png. A
  policy file is required, but the checkPolicyFile flag was not 
  set when
this
  media was loaded.
  at flash.display::BitmapData/draw()
 
  I have the xml file crossdomain.xml on the root of my webserver:
 
  ?xml version=1.0?
  cross-domain-policy
  allow-access-from domain=www.MyDomainName.com/
  /cross-domain-policy
 
  but when I run the app locally I always get this error. All 
  I'm doing
is
  trying to retreive images from my database. What more do I 
  need to do?
 
  Thanks
 
  Sal
 
 
 

   
   
   
  
 





Re: [flexcoders] Re: CROSS-DOMAIN POLICY HELP PLEASE!!!

2010-02-10 Thread Adnan Doric
On 10/02/2010 23:14, s_hernandez01 wrote:
 Well, I'm using Flex 3 and the sandbox error pops up when I run it 
 from Flex.
URL should be file:///something if you want it to work.

You can also try to put a * in your crossdomain.xml and start from 
there if it works.


[flexcoders] Re: CROSS-DOMAIN POLICY HELP PLEASE!!!

2010-02-10 Thread s_hernandez01
Yup tried that and no luck either.  I even tried using

Security.loadPolicyFile(http://www.MyDomainName.com/crossdomain.xml;);

to push it to the flash player since I put the * in the cross domain and 
still keep getting the error.

--- In flexcoders@yahoogroups.com, Adnan Doric astrona...@... wrote:

 On 10/02/2010 23:14, s_hernandez01 wrote:
  Well, I'm using Flex 3 and the sandbox error pops up when I run it 
  from Flex.
 URL should be file:///something if you want it to work.
 
 You can also try to put a * in your crossdomain.xml and start from 
 there if it works.





Re: [flexcoders] Re: CROSS-DOMAIN POLICY HELP PLEASE!!!

2010-02-10 Thread Alex Harui
Timing is important, and so is configuration.  If you launch the app via 
file:// then you need the put the folder in the FlashPlayerTrust file(s).  If 
you are launching the app via http:// then you need a crossdomain.xml file on 
the root of www.MyDomainName.com and make sure it gets loaded before the 
request for the image.

I’ve never bothered to figure out when you have to use a LoaderContext and when 
the player will automatically look for crossdomain.xml.  It might be documented 
in the security whitepapers on the Adobe sight


On 2/10/10 2:36 PM, s_hernandez01 s_hernande...@yahoo.com wrote:






Yup tried that and no luck either.  I even tried using

Security.loadPolicyFile(http://www.MyDomainName.com/crossdomain.xml;);

to push it to the flash player since I put the * in the cross domain and 
still keep getting the error.

--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Adnan 
Doric astrona...@... wrote:

 On 10/02/2010 23:14, s_hernandez01 wrote:
  Well, I'm using Flex 3 and the sandbox error pops up when I run it
  from Flex.
 URL should be file:///something if you want it to work.

 You can also try to put a * in your crossdomain.xml and start from
 there if it works.







--
Alex Harui
Flex SDK Team
Adobe System, Inc.
http://blogs.adobe.com/aharui