02.02.2013 Views

Flash MX 2004 Games : Art to ActionScript

Flash MX 2004 Games : Art to ActionScript

Flash MX 2004 Games : Art to ActionScript

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Flash</strong> <strong>MX</strong> <strong>2004</strong> <strong>Games</strong><br />

you will find several new shortcuts under ‘Start/Programs/Macromedia/<strong>Flash</strong> <strong>MX</strong> Communication<br />

Server...’. Macromedia offer a lot of online support for <strong>Flash</strong> Communication Server so<br />

check out http://www.macromedia.com/devnet/mx/flashcom/ <strong>to</strong> learn more. The first thing<br />

<strong>to</strong> do once FCS is installed is <strong>to</strong> select the shortcut ‘Start/Programs/Macromedia/<strong>Flash</strong> <strong>MX</strong><br />

Communication Server/Welcome’.<br />

As an application developer you are probably best <strong>to</strong> choose the ‘Developer’ but<strong>to</strong>n. The following<br />

slides explain that <strong>Flash</strong> Communication Server has both a client side, i.e. what your<br />

users see, and a server side, which is a script running on the server that adds functionality<br />

<strong>to</strong> the communication between simultaneously connected users. Before you can do anything<br />

you will need <strong>to</strong> start the server. Simply choose ‘Start/Macromedia/<strong>Flash</strong> <strong>MX</strong> Communication<br />

Server/Start Server’. A command prompt window will open indicating that <strong>Flash</strong> Communication<br />

Server is starting. Once the server is running you can start <strong>to</strong> run content. Try running<br />

‘Examples/Chapter23/Multiuser.swf ’.<br />

Figure 23.7 ‘Examples/Chapter23/multiuser.swf ’<br />

Open three copies of the swf file and type in a different name for each one. With all three copies<br />

visible on screen notice how a change <strong>to</strong> one is echoed in another.<br />

A simple example<br />

Let’s look at how the communication in this simple example is achieved. Open ‘Examples/<br />

Chapter23/multiuser.fla’. The code for this example is all on frame 1 of the main timeline. Listing<br />

23.1 shows most of the <strong>ActionScript</strong>; there are two gaps, between lines 24 and 49, where the code<br />

364

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!