crossdomain.xml

written by justin on July 20th, 2007 @ 07:14 AM

On mydaddypuzzles.com I am using a Picture Gallery built with Adobe Flex. I had done all of my testing with the address http://www.mydaddypuzzles.com/. So, of course I get an email from Erik telling me that I have an ActionScript Error on my gallery page when accessing it via http://mydaddypuzzles.com/puzzle/gallery/.

The first thing that comes to mind is that there is a problem with loading the xml data that the website is generating for the Flash Player to consume. I remembered that there is some xml file that you can put into your root web directory to allow access from other domains. After a few minutes of searching my brain I remember that it is a file called crossdomain.xml. I did a google search and found the page on the Adobe website that talked about them. I whipped one up for my domain and Voila! Worky Worky. This is what the file looks like:


<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd"> <cross-domain-policy> <allow-access-from domain="mydaddypuzzles.com" /> </cross-domain-policy>

Flex resources

written by justin on July 18th, 2007 @ 08:35 AM

If you are interested at all in Rich Internet Applications (RIA), then you might want to get familiar with Adobe Flex. Flex is an xml tag language similar to xhtml. You write your tags and optionally actionscript 3 which then all gets compiled down to flash 9. It is pretty easy to use and there is a nice IDE called Flex Builder from Adobe.

Some great examples can be seen at Adobe's website; the Component Explorer is a great way to see what some of the code looks like and also see what components you get "right out of the box". There are other resources available like the Style Explorer to check out as well. So have fun developing RIAs with Adobe Flex.

p.s. Flex consumes xml very nicely, so anything that produces xml can be a datasource for flex. I use Ruby on Rails of course for my development. There are also some very nice tie ins with ColdFusion if you happen to have that available as a resource.