MACROMEDIA FLASH 8-FLASH User Manual Page 16

  • Download
  • Add to my manuals
  • Print
  • Page
    / 22
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 15
16 About Flash Asset Xtra for Flash Player 8
ActionScript BitmapData objects can begin to consume a lot of memory while waiting for
Flash memory garbage collection to occur. To avoid excess memory usage, call the
dispose()
method to flush individual BitmapData objects from memory, as in the following:
-- Get a Lingo image object.
tImg = member("foo").image
-- Convert it to a BitmapData object and do some filter effects.
tBMP = convert(#bitmapdata,tImg)
-- Insert filter manipulation code here.
-- Convert it back to an image object
-- and dispose of the BitmapData object.
tImg = convert(#image,tBMP)
tBMP.dispose()
Translating image data types between
Lingo and ActionScript
The Flash Asset Xtra adds one new Lingo API, the convert() method, which converts image
data types between Lingo and ActionScript formats. This allows you to use new Flash Player 8
ActionScript classes to manipulate bitmap and vector images more expressively and display
them in a Director movie. It also allows you to render Lingo images in Flash sprites.
For more information, see About ActionScript image effects” on page 14.
About image data types
To use the ActionScript filter effect objects or drawing routines on an image, you must ensure
that the image is an ActionScript object. You must convert Lingo image data to an
ActionScript BitmapData object to apply any filter effects, use the ActionScript drawing API,
or render the image in a SWF file.
Conversely, an image must be a Lingo image object to be rendered in Director or to be
manipulated using Lingo imaging commands. For example, if you want to use Flash to add a
blur effect to a Lingo image object, you must convert the Lingo image to an ActionScript
BitmapData object, manipulate it in ActionScript, and convert it back to a Lingo image
object.
Page view 15
1 2 ... 11 12 13 14 15 16 17 18 19 20 21 22

Comments to this Manuals

No comments