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.

Chapter 6: Creating artwork for mobile devices<br />

the content <strong>to</strong> the target resolution. Figure 6.3 shows a highly detailed image. The image uses<br />

4836 curves for the background and 452 curves for the helicopter and stunt man.<br />

Figure 6.3 Developing a PocketPC game<br />

The project was developed as a simple demonstration; you can open it as ‘Examples/<br />

Chapter06/detail01.fla’. Some simple <strong>ActionScript</strong> sends the helicopter across the screen and back.<br />

As it does this it updates the fps (frames per second) display every 10 screen updates. The movie<br />

should run at 20 fps. When transferred <strong>to</strong> a 200 MHz PocketPC it dropped <strong>to</strong> just 2 fps as the<br />

helicopter reached the middle of the screen. At this point <strong>Flash</strong> has <strong>to</strong> redraw all the anti-aliased<br />

lines for the background behind the helicopter and the helicopter itself. So what can we do <strong>to</strong><br />

improve the frame rate? ‘Examples/Chapter06/detail02.fla’ shows exactly the same scene. This<br />

time both the background image and the helicopter are bitmap images. This time on the same<br />

machine the frame rate stayed up at 8 fps. If we also set the quality <strong>to</strong> medium, then the frame<br />

rate maintained 12 fps. On the small screen with a reduced colour depth there is little discernible<br />

difference between the two except for frame rate. Creating the bitmap images is very simple:<br />

1 Create the content in <strong>Flash</strong> as you would normally.<br />

2 Use ‘File/Export/Export Image...’.<br />

75

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

Saved successfully!

Ooh no, something went wrong!