4 Replies Latest reply on Jul 29, 2009 10:15 AM by acath

    Can FC put action script in a 'code behind'.

    dhammTX Level 1

      Once of the practices I do in FB3 is to move all my action script into 'code behind' files instead of having all the code in the mxml files.  Does FC have the option to do that (as part of the gen process) and if not, does anyone else who 'codes' instead of 'designs' feel that is a benefit?  I know I'd prefer it to be in a 'separate' as3 file.  Also, if I DO move the code into code behinds (I've not tried it yet), does FC have any issues reading the code behind?  I'll be trying that on a 'simple' project to be sure but figured I'd ask just in case anyone else wants to know...

        • 1. Re: Can FC put action script in a 'code behind'.
          acath Level 4

          Hi,

           

          FC does not have the option to put the AS code in a separate file. Given the very limited amount of AS code generation that FC does, it didn't seem worth the extra complexity. Do you disagree?

           

          However, it's worth noting that a main goal of the new Spark architecture on which FC is based is the separation of component logic from presentation. In future versions of FC, when designers and developers are iterating on a single project, this will become even more powerful...

           

          Here's a video that explains the new Spark architecture: http://tv.adobe.com/#vi+f1472v1501

           

          And here's a (rather lengthy) previous discussion about separating AS from MXML: http://forums.adobe.com/thread/456311?tstart=0

           

          -Adam

          • 2. Re: Can FC put action script in a 'code behind'.
            dhammTX Level 1

            Thanks Adam!  I notice the new approach for the separation of code/gui -- including the new syntax used in FlashBuilder (which I use mostly).

             

             

             

            Appreciate what you mean by complex -- I tend to reuse and genericise code where I can so that is why I mentioned that ability...

             

             

             

            Thanks!

             

            Date: Mon, 27 Jul 2009 17:45:19 -0600

            From: forums@adobe.com

            To: hammdo@hotmail.com

            Subject: Can FC put action script in a 'code behind'.

             

            Hi,

             

            FC does not have the option to put the AS code in a separate file. Given the very limited amount of AS code generation that FC does, it didn't seem worth the extra complexity. Do you disagree?

             

            However, it's worth noting that a main goal of the new Spark architecture on which FC is based is the separation of component logic from presentation. In future versions of FC, when designers and developers are iterating on a single project, this will become even more powerful...

             

            Here's a video that explains the new Spark architecture: http://tv.adobe.com/#vi+f1472v1501

             

            And here's a (rather lengthy) previous discussion about separating AS from MXML: http://forums.adobe.com/thread/456311?tstart=0

             

            -Adam

            >

            • 3. Re: Can FC put action script in a 'code behind'.
              w.johnson Level 1

              The two references cited helped answer questions about Adobe's overall philosophy and approach that came up as I worked a simple example down the design/development stack of tools from Illustrator (AI) to Catalyst (FC) to Flash Builder 4 (FB).

               

              Other questions that arose were:

               

              Each application (AI, FC, FB) contains tools for design with some degree of overlap.

              • Will FC eventually include from AI (or Photoshop, InDesign, etc.) and the FB design view all functionality needed for interactive storyboarding and skin generation?
              • Is it the intent for FC to become the designer's tool and FB the developer's tool, at least for application design?

               

              The diagram in the Gumbo skinning spec shows that base components and their subclasses are typically implemented in AS and skins in MXML and recommends this as the preferred design pattern. Yet when I converted one of my groups (essentially a form) to a customized component, and exported the project into FB, I noticed that FC had generated a single mxml file (CustomComponent1 ...) and not a pair of files (an X.as file for the base component and an X.mxml file for the skins).

              • For several reasons, wouldn't you want to generate separate files as depicted in the Gumbo diagram as a starting point for code customization?
              • How does one develop custom components in FB (or using AI+FC+FB) and package them as a library so that they can be dropped into FC and used in the way that the current set of 5 components (button, hscrollbar, vscrollbar, text input and data list) are used?
              • How will I integrate my hand-coded dynamic components for data visualization alongside more generic and static app components on an RIA page?
              • How would I use AI+FC to design liquid layouts where children at each level often utilize constraints (i.e. top, bottom, left, right) between parent and child?
              • For agile methodologies, how will refactoring the interaction or software design work in this new world where interaction designers are trying to maintain full control over appearance and interactive behavior?

               

              Finally, I would like to know what tools and steps Ely used to develop the component shown in the video. It would be instructive to turn that into a tutorial that we could walk through, step by step, in slow motion

               

              While I understand the arguments for separation of design and development as a workflow methodology, those of us with development and HCI/visualization backgrounds building research prototypes would like to see integration of the design and development tools (from the perspective of the workflow, not the architecture and code).

               

              As Jordan said, the direction you are heading is inspiring. Keep up the good work.

              • 4. Re: Can FC put action script in a 'code behind'.
                acath Level 4

                Again with the hardball questions! Gimme a few minutes...

                 

                -Adam