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 />

5 }else {<br />

6 // add code for other platforms<br />

7 }<br />

Listing 20.4<br />

So what’s missing?<br />

In truth, for a game developer, not a lot is missing from the PPC version of <strong>Flash</strong> Player rather than<br />

the desk<strong>to</strong>p one. The main features that are missing are links <strong>to</strong> the <strong>Flash</strong> Communication Server,<br />

printing and support for monochrome displays. Whenever you refer <strong>to</strong> the absolute location of<br />

a file you must include the ‘file://’ pro<strong>to</strong>col. So if a text file used <strong>to</strong> s<strong>to</strong>re variable values is at<br />

‘/Program Files/<strong>Flash</strong><strong>MX</strong><strong>2004</strong><strong>Games</strong>/variables.txt’ and you wish <strong>to</strong> use absolute file names in a<br />

call <strong>to</strong> ‘loadVariables’ then the code <strong>to</strong> use would be:<br />

loadVariablesNum("file:///Program%20Files/<strong>Flash</strong><strong>MX</strong><strong>2004</strong><strong>Games</strong>/<br />

variables.txt", 0);<br />

PPCs use / as the root of all files. So a file s<strong>to</strong>red at the root would still require ‘/myfile.txt’ <strong>to</strong><br />

access. When calling files using <strong>ActionScript</strong> convert the backslash <strong>to</strong> a forward slash and replace<br />

spaces with ‘%20’. PIE does not support percentage sizes for document elements. Therefore if<br />

you used<br />

New Symbol...’ from the main menu.<br />

322

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

Saved successfully!

Ooh no, something went wrong!