Testing and Debugging the Tech Bookstore


At this point, the Tech Bookstore should look somewhat complete. You can navigate between each page with your menus and buttons, thanks to the ActionScripts you added through the last two lessons. The content loads into each page because of the Loader components you added in the previous exercises, and you even have preloaders for the content that's loading (even if you don't see the progress because your hard drive is too fast!). Now it's time to test each of the areas and make sure that your content loads in and the ProgressBar component instances work correctly. You've been testing from time to time, just to make sure things work, but here you'll go over testing in just a little more detail.

At this point, you might have some modifications to make if things don't work exactly as you expect them to or if something is not loading in. The first thing you want to do is ensure that all your files are in the correct place in the TechBookstore folder and any other folders that you created within. You might have added new folders yourself and need to modify where the URLs point or you chose not to create folders at all and have everything in the TechBookstore folder (a bit messier, but easier when you're just starting out, which is why we chose to do it this way).

The Bandwidth Profiler allows you to determine the download performance of your SWF file by simulating what the SWF file will look like when it's loaded in using different bandwidth settings (such as phone modems and so forth).

Note

When your file is cached, sometimes it appears to load in more quickly than the bandwidth profile you have set. You might also run into problems with the SWF file not showing up if you choose to simulate a download (by pressing Ctrl+Enter or Cmd+Enter a second time), which occurs intermittently.


The Profiler shows you the amount of data stored on each frame in the SWF file. This shows you how much information you should preload before displaying the content of the SWF file. If a SWF file is "streaming," it might stall out at a frame with more content than the others. This causes the playback to not be as smooth as you might want it to be. Remember that your content is always progressively downloading from the server instead of truly streaming. You will find out more about the Bandwidth Profiler later in this exercise.

1.

Open bookstore14.fla and check the SWF file in the Bandwidth Profiler.

The Bandwidth Profiler can be accessed while testing the SWF file in the testing environment. Select Control > Test Movie or press Ctrl+Enter, and when you're in the testing environment you can select View > Bandwidth Profiler from the main menu or press Ctrl+B.

The Bandwidth Profiler displays lots of useful information, such as the dimensions of the Stage, the current frame rate, the size of the SWF file in kilobytes (as well as bytes), the number of frames in the SWF file, and the number of seconds it takes to play the SWF file back to a visitor.

The Bandwidth Profiler also includes a graph that shows how much data is being sent by each frame, which helps you optimize the SWF file. If one frame has too much information and ends up slowing down the playback, you might want to move some of that data onto another frame that contains much less. Another feature closely tied to the Bandwidth Profiler is the ability to simulate download times within the Flash testing environment. By using View > Simulate Download, you can simulate the playback of your Flash SWF file when a visitor is using a slower modem. This helps you see how the SWF file plays back at on computers with slower Internet connections (such as dial-up access) and determines how long it takes before users can see content.

2.

Choose to simulate a download setting; then test all your menu buttons to verify one last time that your progress bars are all working and your buttons are also all working.

You can modify the speeds at which you want to simulate playback by selecting a setting from the View > Download Settings menu. Speeds range greatly, from 14.4 dial-up access at 1.2 K per second to a significantly faster T1 connection at 131.2 K per second. If there are specific speeds you want to test at that aren't present in the list, you have the option of adding up to three custom download settings that you can set the number of bytes per second to test at. Testing your SWF file at several different speeds is always a good idea because it gives you a general concept of how long it takes before the visitor sees content. This can greatly affect the general website "experience," and as Macromedia says, "Experience Matters." If users have to wait for a long time for your SWF file to load, often they will give up and leave the site before even seeing any of your Flash content at all.

Make sure you test every menu option and every button you have. Fill out the feedback and questionnaire forms and make sure that they are working as well. Ensure that all your images and SWF files are loading into the interface. Try to find errors and fix any that you find.

3.

Save a new version of the bookstore14.fla file as techBookstore.fla.

That's right, a new filename to complete all those bookstore files. Indeed, you are finished building the Tech Bookstore FLA files and all of its many associated and assorted SWF files. The only thing that's left to do is go through publishing the files and then putting them online. The hard part is over, and you should be really proud of all the assorted things that you've learned so far.




Macromedia Flash 8. Training from the Source
Macromedia Flash 8: Training from the Source
ISBN: 0321336291
EAN: 2147483647
Year: 2004
Pages: 230
Authors: James English

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net