Over the last 2 weeks I have been on-site in London debugging what is possibly the worst Flash project that I have ever seen. Before I got my hands on the project there had been 5 other developers who each had a unique style of development ranging from OOP to completely timeline based. It has been a very interesting challenge. My twitter friends may have read one or two twitts along the lines of "where is the code?" and "WTF?!?".
I was stuck in a particularly nasty depth bug (there are three depth managers scattered throughout and conflicting) when Carlos suggested I use Xray.
OMG - Xray rocks!
I have known about Xray for quite some time but had never actually used it before. I have tried to come up with some ideas on why this may be the case. I think the biggest reason why I have stayed away from most open source projects is I have always found them fairly complex to get up and running. I was really put off when I tried to get FAMES up and running about 2 years ago. It required so many installs, including the OS X developer suite and a fair bit of hacking around in the terminal that I decided that I would be risking damaging my Mac by playing where I was no expert. I think I also got the idea that OS projects were more unstable than commercial projects. This one I got from my past installs of Open Office as I tried to move away from the need to use Microsoft Office.
I know now that neither of those are valid. On the stability issue you just need to look at all the past versions of Flash on a Mac, not to mention Vista! My new experiences with open source projects have proved to be very stable. I know that NeoOffice is not 100% perfect but it suits my basic needs of opening MS docs when it is required. I love Eclipse for editing ActionScript (I was sensible and got FDT and it was well worth it). As for the complexity of set up? I don't think it could be easier to set up Xray. I was up and running in about 5 min. I think there still are and will always be projects that are complex to get running but it should not stop one from exploring the possibilities.
A very basic summary of how Xray works
The project is hosted on OS Flash so you can get all the components from the Xray project page. There are 2 parts to Xray - a component that you put on your Flash movie called the connector and a Flash standalone application referred to as the interface.
Drop the component into your root Flash movie. Run the interface and test your Flash movie. Explore your Flash movie in the interface. It is that easy.
What does Xray do?
I think the name is fairly accurate. In a nutshell it allows you to "look into" your Flash movie.

The full feature list from the OS Flash page on Xray is:
Note: “object” in this list might mean a literal Object, textField, class, button, sound object, video object etc)
- View physical parent/child relationships of all your objects/movieclips in the treeview
- View all properties/methods associated with an object/movieclip
- Drill down through any objects/movieclips/arrays in the Datagrid
- Execute actionscript at runtime. Call any of your methods from the interface at runtime!
- Control at runtime:
- MovieClips - Edit all properties, including: Rotate, scale, move, opacity, properties, play, gotoAndPlay/Stop/labelName
- TextFields - same as movieclips, as well as edit text, HTML text
- Buttons - same as movieclips
- video objects (NetStream) - play, pause, stop, view properties in realtime as video plays
- Sound objects - play, stop, set loops, view ID3 information, all sound properties.
- Use the _global.tt() to send any object/property to the output panel. Xray.trace() will recurse any object/array and display in the output panel a tabbed relational view of the object/array.
- Use the search tool to search the output returned.
- History info - use property settings saved in the history in your FLA or to reset your application to a specific state
- Filters Panel - use Flash8 filters at run time and copy/paste the code for use in your FLA
If you have not used Xray yet you would be silly to not even check it out. It has had a huge impact on my time spent debugging and I am so grateful that it was release it so that I am able to use it.
Thanks to John Grden who created it. You rock!
As John would say -
ROCK ON \m/
[update]
I received a mail from Ivan Todorov at BLITZ explaining their involvement in Xray.
I wanted to mention that XRAY is a BLITZ Open Source project, not John Grden’s. John was the lead developer behind it and he certainly deserves most of the credit as developed it, however BLITZ is the company behind it and the intellectual property belongs to BLITZ. We made a decision to Open Source it in order to “give back” to the community, and I feel it is important to give proper credit to BLITZ as well.
Thanks BLITZ for making the decision to go open source with Xray and sharing your projects with the community.
[/update]
2 ResponsesLeave a comment ?
>> Thanks to John Grden who created it. You rock!
Yey!! I second, third and fourth that!!!
cool. i will definitely have to look into this!