Flash Pro CS5.5 Code Snippets and Bitmaps

Flash Pro CS5.5 Code Snippets and Bitmaps
Since the beginning of FlashR, it has been the standard to use vector graphics as much as possible because the Flash Player processes vector graphics better than raster. Since the introduction of mobile devices, we need to think differently about the graphics we use in our mobile projects.

Because the mobile processors have a lower performance when asked to render vector graphics, we need to use raster graphics as much as possible. But we don't need to reinvent the wheel or redraw all of our graphics. Flash CS5.5 has new methods for exporting your vector graphics as bitmaps.

The first method is to simply select the object on the stage and choose Modify - Convert to Bitmap. From this point on, you will treat your graphic like any other bitmap including editing it in Photoshop.

But you may wish to keep your graphic editable as a vector graphic as long as possible while working on your project. In this case, you can set Flash to make the change when it exports your project. You will set this in the Properties panel. From the Display section, choose Export as Bitmap from the Render options.

One of the best new features for developing mobile apps in Flash Pro CS5.5 is the new code snippets. Before this upgrade, we needed to add code manually that would work with the mobile environment. But now the new snippets in the Code Snippets panel will add the code to your document and give you instructions as to how the code works so that you can customize the code for your project. Let's take a look at some of the code snippets for mobile devices.

In the Mobile Touch Events folder we have three snippets.

Tap Event
Touch and Drag Event
Long Press Event

In the Mobile Gesture Events folder we have five snippets.

Two Finger Tap Event
Pinch to Zoom Event
Pan Event
Rotate Event
Swipe Event

In the Mobile Actions folder we have five snippets.

Swipe to Go to Next/Previous Frame and Stop
Swipe to Go to Next/Previous Frame and Play
Move with Accelerometer
Deactivate/Activate Event
Menu Key Pressed Event

In the AIR for Mobile folder we have two snippets.

Show Geolocation
Re-orient Object on Device Rotation

In the AIR folder we have seven snippets

Click to Close AIR Window
Click to Minimize AIR Window
Click to Maximize or Restore AIR Window
Drag to Move Air Window
Click to Read from a Text File
Click to Write to a Text File
Save and load Preferences

*Adobe provided a review copy to me free of charge.

IMPORTANT: These app development tutorials are written with the Flash novice in mind. You will need to optimize your app beyond what is covered in these tutorials before finalizing your app for the app store.

Copyright 2018 Adobe Systems Incorporated. All rights reserved. Adobe product screen shot(s) reprinted with permission from Adobe Systems Incorporated. Adobe, Photoshop, Photoshop Album, Photoshop Elements, Illustrator, InDesign, GoLive, Acrobat, Cue, Premiere Pro, Premiere Elements, Bridge, After Effects, InCopy, Dreamweaver, Flash, ActionScript, Fireworks, Contribute, Captivate, Flash Catalyst and Flash Paper is/are either [a] registered trademark[s] or a trademark[s] of Adobe Systems Incorporated in the United States and/or other countries.

Related Articles
Editor's Picks Articles
Top Ten Articles
Previous Features
Site Map

Content copyright © 2022 by Diane Cipollo. All rights reserved.
This content was written by Diane Cipollo. If you wish to use this content in any manner, you need written permission. Contact Diane Cipollo for details.