How do I call a Flex SWF from a remote domain using Flash?
<?xml version="1.0"?> <!-- http://www.foo.com/crossdomain.xml --> <cross-domain-policy> <allow-access-from domain="www.friendOfFoo.com" /> <allow-access-from domain="*.foo.com" /> <allow-access-from domain="126.96.36.199" /> </cross-domain-policy>
var loaderContext:LoaderContext = new LoaderContext(); loaderContext.checkPolicyFile = true; var loader:Loader = new Loader(); loader.contentLoaderInfo.addEventListener( Event.COMPLETE, onComplete ); loader.load( new URLRequest( "http://my.domain.com/image.png" ), loaderContext );
This code snippet was collected from stackoverflow, and is licensed under CC BY-SA 3.0
- How do I unload byteArray with ActionScript3?
- SQLStatement.execute() - multiple queries in one statement.
- Is PHP session security really that important for web?
- How do you get the current logged in user in Adobe air from a desktop app?
- Is there any way to test flex application with a build script?
- How can you use a SQLite database at the same time?
- What do you need to escape when submitting a question?
- Actionscript 3 - Fastest way to parse yyyy-mm-dd hh:mm:ss to a Date object?
- Block user access to internals of a site using HTTP_REFERER.
- Adobe Flex component events are created by elements of Adobe Flex events.
- Open local file with AIR Flex.
- How can I delete multiple describetype entries in my database?
- How do you make a background flash video without pixel rendering?
- Do they have a defensive style of programming?
- How do I add non-dynamic actionscript 3 classes without inheriting the classes?