5 Replies Latest reply on Jan 21, 2009 6:22 AM by _SR_

    Application Class Configuration

    _SR_ Level 1
      Hi guys,

      I'm working in Flex Builder 3 with an ActionScript project and have two questions regarding the application classes.

      ( 1 ) Is it possible to use classes that are not top-level classes as application classes?

      ( 2 ) Is it possible to specify a separate output directory for each application class?


      Thanks in advance,
      Si ++
        • 1. Re: Application Class Configuration
          _SR_ Level 1
          No problem, solved it myself. You need to manually edit the project's .actionScriptProperties file and add the application paths that way:

          <application path="foo/bob/Class.as"/>

          The output directory structure is automatically created to reflect the location of the application classes, so in this example the SWF path would be foo/boo/Class.swf

          I'm not sure if this is a Flex Builder bug (not being able to select non top-level classes as applications) or if this is done by design, but either way this functionality needs to be available via the project property panel.
          • 2. Re: Application Class Configuration
            Level 7

            "Si ++" <webforumsuser@macromedia.com> wrote in message
            news:gl5upt$200$1@forums.macromedia.com...
            > No problem, solved it myself. You need to manually edit the project's
            > .actionScriptProperties file and add the application paths that way:
            >
            > <application path="foo/bob/Class.as"/>
            >
            > The output directory structure is automatically created to reflect the
            > location of the application classes, so in this example the SWF path would
            > be
            > foo/boo/Class.swf
            >
            > I'm not sure if this is a Flex Builder bug (not being able to select non
            > top-level classes as applications) or if this is done by design, but
            > either way
            > this functionality needs to be available via the project property panel.

            Are you saying you want Flex Builder to allow you to create projects that
            won't run?


            • 3. Application Class Configuration
              _SR_ Level 1
              Sorry, I don't understand what you are asking.

              An ActionScript project has one default application class (this is always top-level) but you can also add additional application classes to the project and each one generates it's own SWF file - it is those additional application classes that I want located somewhere other than top-level. When you specify your application classes via the project properties panel Flex Builder doesn't seem to be able to "see" any class that isn't a top-level class, so to fix that you can manually edit the file I mentioned in my second post.

              Everything works and runs fine, I wouldn't have posted the solution if that wasn't the case. When you run/debug the project the only SWF file Flex Builder is interested in is the default application SWF, the other SWF files you load when needed at runtime.
              • 4. Re: Application Class Configuration
                Level 7

                "Si ++" <webforumsuser@macromedia.com> wrote in message
                news:gl6abb$ebs$1@forums.macromedia.com...
                > Sorry, I don't understand what you are asking.
                >
                > An ActionScript project has one main application class (the default
                > application) but you can also add additional application classes to the
                > project
                > (each one generates it's own SWF file). When you specify your application
                > classes via the project properties panel Flex Builder doesn't seem to be
                > able
                > to "see" any class that isn't a top-level class, so to fix that you can
                > manually edit the file I mentioned in my second post.
                >
                > Everything works and runs fine, I wouldn't have posted the solution if
                > that
                > wasn't the case. When you run/debug the project the only SWF Flex Builder
                > is
                > interested in is the default application SWF, the other SWF files you load
                > when
                > needed at runtime.

                This sounds like you're not running them _as_ applications. I believe that
                somewhere along the line, something has to include the Application Framework
                in order for everything to run. It may well be that you can then load a
                compiled swf based off of Button within an Application, but it seems to me a
                risky proposition and I imagine that it's not supported.

                Why don't you just use Module instead?

                -Amy


                • 5. Re: Application Class Configuration
                  _SR_ Level 1
                  It looks like we have our wires crossed, I'm not using the Flex framework. Sorry, I probably should have mentioned that in the initial post. :-)