What is ActionScript? - Variables
(Page 4 of 5 )
A variable is a container that holds information. The container itself is always the same, but the contents can change. By changing the value of a variable as the SWF file plays, you can record and save information about what the user has done, record values that change as the SWF file plays, or evaluate whether a condition is true or false.
New features and changes in ActionScript language elements
There are many changes and new elements were added in ActionScript 2.0. If you intend to use any of the following elements you need to target your applications to flash player 7 and later.
MovieClipLoader class: Very useful class which lets you monitor the progress of files (SWF or JPEG) as they are loaded into movie clips. The methods and properties available with this class let you monitor the progress of loading files and perform various tasks based on the loading information.
NetConnection class and NetStream class: These classes let you stream local Flash Video (FLV) files and control them.
Sound.onID3 and Sound.id3: Event handler and property to provide access to ID3 data associated with a Sound object that contains in an MP3 file.
Array.sort() and Array.sortOn(): These new methods let you perform additional sorting options, such as ascending and descending sorting, whether to consider case-sensitivity when sorting, and so forth.
System class: This class has several new objects and methods, and the System.capabilities object has several new properties.
TextField.condenseWhite: This property can be used to remove extra white space from HTML text.
TextField.mouseWheelEnabled: This property can be used to specify whether a text field's contents should scroll when the mouse pointer is positioned over a text field and the user rolls the mouse wheel.
TextField.StyleSheet class: This Class lets you create a style sheet object that contains text formatting rules such as font size, color, and other formatting styles.
TextField.styleSheet: This property lets you attach a style sheet object to a text field.
TextFormat.getTextExtent(): This method accepts a new parameter, and the object it returns contains a new member.
XML.addRequestHeader(): This method lets you add or change HTTP request headers sent with POST actions.
Mouse.onMouseWheel: This event listener will be generated when the user scrolls using the mouse wheel.
MovieClip.getNextHighestDepth(): This method lets you create MovieClip instances at runtime and be guaranteed that their objects render in front of the other objects in a parent movie clip's z-order space.
MovieClip.getInstanceAtDepth(): This method lets you access dynamically created MovieClip instances using the depth as a search index.
MovieClip.getSWFVersion(): This method lets you determine which version of Flash Player is supported by a loaded SWF file.
MovieClip.getTextSnapshot(): This method and the "TextSnapshot object" let you work with text that is in static text fields in a movie clip.
MovieClip._lockroot: This property lets you specify that a movie clip will act as _root for any movie clips loaded into it or that the meaning of _root in a movie clip won't change if that movie clip is loaded into another movie clip.
Next: Debugging changes >>
More Flash Articles
More By Adi Reddy Mora