4 Replies Latest reply on Jun 5, 2008 7:32 PM by Thistledowne

    air.trace()

    Thistledowne Level 1
      I've been disgruntled with the need to run my application in the debugger in Flash CS3 to be able to see trace statements, and the fact that doing so usually just outright crashes the debugger over and over.

      When looking at the livedocs which now include the AIR api: http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/index.html I'm finding examples using "air.trace()", for instance in bytesAvailable

      I'm wondering, is this a way of invoking the trace() method differently that might take care of this frustration for me, but I'd like to understand it by reading about it in the API but I cannot find it anywhere on the livedocs entity I included above or in my local help interface in Flash CS3.

      Is 'air' like 'stage', an instantiation of an 'Air' class that I can reference? Moreover, why is the FileStream in this example being instantiated as new air.FileStream instead of flash.filesystem.FileStream as flash.filesystem is the base package for this class?
        • 1. Re: air.trace()
          Oliver Goldman Adobe Employee
          The "air." prefix is just a shortcut made available for AJAX applications. A reference to air.FileStream is the same as flash.filesystem.FileStream.

          You don't need to use the debugger to see the output of trace() statements. If you debug your application via 'adl' (available in the SDK) then trace output is, by default, sent back to the terminal window from which adl is invoked.

          Oliver Goldman | Adobe AIR Engineering

          • 2. Re: air.trace()
            Thistledowne Level 1
            Thank you.

            The prefix is of course a nice shortcut, but if not documented in such a way as to be easily found, I would argue that it should not be included in examples. I reached the API from the link in the 'For Flash' section of this page:
            http://www.adobe.com/support/documentation/en/air/#flash If it's documented elsewhere in an AJAX context, that's great, but that's a perspective that I as a Flash developer would not share.

            I've spent considerable time looking for documentation on debugging via ADL (I assume it's the AIR Debug Launcher? I found one place in the developers guide where it's spelled out but no details on what it is, and how to invoke it. I currently test my program using Control=>Delete ASO files and Test Movie. It gives me the message "Exporting Flash Movie (progress bar), and then about 80% of the time it gives me a message telling me that the "Adobe AIR Debug Launcher" has crashed once it hits the first function call using the AIR api. Am I already doing as you suggested? I condition/commented out all of my trace back when AIR was still BETA as this was what was suggested by the AIR Engineers on the support boards then.
            • 3. Re: air.trace()
              Oliver Goldman Adobe Employee
              No, I'm referring to using adl directly from the terminal, not via Flash. I think you're looking for this page: http://livedocs.adobe.com/air/1/devappshtml/CommandLineTools_1.html
              • 4. Re: air.trace()
                Thistledowne Level 1
                Excellent. I thank you indeed.