4 Replies Latest reply on Jan 31, 2011 6:40 PM by Ed@SF

    Newbie question

    Ed@SF Level 1

      Unsure if this is FB or Flex question:

       

      I'm pretty new to FB/Flex (coming from Flash/AS3), and the workflow I'm in is FCatalyst -> FB.

       

      Is there a way to "embed" all assets (i.e. other swfs), in the "main output swf"? The rationale for this is to somewhat "package" a self-contained swf for distribution (instead of making sure the 'assets' folder is where it should be, etc.). I've looked at prefs and project properties, and can't find a setting (if one exists).

       

      Thanks for any input.

       

      If this is the wrong forum, apologies....

       

      Ed

        • 1. Re: Newbie question
          SunilAdobe Adobe Employee

          I just found this from the docs

           

          >>By default the images you add to your application are embedded and published as part of the SWF file.<<

           

          http://help.adobe.com/en_US/flashcatalyst/cs/using/WSe0363cf428f0b465ffa9edb1273635cfd7-80 00.html

           

          Hope this helps.

           

          Thanks

          -Sunil

          • 2. Re: Newbie question
            Ed@SF Level 1

            SunilAdobe wrote:

             

            I just found this from the docs

             

            >>By default the images you add to your application are embedded and published as part of the SWF file.<<

             

            http://help.adobe.com/en_US/flashcatalyst/cs/using/WSe0363cf428f0b465f fa9edb1273635cfd7-8000.html

             

            Hope this helps.

             

            Thanks

            -Sunil

            Hi Sunil,

             

            Thank you for your assistance.

             

            Yes, that is true in Flash Catalyst.

             

            However, my workflow requires that I further enhance the application (created in Flash Catalyst) in Flash Builder (i.e. extra event handling etc.)

             

            It's when I "export" from Flash Builder that the assets (in this case, imported swfs in FC and originally embedded in the published FC swf) are then placed in a separate 'assets' folder (in the output release folder of Flash Builder).

             

            So am wondering if there is a way to eseentially "package" the whole FB project in one swf (everything embedded).....

             

            Thanks again,

            Ed

            • 3. Re: Newbie question
              SunilAdobe Adobe Employee

              Hi Ed,

               

              I created a project in Panini (the upcoming version of FC) and added an image and exported the fxp and imported that in Burrito (upcoming version of FB). This is what I got in the main.mxml.

               

                        <s:BitmapImage x="257" y="13" smooth="true"

                                          source="@Embed('/assets/images/ai124794742037.png')"/>

               

               

              Basically all the images by default are embedded in the swf that gets compiled.

              After adding my own event handlers, I exported the project from FB and imported in FC and ran the project without any issues.

               

              Is there anything I missed?

               

              Thanks

              -Sunil

              1 person found this helpful
              • 4. Re: Newbie question
                Ed@SF Level 1

                SunilAdobe wrote:

                 

                Hi Ed,

                 

                I created a project in Panini (the upcoming version of FC) and added an image and exported the fxp and imported that in Burrito (upcoming version of FB). This is what I got in the main.mxml.

                 

                          <s:BitmapI mage x="257" y="13" smooth="true"

                           &nbs p;           &n bsp;    source="@Embed('/assets/images/ai124794742037.png')"/>

                 

                 

                Basically all the images by default are embedded in the swf that gets compiled.

                After adding my own event handlers, I exported the project from FB and imported in FC and ran the project without any issues.

                 

                Is there anything I missed?

                 

                Thank

                -Sunil

                 

                Lucky you - you can get round-trip editing workflows with FC/Panini and FB . I don't use Panini.....but I see where you're going.....

                 

                I'm wary of using Panini - only have 1 production system and unsure what it would do to my existing install of FC (or if/when release versions comes out...avoiding any cartwheels that usually come with "removing beta or rc versions before installing release"..)

                 

                Anyway, I'll keep exploring my workflow - I don't have the luxury of going back to FC from FB (because I don't have/use Panini). So it has to be

                1. All FC work done before I even get into FB
                2. Once in FB, and since I can't roundtrip back to FC currently, FB is responsible for the output (aka the "published swf").

                 

                It's in #2 that I have issues....distributing the swf itself introduces sandbox problems - the swf will not load external swf (as published by FB and in /assets/ folder) unless the user configures containing folder as "trusted location" (which just isn't an option in the real world).

                 

                I could convert it into an "exe"/projector and this seems to be a workaround (still with the assets folder, but this time no sandbox issues).

                 

                I could also probably just figure out how to publish it as AIR (not there yet with my new/limited knowledge of FB)...

                 

                I'm still new to the FB interface and maybe I'll find my own answer the more I get into it (and Flex overall). Right now, the workarounds (exe projector) is likely what needs to be done for "standalone" distribution...

                 

                Part of this project also entails the swf itself being "embedded" into a larger desktop application re: windows app with some Flash elements - so AIR won't work, nor would an exe/projector...has to be an "embedded" swf file (to the application, as in ActiveX - much like it would in a browser), but so far the "/assets/" folder assets aren't an issue in this deployment scenario....

                 

                Anyway, thanks for your help so far!