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

At the maximum end we have the value ‘FF’ which means<br />

15 ∗ 16 + 15 = 255<br />

Since each term red, green and blue can take a value between 0 and 255, the maximum number of<br />

colours that are possible is<br />

256 ∗ 256 ∗ 256 = 16777216<br />

A value of 255 in decimal is FF in hexadecimal and 11111111 in binary. That is, it takes 8 numbers<br />

<strong>to</strong> define the value in binary; each of these numbers is sometimes called a bit and a cluster of 8 bits is<br />

called a byte. Since the colour is defined using three 8-bit values there are in actual fact 24 bits used<br />

<strong>to</strong> define a colour, hence the term 24-bit colour.<br />

Netscape uses a different method <strong>to</strong> insert a <strong>Flash</strong> file. This is where the ‘EMBED’ tags come<br />

in. As usual the tag has a closing ‘’ tag. Within the tag the parameters are specified<br />

directly; ‘src’ gives the <strong>Flash</strong> movie name, ‘quality’ and ‘bgcolor’ are as previously described. Width<br />

and height are specified in the same way as used by the ‘OBJECT’ tag. The main difference is<br />

the way the application that will display the content is described. Instead of inserting an ActiveX<br />

control, Netscape uses a plug-in. The ‘type’ is defined; if this is not found on the client’s machine<br />

then the ‘pluginspage’ defines where <strong>to</strong> find the plug-in.<br />

Tell me about query strings<br />

Suppose inside <strong>Flash</strong> you want <strong>to</strong> set the value for the variable ‘configfile’ <strong>to</strong> ‘config/february.txt’.<br />

You can do this very easily by altering the specification for both the ‘movie’ parameter for IE and<br />

the ‘src’ parameter for Netscape.<br />

...<br />

<br />

<br />

<br />

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

Saved successfully!

Ooh no, something went wrong!