Define Your Application on the Server

Defining your application on the server will be the most complex part of the whole process of getting connected. As you will see, it is not hard. Follow these steps:

  1. On your server, double-click My Computer and navigate to the flashcom\applications folder. (Default: c:\inetpub\wwwroot\flashcom\applications)

  2. Create a new folder within the applications folder called myFirstApp (see Figure 3.1).

    Figure 3.1. Create a new text document in the applications\myFirstApp folder.

    graphics/03fig01.gif

  3. Open the new myFirstApp folder, right-click, and select New, Text Document. Name the new file main.asc.

  4. Open the new main.asc file in Windows Notepad or your favorite JavaScript or HTML editor. Macromedia Dreamweaver MX users can open this file in Dreamweaver MX to take advantage of code hints and color coding.

  5. Enter the following line of code:

    load("components.asc"); 
    
  6. Save and close the file.

There is one line of code, but it isn't that complex, and from this point forward, that is the only code you will need to get connected. The main.asc file will be explained in detail in Chapters 5, "STEP 5: Monitoring and Managing the Server," and 11, "Server-Side ActionScript (SSAS)." The components.asc file is the server-side counterpart used by the Flash Communication UI components. It is a library file that loads the UI framework and the UI component's SSAS ActionScript objects.

The application is now ready as far as the server is concerned. Now, let's build the user interface in Flash MX.



    Part I: 10 Quick Steps for Getting Started