1 Reply Latest reply on Jan 18, 2009 7:35 AM by ntsiii

    Noob Question-- Getting an application to run

    system_critical55 Level 1

      I am new to Flex. I know a little bit about AS 3, but am making the transition from a fairly competent AS 2 scripter. I'm trying to figure out the Flare data visualization libraries for use on a project. I'm not exactly sure what makes a program executable or not. Here is my code, but Flex Builder 3 says it cannot run the script. I'm just trying to get a trace(); of some xml data. Thank you very much. I am grateful for any help/resources. Here is my code:

        • 1. Re: Noob Question-- Getting an application to run
          ntsiii Level 3
          I have not used Flare, but...

          First, you need to be more specific. "Flex Builder 3 says it cannot run the script." Exactly what is the error message, where is it displayed, and when is it displayed?

          You posted a component that subclasses sprite. How are you using that component in your app? What line produces the error?

          "...what makes a program executable ..." No Flex/flash programs are executable. They all must run under an interpreter, like the Flash Player or the AIR runtime. What are you really asking?

          Also, there are a few minor problems with your class:
          * Loader is ok, but HTTPService is better for what you are doing. Be sure to set resultFormat="e4x" on the HTTPService.
          * You should avoid doing so much work outside of a function. Put it in the constructor, or in some lifecycle handler.
          * don't use the "new" keyword with XML. XML() is not a constructor, though it looks like one. It is really a top-level AS function.
          * always use toXMLString() to view XML. the default toString(), which is what trace uses, does not handle single XML nodes as you would expect. (trace(xmlData.toXMLString()))