Avoid duplicate content penalties in Google & spin unique versions of your articles 100% free!
Powered by MaxBlogPress  

Feb
2nd

Working With The Display List In Flash ActionScript 3 Share/Save/Bookmark

Files under software | Posted by Andrew Whiteman
No Gravatar
by Andrew Whiteman

Flash ActionScript 3 has drastically changed and improved the way in which visual elements are added to a project. In fact, in previous versions, visual elements were not treated as belonging to the same group: different coding techniques was required to handle different visual elements. ActionScript 3 rationalises the process of working with all visual assets by introducing a new, flexible and powerful concept called the display list.

The display list is a built-in inventory of all visual elements residing in an application and, like the document object model found in JavaScript, it has a hierarchical structure. It contains a motley crew of elements such as movie clips, sprites (single frame movie clips), shapes, bitmaps and video.

One important distinction that should be made between the elements in the display list is that between display objects and display object containers. Objects such as movie clips are known as display object containers since they are capable of containing other display objects. Objects such as bitmaps, video and vector shapes (which cannot contain other objects), are simply known as display objects.

ActionScript 3 has an extensive syntax for manipulating the display list: display objects can be added and removed and there are a variety of ways of targeting objects within the display list hierarchy.

The Stage is the object which resides at the top of the display list hierarchy since it contains the entire Flash movie. Next, drilling down, we have the main timeline of the movie; and then we have all the various types of visual objects, divided into containers and objects. The main types of display object containers are movie clips, sprites and loaders.

Movie clips have been around in Flash forever; they are a bit like clones of the main movie, each movie clip having its own timeline. Sprites are a new to ActionScript 3: they are basically movie clips without a timeline into which other objects can be placed. Their relative simplicity makes them ideal candidates for ActionScript animation. The loader class, also new to ActionScript 3, is used specifically as a container into which external assets such as bitmaps and SWF files can be loaded.

As for objects which cannot act as containers, Shapes are vector objects usually created using Flash’s vector drawing tools. There is also a new class of object referred to as an Interactive Objects. This class includes simple buttons with an over, up and down state as well as text fields. There are two types of text field: dynamic text fields whose output can be manipulated with ActionScript and input text fields which can accept input from the user.

About the Author:

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • NewsVine
  • Reddit
  • StumbleUpon
  • YahooMyWeb
  • Google Bookmarks
  • Yahoo! Buzz
  • TwitThis
  • Live
  • LinkedIn
  • Pownce
  • MySpace

  Post to Plurk  Post to Delicious  Post to Digg  Post to Reddit  Post to StumbleUpon

Viewed 57 times by 14 viewers


You Also might be interested to read..





Post a Comment

This site is using OpenAvatar based on
Security Code: