1 Reply Latest reply on May 11, 2011 9:33 AM by Ned Murphy

    Using Flash/AS as Template possible?

    freaktor

      Hello Everyone!

       

      I'm very new to flash (just started last week) so please bare with me if this quesion sounds ridiculusly stupid

       

      I wonder if it's possible to use Flash/AS files as "templates" - in other words, we have the website http://shop.variuscard.com and the header is subject to change depending on the product-category you click in the shop. We will have approx 10 categories, and each will have a different product displayed in the flash movie, but the "background actions" should stay the same.

       

      Now, in case I need to change something (let's say the logo changes from blue to red.. and the particle-size and shape) I don't want to change all 10 or more files again. So is there a way to use the "basic" flash file as template, which means - position of the Logo & shadow, and the particle code, and just change the variable pictures and stuff inside the categories? I took that red card-printer as sample of the card-printer category for example.

       

      Thanks in advance!

        • 1. Re: Using Flash/AS as Template possible?
          Ned Murphy Adobe Community Professional & MVP

          There are a few ways you can manage having a template file.  Probably the more modern approach is to have data file that defines certain characterstics of the file's content, such as the logo image it uses, the title it displays, where things get placed, etc.  Then you have your Flash file dynamically load/adjust the content per what the data file dictates.  So you data file could specify the name of the logo image file and where it gets planted and the file could use that info to load that file and place it where it goes.

           

          Another thing you can make use of is the FlashVars parameter that the embedding code allows for.  So if you had the same banner in the same web site on different pages or sections of a page, you could use the FlashVars to indicate some parameter each file should use to decide what content it needs to make use of.

           

          Combining these approaches can alow you to only have one Flash file, and one data file that you change as needed.