Testing the Project

This is a complex project with a lot of moving parts that might fail. Testing and debugging applications might be daunting, but you should know where to look if something is not working. The list below is a checklist of things to consider if your application is not working as it should.

  • Ensure the Flash Communication Server is running and is accessible by your Flash movie.

  • Ensure the RTMP connection string is correct on the Actions layer at Frame 1.

  • Ensure you reload your application each time you make a change to the main.asc file.

  • Check the spelling in ActionScript and in the Properties window of each object. This is usually the source of many problems. Remember, SSAS is case sensitive. You should practice case-sensitive code in Flash MX ActionScript just to get into the habit.

  • If the play head isn't moving, ensure that you are responding properly to the Netconnection.onStatus code, NetConnection.Connect.Success.

  • Check the Client prototype in the main.asc file. You can test the syntax of the main.asc file by copying the entire source code into the ActionScript editor of a new Flash movie, and running the Code Checker on it. This will output any compile errors that might occur when the application instance is loaded. When you have fixed all errors, copy the script back into the main.asc file and reload your application.

  • If the server is rejecting your connection, ensure your main.asc file is created and is running the application.acceptConnection() method.

  • If components are not connecting, check spelling and check that you are connecting to the NetConnection.

  • If the movie plays without stopping, ensure you have stop() commands on Frames 1, 10, and 20 at the bottom of the ActionScript.

  • If the playhead won't move to the Controller frame, remember that the login is case sensitive. Check the value you are checking for on the server, and enter the exact name in the login box.

  • If the presentation is not loading, ensure the Flash (SWF) movie is being called from the correct location relative to the presetationApp.swf file. Ensure that the file exists and check spelling. The presentation will not load until the controller has logged in.

Troubleshooting can be the longest part of developing your projects, so heavy commenting and descriptive variable names will help you step through your project and isolate errors that might occur. Refer to the end of Chapters 11, "Server-Side ActionScript (SSAS)," and 12, "Client-Side (Flash) ActionScript," for additional troubleshooting tips for SSAS and Flash ActionScript.

When you are satisfied that your application is working as it should, remember to comment out or remove the line #include "NetDebug.as" from your ActionScript. This code will add undo size to the SWF file.

    Part I: 10 Quick Steps for Getting Started