XrayLogger for AS3 (Alpha)

Posted on August 31, 2006 | 8 comments

XrayLogger, or the connector for the Xray debugging console, for AS3 has an alpha code release.  You can find it here.

Xray is a nice open source project found on OSFlash.org.  The definition of Xray from the OSFlash.org site:

Xray (The AdminTool) is a “snapshot viewer” of the current state of your Flash application without impacting the performance or the file size of your application. Xray’s true nature is to look into the very guts of the Flash application and dissolve the 2d myth you see on screen to a 3D tangible entity you can truly crawl through.

Xray is brought to you by Blitz Labs.

John Grden is the creator  but others have contributed to the project in different ways.  I think with the new Flex 2 UI Xray version there was some confusion on if Xray had an AS3 connector.  This caused some pressure for John to create one.  I went ahead and download the XrayLogger for AS3 connector and got it working without too much trouble.

This is a promising project and I am excited to see it further the support for AS3/Flex2.  Fine grain object introspection and snapshot views as the app is running might be less troubling then debug mode of the Flex Builder.  You wont get breakpoints but a lot of time I do not know what I want to debug until I see the problem and would like a quick way to narrow it down realtime instead of assigning a bunch of breakpoints and stepping through them.  Nothing is a silver bullet, but either way this will be a great tool to debugging or state viewer tool in the Flex 2 arsenal.

Oh yeah, download the XrayLogger for AS3 and give John some feedback.

  • http://www.protozoo.com Daniel

    Haven’t been able to make it work under Flash Alpha 9 preview. In a simple class, i do this:

    import com.blitzagency.xray.logger.XrayLog;
    var log = new XrayLog();
    log.debug( “hello”, this );

    but the console says “no swf is available to connect with”. Any idea what’s wrong?

    thanks!

  • http://www.renaun.com Renaun Erickson

    I had the same problem, just click ok and then click on the Output tab (on the right). Then make sure you have the “Show Output?”, you should start to see the basic trace.

    The AS3 connector John wrote for Flex has an OutputPanel that you can use inside the Flex/AS3 applications without using the XRay console.

    Note that the AS3 connector is in its early stages with basic tracing functions working, John will working on more and more features and time goes by.

  • Henrik

    Im having the same problem too, show output is on, and the example app seems to work fine. Any other ideas? (the output panel doesnt show up either)

    any help woudl be great!

    h

  • http://flash-ripper.com/en/ Rostislav Siryk

    BTW, In February 2007 John has released the a href=”http://www.rockonflash.com/xray/downloads/connector/AS3_FLEX2_CONNECTOR_ALPHA.zip”>Very Alpha of Xray Flex2 Connector!

    So now you can inspect/debug your flex application.

    Usage:

    import com.blitzagency.xray.inspector.flex2.Xray;
    // instantiate Xray:
    private var xray:Xray = new Xray();

    There’s small and only one error (or rather misprint) you must fix in downloaded sources to make it compile correctly. You must replace the uppercase “F” to lowercase “f” in the “Flex2″ imported package name in the com.blitzagency.xray.inspector.flex2.Xray.as file, so the correct import should look like:

    import com.blitzagency.xray.inspector.flex2.FlexObjectInspector;

    Happy Xraying!


    Rost

  • Bachir

    I’m trying to get Xray to work with flashdevelop but can’t seem to figure it out.

    I can see the output tracing alright, but how can i get the application view to connect?

    when i hit on “_level0″ “go” button, I get :
    (12271)
    view tree called

    _level0

    (12272)
    stage is not initialized

    (12272)
    inspect object error: stage

    Error #1009: Cannot access a property or method of a null object reference.

    did anyone get this to work properly?

    pls help thx

  • http://www.renaun.com Renaun Erickson

    I haven’t revisited this in a long while. Not sure what the status of XRay is any more.

  • http://www.milkisevil.com philip bulley

    so what’s the easiest way to use Xray with AS3 in the CS3 IDE? still no as3 connector on osflash!

    it’s a shame that such a simply effing great and easy to use tool, isn’t being given the attention it deserves :~(

  • http://www.mikebritton.com Mike Britton

    But it’s free! ;)

    I’ve started using it instead of Thunderbolt. Can’t wait for the full functionality. Nice work.