1 Reply Latest reply on Dec 10, 2006 8:23 AM by kglad

    ActionScript preloader

    bowlink
      Software: Macromedia Flash 8 Professional
      OS: Windows XP SP2

      I used the sample ActionScript code provided in the Flash 8 Professional online Help under the topic, "Creating a progress animation for loading SWF and image files," to create my own progress bar. When you test the ActionScript code, as written in the Help documentation, by putting it into Frame 1 of a new SWF file, you get a 500px x 700px screen showing a progress bar - with a black stroke and red bar - inserted at the default registration point (i.e., upper left of the screen). When the bar reaches 100%, a picture of a field of flowers appears off the external site, http://www.helpexamples.com/flash/images/gallery1/images/pic3.jpg.

      To customize the progress bar AxtionScript for my own needs, I edited the code so the progress bar would appear with a dark gray stroke and blue bar in the middle of a 780px x 250px screen. I tested the SWF and it worked fine. Next, I changed the URL in the last line of code from the "field of flowers" picture to an external SWF file that is to be an intro to a Web site. The intention is to have the progress bar appear while the intro SWF file is loading. However, when I retested the progress bar SWF, my blue progress bar appears in the middle of the screen as before - but so does the original red bar at the upper left registration point - at the same time. In addition, even though I changed the external URL to my intro SWF file, the picture of the field of flowers still pops up on top of my intro! How is that possible?

      Attached is the progress bar code prior to changing the external URL in the last line. See what happens when you change the URL.

      Any help debugging this is greatly appreciated!

      _____________________________________________________