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.

Figure 18.1 Developing the football game<br />

Chapter 18: Sports simulations<br />

1 count = 1;<br />

2 for (i=0; i0) duplicateMovieClip ("Blue0", name, count++);<br />

5 eval(name).index = i;<br />

6 eval(name).Team.go<strong>to</strong>AndS<strong>to</strong>p(1);<br />

7 eval(name).teamno = _root.BLUE;<br />

8<br />

9 name = "Red" + I;<br />

10 duplicateMovieClip ("Blue0", name, count++);<br />

11 eval(name).index = i;<br />

12 eval(name).Team.go<strong>to</strong>AndS<strong>to</strong>p(2);<br />

13 eval(name).teamno = _root.RED;<br />

14 }<br />

15 _root.startGame();<br />

16 s<strong>to</strong>p();<br />

Listing 18.1<br />

283

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

Saved successfully!

Ooh no, something went wrong!