3 Replies Latest reply: Jan 10, 2013 8:41 AM by moccamaximum RSS

    What is the proper way to organize/build a Flash site

    nikolaig Community Member

      I have built a flash site and run into problems with buggy performance and can not figure out what is wrong. I feel that I will be better off rebuilding it in the "proper" way but don't know what is this way.

      Here is what I have. My main time line consists of 7 labeled sections separated by key frames. Each section shares common elements, such as main menu navigation buttons. These elements have a layer which extends throughout the entire main timeline. Then each labeled section (which spans for about 10 frames) has a set of its own movie clips located on other keyframed layers. I previously had everything animated with Flash native tweening, but now reworked all the animations with AS3. My code is placed in segments on every section. I did it because each section has its own set of movie clips so the code is unique to their movement and function.

      It was suggested that all the code should be on the first frame, but then how do I deal with the elements which are appear only 10, 20, 30 frames later?

      I also not sure how I assign document classes for each section if the document class is the way to go?

      I feel that I am missing a global picture on how to properly structure/organize a flash site.

      Can any one give me general guidelines on that subject or point to a good source tutorial?

        • 1. Re: What is the proper way to organize/build a Flash site
          kglad CommunityMVP

          you can only have one document class.  that is your main class and, one way, to setup your project is to have the main class add and remove the main sections added to the display.  each main section would be its own class.

          • 2. Re: What is the proper way to organize/build a Flash site
            nikolaig Community Member

            I think working with document classes is a next step and a separate lesson for me.

             

            Is it possible to keep everything in the AS layer in the main time line. If this way is acceptable then how do I arrange it?

            • 3. Re: What is the proper way to organize/build a Flash site
              moccamaximum Community Member

              You should have a look at one of the templates that are included in flash CS6.

              File->New->Templates->Presentation->Extended Presentation

              It`s basically a presentation that can be easily reworked to the kind of Website you have in mind.

              There is a MovieClip inside this project that is called "Slides MovieClip" there you would put your seven labeled sections in.

              There is a Layer "Background": there you would put your Designelements in that are always on the stage.

              There is a Layer "Actions": there you would have to adjust the navigation to your needs.

               

              Supposed you have a MenuItem "myStuff" on the backgroundLayer you would write the following Code to navigate to the "myStuff" labeled frame inside your Slides MovieClip:

               

              myStuff.addEventListener(MouseEvent.CLICK, navigateToMyStuff);

              function navigateToMyStuff(e:MouseEvent):void{

              slides_mc.gotoAndPlay("myStuff");

              }

               

              and thus for all your 7 menu items.