Reviews & Opinions
Independent and trusted. Read before buy Macromedia Flash 8 - Components Language Reference!

Macromedia Flash 8 - Components Language Reference


Bookmark
Macromedia Flash 8 - Components Language Reference

Bookmark and Share

 

Macromedia Flash 8 - Components Language ReferenceActionScript 2.0 language reference for Macromedia Flash 8 [Book]

By Francis Cheng - Macromedia Press (2006) - Paperback - 1370 pages - ISBN 0321384040

The "ActionScript 2.0 Language Reference for Macromedia Flash 8" is a comprehensive reference manual that describes the application programming interface (API) for Macromedia Flash Player, the most pervasive client runtime environment in the world. It includes valuable syntax and usage information; detailed descriptions of classes, functions, properties, and events; and copy-and-paste code samples for every element in the ActionScript language. The "ActionScript 2.0 Language Refer... Read more
[ Report abuse or wrong photo | Share your Macromedia Flash 8 - Components Language Reference photo ]

 

 

Manual

Preview of first few manual pages (at low quality). Check before download. Click to enlarge.
Manual - 1 page  Manual - 2 page  Manual - 3 page 

Download (English)
Macromedia Flash 8-components Language Reference, size: 10.5 MB

 

Macromedia Flash 8 - Components Language Reference

 

 

User reviews and opinions

<== Click here to post a new opinion, comment, review, etc.

Comments to date: 10. Page 1 of 1. Average Rating:
dozzi20 7:49am on Monday, October 25th, 2010 
This product is great exactly what i was looking for fast and a lot of space.. i use this product in my camcorder in it works perfect... Easy To Use,... Relatively fast, reliable. Great value. Great Value,Large Capacity None It works just fine with a Canon underwater camera. I bought two of these and have had no problems. Large Capacity
Johann Kruger 9:43am on Wednesday, October 13th, 2010 
Been using for over a month now and absolutely love the boost in performance this offers my gaming laptop. NONE MADE MY COMPUTER FASTER AND WAS COMPATIBLE WITH ASUS LAPTOP NONE FAST SHIPPMENT GREAT SERVICE GREAT PRODUCT
Gorikol 1:19am on Thursday, September 16th, 2010 
I use this card in my Sony HD video camera to capture movies and photos. I love the capacity and it works flawlessly, just as I expected. I liked this a lot. Easy To Use,Great Value
Dirkie 6:18pm on Wednesday, August 18th, 2010 
Keep making good stuff What can I say. Keep fitting more data onto little devices like this and the hard drive will one day be obsolete. Oh.
rabauke 3:01pm on Thursday, July 22nd, 2010 
I used digital camara. Easy To Use Capability Issues Amazing what the mediaware can offer these days. This is fast, and value for the money is excellent.
Vorlagens.info 3:07pm on Sunday, April 25th, 2010 
cheap Bought 3 all failed replace all failed again low price, good performance, CF Type I versatility not USB enabled (for use in JumpShot ect.), actual capacity
dps_kane 5:13am on Saturday, April 24th, 2010 
If all the cards come with the same product packaging, then it is a little hard to open without a scissor! Everything is well made. the ultra is 5 times faster than the regular memory cards, its great if you dont want to miss a moment.
cobain_ko 11:35am on Thursday, April 1st, 2010 
"First dlsr, sony a200 and this works very well. When I use the camera in jpj. mode I can shoot and store up to 990 pictures. "I purchased this card to start shooting with my Canon Rebel XTi in RAW mode. It has never stuttered or slowed me down. "I have been using this guy for more than a year now Closer to 2 i think. I spend a lot of time in the great outdoors, and up in Northern Minnesota.
orsb 11:33am on Sunday, March 21st, 2010 
Music Skipped The card was faster than my Sandisk Class 2 16BG card. Very fast works amazing for GBA EMU carts. Games I play from my gba4two are faster than actually using the real carts thanks to this memory card. Very Fast MicroSD card I think if anyone owns an Android phone, they should upgrade to a class 6 micro sd card.
Pat Brown 3:59am on Thursday, March 11th, 2010 
Holds quite a heavy lot of stuffs. I really doubt if carrying music or instant storing can get easier than this. WE PURCHASED A NEW CAMERA AND MEMORY CARD. WHILE WE ENJOY BOTH ITEMS NOW. I use these cards in my Nikon D90 and they work perfectly. Gives me about 350 exposes RAW+JPEG(fine), and video looks very smooth....

Comments posted on www.ps2netdrivers.net are solely the views and opinions of the people posting them and do not necessarily reflect the views or opinions of us.

 

Documents

doc0

Tween class UIComponent class UIEventDispatcher class UIObject class
Lets you use ActionScript to move, resize, and fade movie clips easily on the Stage. Provides methods, properties, and events that allow components to share some common behavior. Allows components to emit certain events. This class is mixed in to the UIComponent class. The base class for all components.

Accordion component

The Accordion component is a navigator that contains a sequence of children that it displays one at a time. The children must be objects that inherit from the UIObject class (which includes all components); most often, children are a subclass of the View class. This includes movie clips assigned to the class mx.core.View. To maintain tabbing order in an accordions children, the children must also be instances of the View class.
The Accordion component is supported only if you are working in a document that specifies ActionScript 2.0 in its Publish Settings.
An accordion creates and manages header buttons that a user can click to navigate between the accordions children. An accordion has a vertical layout with header buttons that span the width of the component. One header is associated with each child, and each header belongs to the accordionnot to the child. When a user clicks a header, the associated child is displayed below that header. The transition to the new child uses a transition animation. An accordion with children accepts focus, and changes the appearance of its headers to display focus. When a user tabs into an accordion, the selected header displays the focus indicator. An accordion with no children does not accept focus. Clicking components that can take focus within the selected child gives them focus. When an Accordion instance has focus, you can use the following keys to control it:
Down Arrow, Right Arrow Up Arrow, Left Arrow End Enter/Space Home
Moves focus to the next child header. Focus cycles from last to first without changing the selected child. Moves focus to the previous child header. Focus cycles from first to last without changing the selected child. Selects the last child. Selects the child associated with the header that has focus. Selects the first child.

Page Down Page Up Shift+

Selects the next child. Selection cycles from the last child to the first child. Selects the previous child. Selection cycles from the first child to the last child. Moves focus to the previous component. This component may be inside the selected child, or outside the accordion; it is never another header in the same accordion. Moves focus to the next component. This component may be inside the selected child, or outside the accordion; it is never another header in the same accordion.

To create and use a custom validator class:
class OddNumbersOnly extends mx.data.binding.CustomValidator { public function validate(value) { // make sure the value is of type Number var n = Number(value); if (String(n) == "NaN") { this.validationError("'" + value + "' is not a number."); return; } // make sure the number is odd if (n % 2 == 0) { this.validationError("'" + value + "' is not an odd number."); return; } // data is OK, no need to do anything, just return } }
Save the file as OddNumbersOnly.as.
The name of the AS file must match the name of the class.

4. 5. 6.

Select File > New and choose Flash File (ActionScript 2.0). Open the Components panel. Drag a NumericStepper component from the Components panel to the Stage and name it stepper. Drag a Label component to the Stage and name it textLabel. Drag a TextArea component to the Stage and name it status. Select the NumericStepper component, and open the Component inspector. button. Select the Value property (the only one) in the Add Bindings dialog box, and click OK.
10. Select the Bindings tab in the Component inspector, and click the Add Binding (+) 11.

12. Double-click 13.

the Bound To field to open the Bound To dialog box.
In the Bound To dialog box, select the Label component in the Component Path pane and its text property in the Schema Location pane. Click OK. the Label component on the Stage, and click the Schema tab in the Component inspector. the Schema Attributes pane, select Custom from the Data Type pop-up menu. Double-click the Validation Options field in the Schema Attributes pane to open the Custom Validation Settings dialog box. In the ActionScript Class text box, enter OddNumbersOnly, which is the name of the ActionScript class you created previously. Click OK. Open the Timeline and select the first frame on Layer 1. the Actions panel. the following code to the Actions panel:

14. Select 15. In 16.

19. Open 20.Add
function dataIsInvalid(evt) { if (evt.property == "text") { status.text = evt.messages; } } function dataIsValid(evt) { if (evt.property == "text") { status.text = "OK"; } } textLabel.addEventListener("valid", dataIsValid); textLabel.addEventListener("invalid", dataIsInvalid); 21. Save 22.Test

Method; fetches the current value of the field, using the information in the fields schema to process the value. If the field can provide a value as the first data type specified in the suggestedTypes array, the method returns the fields value as that data type. If not, the method attempts to extract the fields value as the second data type specified in the suggestedTypes array, and so on. If you specify null as one of the items in the suggestedTypes array, the method returns the value of the field in the data type specified in the Schema tab of the Component inspector. Specifying null always results in a value being returned, so only use null at the end of the array. If a value cant be returned in the form of the one of the suggested types, it is returned in the type specified in the Schema tab.
This example attempts to get the value of a field (productInfo.available) in an XMLConnector components results property first as a number or, if that fails, as a string.
import mx.data.binding.DataType; import mx.data.binding.TypedValue; var f: DataType = myXmlConnector.getField("results", "productInfo.available"); var b: TypedValue = f.getAnyTypedValue(["Number", "String"]);

DataType.getAsBoolean()

dataTypeObject.getAsBoolean()

A Boolean value.

Method; fetches the current value of the field and converts it to Boolean form, if necessary.
In this example, a field named propName that belongs to a component named myComponent is retrieved as a Boolean value, and assigned to a variable:
var dataTypeObj:mx.data.binding.DataType = myComponent.getField("propName"); var propValue:Boolean = dataTypeObj.getAsBoolean();

DataType.getAsNumber()

Flash Player 6.
dataTypeObject.getAsNumber()

A number.

Method; fetches the current value of the field and converts it to Number form, if necessary.
In this example, a field named propName that belongs to a component named myComponent is retrieved as a number, and assigned to a variable:
var dataTypeObj:mx.data.binding.DataType = myComponent.getField("propName"); var propValue:Number = dataTypeObj.getAsNumber();

DataType.getAsString()

dataTypeObject.getAsString()
Method; fetches the current value of the field and converts it to String form, if necessary.
In this example, a property named propName that belongs to a component named myComponent is retrieved as a string and assigned to a variable:
var dataTypeObj:mx.data.binding.DataType = myComponent.getField("propName"); var propValue:String = dataTypeObj.getAsString();

DataGrid.cellFocusOut DataGrid.cellPress
DataGrid.change DataGrid.columnStretch DataGrid.headerRelease
The following table lists the events the DataGrid class inherits from the UIObject class.
Broadcast when an object is about to draw its graphics. Broadcast when an objects state changes from visible to invisible. Broadcast when subobjects are being created. Broadcast when the object has moved. Broadcast when an object has been resized.
Broadcast when an objects state changes from invisible to visible. Broadcast when the subobjects are being unloaded.
The following table lists the events the DataGrid class inherits from the UIComponent class.
Events inherited from the List class
The following table lists the events the DataGrid class inherits from the List class.

List.change

Broadcast whenever user interaction causes the selection to change. Broadcast when the mouse pointer rolls over and then off of list items. Broadcast when the mouse pointer rolls over list items. Broadcast when a list is scrolled.

List.itemRollOut

List.itemRollOver List.scroll

DataGrid.addColumn()

myDataGrid.addColumn(dataGridColumn) myDataGrid.addColumn(name)

dataGridColumn name

An instance of the DataGridColumn class.
A string that indicates the name of a new DataGridColumn object to be inserted.
A reference to the DataGridColumn object that was added, or returns the string that indicates the name of the new column.
Method; adds a new column to the end of the data grid. For more information, see DataGridColumn class on page 301.
This example shows three different ways of creating columns for a DataGrid component. With a DataGrid instance named my_dg on the Stage, paste the following code in the first frame of the main timeline (notice that it imports the DataGridColumn class first):
import mx.controls.gridclasses.DataGridColumn; var my_dg:mx.controls.DataGrid; my_dg.setSize(320, 240); // Add columns to grid. my_dg.addColumn("Red"); // Add another column to grid. my_dg.addColumn(new DataGridColumn("Green")); // Add a third column to grid. var blue_dgc:DataGridColumn = new DataGridColumn("Blue"); blue_dgc.width = 140; blue_dgc.headerText = "Blue Column:"; my_dg.addColumn(blue_dgc);

DataGrid.addColumnAt()

myDataGrid.addColumnAt(index, name) myDataGrid.addColumnAt(index, dataGridColumn)
The index position at which the DataGridColumn object is added. The first position is 0. A string that indicates the name of the DataGridColumn object. An instance of the DataGridColumn class.

Removing an ActionScript cue point
You can remove an ActionScript cue point using the removeASCuePoint() method. The following example removes the cue point ASpt2 when cue point ASpt1 occurs:
var listenerObject:Object = new Object(); listenerObject.cuePoint = function(eventObject:Object):Void { trace("Cue point name is: " + eventObject.info.name); if (eventObject.info.name == "ASpt1") { my_FLVPlybk.removeASCuePoint("ASpt2"); trace("Removed cue point ASpt2"); } } my_FLVPlybk.addEventListener("cuePoint", listenerObject);
For more information, see FLVPlayback.removeASCuePoint() on page 634.
Playing multiple FLV files
You can play FLV files sequentially in an FLVPlayback instance simply by loading a new URL in the contentPath property when the previous FLV file finishes playing. For example, the following ActionScript code listens for the complete event, which occurs when an FLV file finishes playing. When this event occurs, the code sets the name and location of a new FLV file in the contentPath property and calls the play() method to play the new video.
import mx.video.*; my_FLVPlybk.contentPath = "http://www.helpexamples.com/flash/video/ clouds.flv"; var listenerObject:Object = new Object(); // listen for complete event; play new FLV listenerObject.complete = function(eventObject:Object):Void { if (my_FLVPlybk.contentPath == "http://www.helpexamples.com/flash/video/ clouds.flv") { my_FLVPlybk.play("http://www.helpexamples.com/flash/video/water.flv"); } }; my_FLVPlybk.addEventListener("complete", listenerObject);
Using multiple video players
You can also open multiple video players within a single instance of the FLVPlayback component to play multiple videos and switch between them as they play. You create the initial video player when you drag the FLVPlayback component to the Stage. The component automatically assigns the initial video player the number 0 and makes it the default player. To create an additional video player, simply set the activeVideoPlayerIndex property to a new number. Setting the activeVideoPlayerIndex property also makes the specified video player the active video player, which is the one that will be affected by the properties and methods of the FLVPlayback class. Setting the activeVideoPlayerIndex property does not make the video player visible, however. To make the video player visible, set the visibleVideoPlayerIndex property to the video players number. For more information on how these properties interact with the methods and properties of the FLVPlayback class, see FLVPlayback.activeVideoPlayerIndex on page 545 and FLVPlayback.visibleVideoPlayerIndex on page 684.
The following ActionScript code loads the contentPath property to play an FLV file in the default video player and adds a cue point for it. When the ready event occurs, the event handler opens a second video player by setting the activeVideoPlayerIndex property to the number 1. It specifies an FLV file and a cue point for the second video player and then makes the default player (0) the active video player again.

Media.displayFull()

Media.displayNormal()

Media.getCuePoint()

Media.pause()

Media.play()

Media.removeAllCuePoints()

Media.removeCuePoint()

Media.setMedia()

Media.stop()

Property summary for the Media class
The following table lists properties of the Media class.

Media.activePlayControl

MediaController Determines the component state when loaded at runtime. MediaDisplay, Determines if the component instance MediaPlayback maintains its video aspect ratio. MediaDisplay, Determines if the component instance MediaPlayback immediately starts to buffer and play. MediaDisplay, Determines the size of the media-viewing MediaPlayback portion of the MediaDisplay or MediaPlayback component. MediaController Determines if the component instance draws its chrome background. MediaDisplay, Read-only; the number of bytes loaded that MediaPlayback are available for playing. MediaDisplay, The number of bytes to be loaded into the MediaPlayback component instance. MediaDisplay, A string that holds the relative path and MediaPlayback filename of the media to be streamed and played. MediaController Determines whether the controller is hidden , when instantiated and only appears when MediaPlayback the user moves the mouse over the controllers collapsed state. MediaPlayback Determines where the components controls are positioned. MediaDisplay, An array of cue point objects that have been MediaPlayback assigned to a given component instance. MediaController Determines the orientation of the component instance. MediaDisplay, Determines the type of media to be played. MediaPlayback MediaDisplay, Holds the current position of the playhead MediaPlayback (in seconds) for the media timeline that is playing.

Media.aspectRatio

Media.autoPlay

Media.autoSize

Media.backgroundStyle

Media.bytesLoaded

Media.bytesTotal

Media.contentPath

Media.controllerPolicy

Media.controlPlacement

Media.cuePoints

Media.horizontal

Media.mediaType

Media.playheadTime

Media.playing
MediaDisplay, For MediaDisplay and MediaPlayback, this MediaPlayback, property is read-only and returns a Boolean MediaController value to indicate whether a given component instance is playing media. For MediaController, this property is read/write and controls the image (playing or paused) displayed on the Play/Pause button of the controller. MediaDisplay, The default value of the height of a FLV file. MediaPlayback MediaDisplay, The default value of the width of a FLV file. MediaPlayback MediaDisplay, An integer that indicates the total length of MediaPlayback the media, in seconds. MediaDisplay, An integer from 0 (minimum) to 100 MediaPlayback (maximum) that represents the volume level.

Using styles with the Menu component
You can call the setStyle() method to change the style of the menu, its items, and its submenus.The Menu component supports the following styles:
The base color scheme of a component. Possible values are "haloGreen", "haloBlue", and "haloOrange". The default value is "haloGreen". Specifies colors for rows in an alternating pattern. The value can be an array of two or more colors, for example, 0xFF00FF, 0xCC6699, and 0x996699. Unlike single-value color styles, alternatingRowColors does not accept color names; the values must be numeric color codes. By default, this style is not set, and backgroundColor is used in its place for all rows.
The background color of the menu. The default color is white and is defined on the class style declaration. This style is ignored if alternatingRowColors is specified. The background color when the components enabled property is set to false. The default value is 0xDDDDDD (medium gray). The Menu component uses a RectBorder instance as its border and responds to the styles defined on that class. See RectBorder class on page 1065. The default border style is "menuBorder".
The text color. The color for text when the component is disabled. The default color is 0x848384 (dark gray). A Boolean value that indicates whether the font specified in fontFamily is an embedded font. This style must be set to true if fontFamily refers to an embedded font. Otherwise, the embedded font is not used. If this style is set to true and fontFamily does not refer to an embedded font, no text is displayed. The default value is false. The font name for text. The default value is "_sans". The point size for the font. The default value is 10. The font style: either "normal" or "italic". The default value is "normal". The font weight: either "none" or "bold". The default value is "none". All components can also accept the value "normal" in place of "none" during a setStyle() call, but subsequent calls to getStyle() return "none". The text alignment: either "left", "right", or
The text decoration: either "none" or "underline". The default value is "none". A number indicating the text indent. The default value is 0.
The name of the default icon to display on each row. The default value is undefined, which means no icon is displayed. The icon property is not required, does not work for "check", "radio", or "separator" items, and uses the linkage identifier of an image asset as the value parameter. All menu items show the same icon. The duration of the transition as a menu opens. The value is specified in milliseconds; 0 indicates no transition. The default value is 150. The background color of a rolled-over row. The default value is 0xE3FFD6 (bright green) with the Halo theme and 0xAAAAAA (light gray) with the Sample theme. When themeColor is changed through a setStyle() call, the framework sets rollOverColor to a value related to the themeColor chosen.

scrollPaneInstance.hPosition
Property; orients the scroll panes contents in pixels, and adjusts the horizontal scroll box (thumb) proportionally. The 0 position is at the left end of the scroll track, which causes the left edge of the scroll pane content to be visible in the scroll pane.
This example creates a ScrollPane instance called my_sp, loads it with an image, and creates a listener to handle the scroll event and display the horizontal (hPosition) and vertical (vPosition) scroll positions as the user clicks the scroll bar.
/** Requires: - ScrollPane component in library */ this.createClassObject(mx.containers.ScrollPane, "my_sp", 10); my_sp.setSize(360, 280); System.security.allowDomain("http://www.helpexamples.com"); my_sp.contentPath = "http://www.helpexamples.com/flash/images/image1.jpg"; // Scroll 100 pixels when clicking on horizontal bar. my_sp.hPageScrollSize = 100; // Create Listener Object. var spListener:Object = new Object(); spListener.scroll = function(evt_obj:Object) { trace("hPosition = " + my_sp.hPosition + ", vPosition = " + my_sp.vPosition); } // Add listener. my_sp.addEventListener("scroll", spListener);
scrollPaneInstance.hScrollPolicy
Property; determines whether the horizontal scroll bar is always present ("on"), is never present ("off"), or appears automatically according to the size of the image ("auto"). The default value is "auto".
The following example creates an instance of a ScrollPane called my_sp, sets hScrollPolicy to off to prevent a horizontal scroll bar from appearing, and loads it with an image.
/** Requires: - ScrollPane component in library */ this.createClassObject(mx.containers.ScrollPane, "my_sp", 10); my_sp.setSize(360, 280); my_sp.hScrollPolicy = "off"; System.security.allowDomain("http://www.helpexamples.com"); my_sp.contentPath = "http://www.helpexamples.com/flash/images/image1.jpg";

ScrollPane.progress

var listenerObject:Object = new Object(); listenerObject.progress = function(eventObject:Object) { //. }; scrollPaneInstance.addEventListener("progress", listenerObject);
Event; broadcast to all registered listeners while content is loading. The progress event is not always broadcast; the complete event may be broadcast without any progress events being dispatched. This can happen especially if the loaded content is a local file. Your application triggers the progress event when the content starts loading by setting the value of the contentPath property.
The first usage example uses a dispatcher/listener event model. A component instance (scrollPaneInstance) dispatches an event (in this case, progress) and the event is handled by a function, also called a handler, on a listener object (listenerObject) that you create. You define a method with the same name as the event on the listener object; the method is called when the event is triggered. When the event is triggered, it automatically passes an event object (eventObject) to the listener object method. Each event object has properties that contain information about the event. You can use these properties to write code that handles the event. Finally, you call the EventDispatcher.addEventListener() method on the component instance that broadcasts the event to register the listener with the instance. When the instance dispatches the event, the listener is called. For more information, see EventDispatcher class on page 495. The second usage example uses an on() handler and must be attached directly to a ScrollPane instance. The keyword this, used inside an on() handler attached to a component, refers to the component instance. For example, the following code, attached to the ScrollPane component instance mySPComponent, sends _level0.mySPComponent to the Output panel:

The TreeDataProvider interface is supported only if you are working in a document that specifies ActionScript 2.0 in its Publish Settings.
Its best to use the TreeDataProvider methods to create XML for the Tree.dataProvider property, because only TreeDataProvider broadcasts events that refresh the trees display. These are events that the Tree class handles; you do not need to write functions to handle these events. (The built-in XML class methods dont broadcast such events.) Use the TreeDataProvider methods to control the data model and the data display. Use builtin XML class methods for read-only tasks such as traversing through the tree hierarchy. You can select the property that holds the text to be displayed by specifying a labelField or labelFunction property. For example, the code myTree.labelField = "firstName"; results in the value of the property myTreeDP.attributes.fred being queried for the display text.
Method summary for the TreeDataProvider interface
The following table lists the methods of the TreeDataProvider interface.
TreeDataProvider.addTreeNode() TreeDataProvider.addTreeNodeAt()
Adds a child node at the root of the tree. Adds a child node at a specified location on the parent node. Returns the specified child of a node.
TreeDataProvider.getTreeNodeAt()
TreeDataProvider.removeTreeNode() Removes a node and all the nodes descendants from the nodes parent. TreeDataProvider.removeTreeNodeA Removes a node and all the nodes descendants t() from the index position of the child node.
Property summary for the TreeDataProvider interface
The following table lists the properties of the TreeDataProvider interface.
TreeDataProvider.attributes.data TreeDataProvider.attributes.label
Specifies the data to associate with a node. Specifies the text to be displayed next to a node.
TreeDataProvider.addTreeNode()
someNode.addTreeNode(label, data)
someNode.addTreeNode(child)

label data child

A string that displays the node. An object of any type that is associated with the node. Any XMLNode object.

The added XML node.

Method; adds a child node at the root of the tree. The node is constructed either from the information supplied in the label and data parameters (Usage 1), or from the prebuilt child node, which is an XMLNode object (Usage 2). Adding a preexisting node removes the node from its previous location. Calling this method refreshes the display of the tree.

treeInstance.removeTreeNodeAt(index)
The index number of a tree child. Each child of a tree is assigned a zero-based index in the order in which it was created.
An XMLNode object, or undefined if an error occurs.
Method; removes a node (specified by its index position) on the root of the tree and refreshes the tree.
The following example adds two nodes to a Tree instance and creates a listener for a change event on the tree. When a change event occurs, the listener functions call the removeTreeNodeAt() method to delete the selected node from the tree.
You first add an instance of the Tree component to the Stage and name it my_tr add the following code to Frame 1.
var trDP_xml:XML = new XML("<node label='1st Local Folders'><node label='Inbox' data='0' /><node label='Outbox' data='1' /></node><node label='2nd Local Folders'><node label='Inbox' data='2' /><node label='Outbox' data='3' /></node>"); my_tr.dataProvider = trDP_xml; var treeListener:Object = new Object(); treeListener.change = function (evt_obj:Object) { my_tr.removeTreeNodeAt(my_tr.selectedIndex); } my_tr.addEventListener("change", treeListener);

Tree.selectedNode

treeInstance.selectedNode
Property; specifies the selected node in a tree instance.
The following example adds two nodes to a Tree instance and sets the second node to the selected state.
You must first add an instance of the Tree component to the Stage and name it my_tr; then add the following code to Frame 1:
/** Requires: - Tree component on Stage (instance name: my_tr) */ var my_tr:mx.controls.Tree; my_tr.setSize(200, 100); var trDP_xml:XML = new XML("<node label='1st Local Folders'><node label='Inbox' data='0' /><node label='Outbox' data='1' /></node><node label='2nd Local Folders'><node label='Inbox' data='2' /><node label='Outbox' data='3' /></node>"); my_tr.dataProvider = trDP_xml; // Select the second node. my_tr.selectedNode = my_tr.getTreeNodeAt(1);

Tree.selectedNodes

treeInstance.selectedNodes
Property; specifies the selected nodes in a tree instance.
The following example adds three nodes to a Tree instance and sets the first two to the selected state.
/** Requires: - Tree component on Stage (instance name: my_tr) */ var my_tr:mx.controls.Tree; my_tr.setSize(200, 100); var trDP_xml:XML = new XML("<node label='1st Local Folders'><node label='Inbox' data='0'/><node label='Outbox' data='1'/></node><node label='2nd Local Folders'><node label='Inbox' data='2'/><node label='Outbox' data='3'/></node><node label='3rd Local Folders'><node label='Inbox' data='2'/><node label='Outbox' data='3'/></node>"); my_tr.dataProvider = trDP_xml; // Allow multiple selections. my_tr.multipleSelection = true; // Select first and second node. my_tr.selectedNodes = [my_tr.getTreeNodeAt(0), my_tr.getTreeNodeAt(1)];

UIEventDispatcher.mouseDown
listenerObject = new Object(); listenerObject.mouseDown = function(eventObject){ // Insert your code here. } componentInstance.addEventListener("mouseDown", listenerObject)
Event; broadcast to all registered listeners when a Flash application has focus and the mouse is pressed. When the event is triggered, it automatically passes an event object (eventObject) to the handler. Each event object has properties that contain information about the event. You can use these properties to write code that handles the event.
UIEventDispatcher.mouseOut
listenerObject = new Object(); listenerObject.mouseOut = function(eventObject){ // Insert your code here. } componentInstance.addEventListener("mouseOut", listenerObject)
Event; broadcast to all registered listeners when a Flash application has focus and the mouse is moved off a component instance. When the event is triggered, it automatically passes an event object (eventObject) to the handler. Each event object has properties that contain information about the event. You can use these properties to write code that handles the event.
listenerObject = new Object(); listenerObject.mouseOver = function(eventObject){ // Insert your code here. } componentInstance.addEventListener("mouseOver", listenerObject)
Event; broadcast to all registered listeners when a Flash application has focus and the mouse is moved over a component instance.
When the event is triggered, it automatically passes an event object (eventObject) to the handler. Each event object has properties that contain information about the event. You can use these properties to write code that handles the event.
UIEventDispatcher.mouseUp
listenerObject = new Object(); listenerObject.mouseUp = function(eventObject){ // Insert your code here. } componentInstance.addEventListener("mouseUp", listenerObject)
Event; broadcast to all registered listeners when a Flash application has focus and the mouse is pressed and released. When the event is triggered, it automatically passes an event object (eventObject) to the handler. Each event object has properties that contain information about the event. You can use these properties to write code that handles the event. For more information, see EventDispatcher class on page 495.
UIEventDispatcher.removeEventListener()
A string that is the name of the event.
A reference to a listener object or function.
Method; unregisters a listener object from a component instance that is broadcasting an event. This method overrides the EventDispatcher.removeEventListener() event found in the EventDispatcher base class.

A number that indicates the position of the objects upper left corner, relative to its parent. A number that indicates the position of the objects upper left corner, relative to its parent. A Boolean value that indicates whether the move event should be dispatched.

noEvent

Method; moves the object to the requested position. Pass only integer values to UIObject.move(), or the component may appear fuzzy.
The following example moves the check box 10 pixels to the right:
myCheckbox.move(myCheckbox.x + 10, myCheckbox.y);

UIObject.redraw()

componentInstance.redraw(always)

always

A Boolean value. If true, the method draws the object, even if invalidate() wasnt called. If false, the method draws the object only if invalidate() was called.
Method; forces validation of the object so that it is drawn in the current frame.
The following example creates a check box and a button and draws them because other scripts are not expected to modify the form:
form.createClassObject(mx.controls.CheckBox, "cb", 0); form.createClassObject(mx.controls.Button, "b", 1); form.redraw(true)
var listenerObject:Object = new Object(); listenerObject.resize = function(eventObject:Object) { //. }; componentInstance.addEventListener("resize", listenerObject);

on (resize) { //. }

Event; notifies listeners that an object has been resized. The first usage example uses a dispatcher/listener event model. A component instance (componentInstance) dispatches an event (in this case, resize) and the event is handled by a function, also called a handler, on a listener object (listenerObject) that you create. You define a method with the same name as the event on the listener object; the method is called when the event is triggered. When the event is triggered, it automatically passes an event object (eventObject) to the listener object method. Each event object has properties that contain information about the event. You can use these properties to write code that handles the event. Finally, you call the EventDispatcher.addEventListener() method on the component instance that broadcasts the event to register the listener with the instance. When the instance dispatches the event, the listener is called. For more information, see EventDispatcher class on page 495. The second usage example uses an on() handler and must be attached directly to a component instance.

Resolvers take a DataSet.deltaPacket object and convert it to an update packet in a format appropriate to the type of resolver. The update packet can then be transmitted to the external data source by one of the connector components. Resolver components have no visual appearance at runtime. XUpdate is a standard for describing changes that are made to an XML document and is supported by a variety of XML databases, such as Xindice and XHive. The XUpdateResolver component translates the changes made to a DataSet component into XUpdate statements. The updates from the XUpdateResolver component are sent in the form of an XUpdate data packet, which is communicated to the database or server through a connection object. The XUpdateResolver component gets a delta packet from a DataSet component, sends its own update packet to a connector, receives server errors back from the connection, and communicates them back to the DataSet componentall using bindable properties. For information about the working draft of the XUpdate language specification, see http:// xmldb-org.sourceforge.net/xupdate/xupdate-wd.html.
You can also use the XUpdateResolver component to send data updates to any external data source that can parse the XUpdate languagefor example, an ASP page, a Java servlet, or a ColdFusion component.
Using the XUpdateResolver component
The XUpdateResolver component is used only when your Flash application contains a DataSet component and must send an update back to an external data source. The XUpdateResolver component communicates with the DataSet component by using the DataSetDeltaToXUpdateDelta encoder. This encoder creates XPath statements that uniquely identify nodes within an XML file according to the information contained in the DataSet components delta packet. This information is used by the XUpdateResolver component to generate XUpdate statements.
XUpdateResolver component parameter
The XUpdateResolver component has one authoring parameter, the Boolean includeDeltaPacketInfo parameter. When this parameter is set to true, the update packet includes additional information that can be used by an external data source to generate results that can be sent back to your application. This information includes a unique transaction and operation ID that is used internally by the data set.

doc1

company=Macromedia&address=601+Townsend&city=San+Francisco&zip=94103
In SWF files running in a version of the player earlier than Flash Player 7, url must be in the same superdomain as the SWF file that is issuing this call. A superdomain is derived by removing the leftmost component of a file's URL. For example, a SWF file at www.someDomain.com can load data from a source at store.someDomain.com, because both files are in the same superdomain of someDomain.com. In SWF files of any version running in Flash Player 7 or later, url must be in exactly the same domain as the SWF file that is issuing this call (see "Flash Player security features" in Using ActionScript in Flash). For example, a SWF file at www.someDomain.com can load data only from sources that are also at www.someDomain.com. If you want to load data from a different domain, you can place a cross-domain policy file on the server hosting the SWF file. For more information, see "About allowing cross-domain data loading" in Using ActionScript in Flash. If you want to load variables into a target MovieClip, use loadVariables() instead of loadVariablesNum(). Parameters
url:String - An absolute or relative URL where the variables are located. If the SWF file issuing this call is running in a web browser, url must be in the same domain as the SWF file; for details, see the Description section. level:Number
- An integer specifying the level in Flash Player to receive the variables.
must be the string GET or POST. If there are no variables to be sent, omit this parameter. The GET method appends the variables to the end of the URL and is used for small numbers of variables. The POST method sends the variables in a separate HTTP header and is used for long strings of variables.
Example The following example loads information from a text file called params.txt into the main Timeline of the SWF at level 2 in Flash Player. The variable names of the text fields must match the variable names in the params.txt file. The setInterval() function is used to check the progress of the data being loaded into the SWF. The script checks for a variable in the params.txt file named done.
loadVariablesNum("params.txt", 2); function checkParamsLoaded() { if (_level2.done == undefined) { trace("not yet."); } else { trace("finished loading. killing interval."); trace("-------------"); for (i in _level2) { trace(i+": "+_level2[i]); } trace("-------------"); clearInterval(param_interval); } } var param_interval = setInterval(checkParamsLoaded, 100); // Params.txt includes the following text var1="hello"&var2="goodbye"&done="done"

class Person2 { var name:String; var age:Number; function Person2(param_name:String, param_age:Number) { trace ("anything"); this.name = param_name; this.age = param_age; } }
In a FLA or AS file that's in the same directory, add the following ActionScript to Frame 1 on the Timeline:
// Before dynamic is added var craig:Person2 = new Person2("Craiggers", 32); for (i in craig) { trace("craig." + i + " = " + craig[i]); } /* output: craig.age = 32 craig.name = Craiggers */
If you add an undeclared function, dance , an error is generated, as shown in the following example:
trace(""); craig.dance = true; for (i in craig) { trace("craig." + i + " = " + craig[i]); } /* output: **Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 14: There is no property with the name 'dance'. craig.dance = true; Total ActionScript Errors: 1 Reported Errors: 1 */
Add the dynamic keyword to the Person2 class, so that the first line appears as follows:

dynamic class Person2 {

Test the code again, and you see the following output:
craig.dance = true craig.age = 32 craig.name = Craiggers

else statement

if (condition){ statement(s); } else { statement(s); }
Specifies the statements to run if the condition in the if statement returns false. The curly braces ({}) used to enclose the block of statements to be executed by the else statement are not necessary if only one statement will execute. Parameters

condition:Boolean

- An expression that evaluates to true or false.
Example In the following example, the else condition is used to check whether the age_txt variable is greater than or less than 18:
if (age_txt.text>=18) { trace("welcome, user"); } else { trace("sorry, junior"); userObject.minor = true; userObject.accessAllowed = false; }
In the following example, curly braces ({}) are not necessary because only one statement follows the else statement:
if (age_txt.text>18) { trace("welcome, user"); } else trace("sorry, junior");

if statement

else if statement
if (condition){ statement(s); } else if (condition){ statement(s);}

Create a FLA or AS document in the same directory, and enter the following ActionScript in Frame 1 of the Timeline:
trace(Users.instances); var user1:Users = new Users(); trace(Users.instances); var user2:Users = new Users(); trace(Users.instances);

super statement

super.method([arg1,., argN]) super([arg1,., argN])
the first syntax style may be used within the body of an object method to invoke the superclass version of a method, and can optionally pass parameters (arg1. argN) to the superclass method. This is useful for creating subclass methods that add additional behavior to superclass methods, but also invoke the superclass methods to perform their original behavior. The second syntax style may be used within the body of a constructor function to invoke the superclass version of the constructor function and may optionally pass it parameters. This is useful for creating a subclass that performs additional initialization, but also invokes the superclass constructor to perform superclass initialization. Returns Both forms invoke a function. The function may return any value. Parameters

method:Function argN

- The method to invoke in the superclass.
- Optional parameters that are passed to the superclass version of the method (syntax 1) or to the constructor function of the superclass (syntax 2).
switch (expression){caseClause: [defaultClause:] }
Creates a branching structure for ActionScript statements. As with the if statement, the switch statement tests a condition and executes statements if the condition returns a value oftrue. All switch statements should include a default case. The default case should include a break statement that prevents a fall-through error if another case is added later. When a case falls through, it doesn't have a break statement. Parameters

expression

Example In the following example, if the String.fromCharCode(Key.getAscii()) parameter evaluates to A, the trace() statement that follows case "A" executes; if the parameter evaluates to a, the trace() statement that follows case "a"executes; and so on. If no case expression matches the String.fromCharCode(Key.getAscii()) parameter, the trace() statement that follows the default keyword executes.

var listenerObj:Object = new Object(); listenerObj.onKeyDown = function() { switch (String.fromCharCode(Key.getAscii())) { case "A" : trace("you pressed A"); break; case "a" : trace("you pressed a"); break; case "E" : case "e" : trace("you pressed E or e"); break; case "I" : case "i" : trace("you pressed I or i"); break; default : trace("you pressed some other key"); break; } }; Key.addListener(listenerObj);

throw statement

throw expression
Generates, or throws, an error that can be handled, or caught, by a catch{} code block. If an exception is not caught by a catch block, the string representation of the thrown value is sent to the Output panel. Typically, you throw instances of the Error class or its subclasses (see the Example section). Parameters
- An ActionScript expression or object.
Example In this example, a function named checkEmail() checks whether the string that is passed to it is a properly formatted e-mail address. If the string does not contain an @ symbol, the function throws an error.
function checkEmail(email:String) { if (email.indexOf("@") == -1) { throw new Error("Invalid email address"); } } checkEmail("someuser_theirdomain.com");
The following code then calls the checkEmail() function within a try code block. If the email_txtstring does not contain a valid e-mail address, the error message appears in a text field (error_txt).
try { checkEmail("Joe Smith"); } catch (e) { error_txt.text = e.toString(); }
In the following example, a subclass of the Error class is thrown. The checkEmail() function is modified to throw an instance of that subclass.
// Define Error subclass InvalidEmailError // In InvalidEmailError.as: class InvalidEmailAddress extends Error { var message = "Invalid email address."; }
In a FLA or AS file, enter the following ActionScript in Frame 1 of the Timeline:
import InvalidEmailAddress; function checkEmail(email:String) { if (email.indexOf("@") == -1) { throw new InvalidEmailAddress(); } }
try { checkEmail("Joe Smith"); } catch (e) { this.createTextField("error_txt", this.getNextHighestDepth(), 0, 0, 100, 22); error_txt.autoSize = true; error_txt.text = e.toString(); }
try.catch.finally statement

var my_array:Array = new Array(); trace(my_array.length); // initial length is 0 my_array[0] = "a"; trace(my_array.length); // my_array.length is updated to 1 my_array[1] = "b"; trace(my_array.length); // my_array.length is updated to 2 my_array[9] = "c"; trace(my_array.length); // my_array.length is updated to 10 trace(my_array); // displays: // a,b,undefined,undefined,undefined,undefined,undefined,undefined,undefine d,c // if the length property is now set to 5, the array will be truncated my_array.length = 5; trace(my_array.length); // my_array.length is updated to 5 trace(my_array); // outputs: a,b,undefined,undefined,undefined
NUMERIC (Array.NUMERIC property)
public static NUMERIC : Number
Represents numeric sorting instead of string-based sorting. String-based sorting, which is the default setting, treats numbers as strings when sorting them. For example, string-based sorting places 10 before 3. A numeric sort treats the elements as numbers so that 3 will be placed before 10. You can use this constant for the options parameter in the sort() or sortOn() method. The value of this constant is 16. See also

pop (Array.pop method)

public pop() : Object
Removes the last element from an array and returns the value of that element. Returns
- The value of the last element in the specified array.
Example The following code creates the array myPets_array array containing four elements, and then removes its last element:
var myPets_array:Array = new Array("cat", "dog", "bird", "fish"); var popped:Object = myPets_array.pop(); trace(popped); // Displays fish. trace(myPets_array); // Displays cat,dog,bird.
push (Array.push method), shift (Array.shift method), unshift (Array.unshift method)

push (Array.push method)

public push(value:Object) : Number
Adds one or more elements to the end of an array and returns the new length of the array. Parameters
- One or more values to append to the array.
- An integer representing the length of the new array.
Example The following example creates the array myPets_array with two elements, cat and dog. The second line adds two elements to the array. Because the push() method returns the new length of the array, the trace() statement in the last line sends the new length of myPets_array (4) to the Output panel.
var myPets_array:Array = new Array("cat", "dog"); var pushed:Number = myPets_array.push("bird", "fish"); trace(pushed); // Displays 4.

three_btn.tabEnabled = false; two_btn.tabIndex = 1; four_btn.tabIndex = 2; three_btn.tabIndex = 3; one_btn.tabIndex = 4;
Make sure that you disable keyboard shortcuts when you test the SWF file by selecting Control > Disable Keyboard Shortcuts in the test environment. See also
tabIndex (Button.tabIndex property), tabEnabled (MovieClip.tabEnabled property), tabEnabled (TextField.tabEnabled property)
tabIndex (Button.tabIndex property)

public tabIndex : Number

Lets you customize the tab ordering of objects in a SWF file. You can set the tabIndex property on a button, movie clip, or text field instance; it is undefined by default. If any currently displayed object in the SWF file contains a tabIndex property, automatic tab ordering is disabled, and the tab ordering is calculated from the tabIndex properties of objects in the SWF file. The custom tab ordering only includes objects that have tabIndex properties. The tabIndex property may be a non-negative integer. The objects are ordered according to their tabIndex properties, in ascending order. An object with a tabIndex value of 1 precedes an object with a tabIndex value of 2. If two objects have the same tabIndex value, the one that precedes the other in the tab ordering is undefined. The custom tab ordering defined by the tabIndex property is flat. This means that no attention is paid to the hierarchical relationships of objects in the SWF file. All objects in the SWF file with tabIndex properties are placed in the tab order, and the tab order is determined by the order of the tabIndex values. If two objects have the same tabIndex value, the one that goes first is undefined. You shouldn't use the same tabIndex value for multiple objects.
tabEnabled (Button.tabEnabled property), tabChildren (MovieClip.tabChildren property), tabEnabled (MovieClip.tabEnabled property), tabIndex (MovieClip.tabIndex property), tabIndex (TextField.tabIndex property)
_target (Button._target property)
public _target : String [read-only]
Returns the target path of the button instance specified by my_btn. Example Add a button instance to the Stage with an instance name my_btn and add the following code to Frame 1 of the Timeline:
trace(my_btn._target); //displays /my_btn

setTime(millisecond: Sets the date for the specified Date object in Number) : Number
setUTCDate(date:Numb Sets the date for the specified Date object in er) : Number
setUTCFullYear(year: Sets the year for the specified Date object (my_date) Number, [month:Number], [date:Number]) : Number setUTCHours(hour:Num Sets the hour for the specified Date object in ber, [minute:Number], [second:Number], [millisecond:Number] ) : Number setUTCMilliseconds(m Sets the milliseconds for the specified Date object in illisecond:Number) : universal time and returns the new time in Number
universal time and returns the new time in milliseconds.
milliseconds. universal time and returns the new time in milliseconds.
setUTCMinutes(minute Sets the minute for the specified Date object in :Number, [second:Number], [millisecond:Number] ) : Number setUTCMonth(month:Nu Sets the month, and optionally the day, for the mber, [date:Number]) specified Date object in universal time and returns : Number
the new time in milliseconds.

:Number, ) : Number

universal time and returns the new time in
setUTCSeconds(second Sets the seconds for the specified Date object in [millisecond:Number] milliseconds.
setYear(year:Number) Sets the year for the specified Date object in local : Number toString() : String
time and returns the new time in milliseconds. Returns a string value for the specified date object in a readable format. Returns the number of milliseconds between midnight on January 1, 1970, universal time, and the time specified in the parameters.
UTC(year:Number, month:Number, [date:Number], [hour:Number], [minute:Number], [second:Number], [millisecond:Number] ) : Number valueOf() : Number
Returns the number of milliseconds since midnight January 1, 1970, universal time, for this Date.

Date constructor

public Date([yearOrTimevalue:Number], [month:Number], [date:Number], [hour:Number], [minute:Number], [second:Number], [millisecond:Number])
Constructs a new Date object that holds the specified date and time. The Date() constructor takes up to seven parameters (year, month,., millisecond) to specify a date and time to the millisecond. Alternatively, you can pass a single value to the Date() constructor that indicates a time value based on the number of milliseconds since January 1, 1970 0:00:000 GMT. Or you can specify no parameters, and the Date() date object is assigned the current date and time. For example, this code shows several different ways to create a Date object:

The key code value for the Down Arrow key (40). Example The following example moves a movie clip called car_mc a constant distance (10) when you press the arrow keys. A sound plays when you press the Spacebar. Give a sound in the library a linkage identifier of horn_id for this example.
var DISTANCE:Number = 10; var horn_sound:Sound = new Sound(); horn_sound.attachSound("horn_id"); var keyListener_obj:Object = new Object(); keyListener_obj.onKeyDown = function() {
switch (Key.getCode()) { case Key.SPACE : horn_sound.start(); break; case Key.LEFT : car_mc._x -= DISTANCE; break; case Key.UP : car_mc._y -= DISTANCE; break; case Key.RIGHT : car_mc._x += DISTANCE; break; case Key.DOWN : car_mc._y += DISTANCE; break; } }; Key.addListener(keyListener_obj);

END (Key.END property)

public static END : Number
The key code value for the End key (35).
ENTER (Key.ENTER property)
public static ENTER : Number
The key code value for the Enter key (13). Example The following example moves a movie clip called car_mc a constant distance (10) when you press the arrow keys. The car_mc instance stops when you press Enter and delete the onEnterFrame event.
var DISTANCE:Number = 5; var keyListener:Object = new Object(); keyListener.onKeyDown = function() { switch (Key.getCode()) { case Key.LEFT : car_mc.onEnterFrame = function() { this._x -= DISTANCE; }; break; case Key.UP : car_mc.onEnterFrame = function() {
this._y -= DISTANCE; }; break; case Key.RIGHT : car_mc.onEnterFrame = function() { this._x += DISTANCE; }; break; case Key.DOWN : car_mc.onEnterFrame = function() { this._y += DISTANCE; }; break; case Key.ENTER : delete car_mc.onEnterFrame; break; } }; Key.addListener(keyListener);
ESCAPE (Key.ESCAPE property)
public static ESCAPE : Number
The key code value for the Escape key (27). Example The following example sets a timer. When you press Escape, the Output panel displays information that includes how long it took you to press the key.
var keyListener:Object = new Object(); keyListener.onKeyDown = function() { if (Key.isDown(Key.ESCAPE)) { // get the current timer, convert the value to seconds and round it to two decimal places. var timer:Number = Math.round(getTimer()/10)/100; trace("you pressed the Esc key: "+getTimer()+" ms ("+timer+" s)"); } }; Key.addListener(keyListener);

- A string that identifies the instance name of the new movie clip. - An integer that specifies the depth of the new movie clip.
- A reference to the newly created movie clip.
Example The following example creates an empty MovieClip named container, creates a new TextField inside of it, and then sets the new TextField.text property.
var container:MovieClip = this.createEmptyMovieClip("container", this.getNextHighestDepth()); var label:TextField = container.createTextField("label", 1, 0, 0, 150, 20); label.text = "Hello World";
createTextField (MovieClip.createTextField method)
public createTextField(instanceName:String, depth:Number, x:Number, y:Number, width:Number, height:Number) : TextField
Creates a new, empty text field as a child of the movie clip on which you call this method. You can use th ecreateTextField() method to create text fields while a SWF file plays. The depth parameter determines the new text field's depth level (z-order position) in the movie clip. Each depth level can contain only one object. If you create a new text field on a depth that already has a text field, the new text field replaces the existing text field. To avoid overwriting existing text fields, use MovieClip.getInstanceAtDepth() to determine whether a specific depth is already occupied, or MovieClip.getNextHighestDepth(), to determine the highest unoccupied depth. The text field is positioned at (x, y) with dimensions width by height. The x and y parameters are relative to the container movie clip; these parameters correspond to the _x and _y properties of the text field. The width and height parameters correspond to the _width and _height properties of the text field. The default properties of a text field are as follows:
type = "dynamic" border = false background = false password = false multiline = false html = false embedFonts = false selectable = true wordWrap = false mouseWheelEnabled = true condenseWhite = false restrict = null variable = null maxChars = null styleSheet = undefined tabInded = undefined
A text field created with createTextField() receives the following default TextFormat object settings:
font = "Times New Roman" // "Times" on Mac OS size = 12 color = 0x000000 bold = false italic = false underline = false url = "" target = "" align = "left" leftMargin = 0

this.createTextField("date_txt", this.getNextHighestDepth(), 10, 10, 100, 22); date_txt.autoSize = true; date_txt.selectable = true; ( var date_interval:Number = setInterval(updateTime, 500, date_txt); function updateTime(my_txt:TextField) { my_txt.text = new Date().toString(); }
setNewTextFormat (TextField.setNewTextFormat method)
public setNewTextFormat(tf:TextFormat) : Void
Sets the default new text format of a text field. The default new text format is the new text format used for newly inserted text such as text entered by a user. When text is inserted, the newly inserted text is assigned the default new text format. The new default text format is specified by textFormat, which is a TextFormat object. Parameters

tf:TextFormat

Example In the following example, a new text field (called my_txt) is created at runtime and several properties are set. The format of the newly inserted text is applied.
var my_fmt:TextForma( = new TextFormat(); my_fmt.bold = true; my_fmt.font = "Arial"; my_fmt.color = 0xFF9900; this.createTextField("my_txt", 999, 0, 0, 400, 300); my_txt.wordWrap = true; my_txt.multiline = true; my_txt.border = true; my_txt.type = "input"; my_txt.setNewTextFormat(my_fmt); my_txt.text = "Oranges are a good source of vitamin C";
getNewTextFormat (TextField.getNewTextFormat method), getTextFormat (TextField.getTextFormat method), setTextFormat (TextField.setTextFormat method)
setTextFormat (TextField.setTextFormat method)
public setTextFormat([beginIndex:Number], [endIndex:Number], textFormat:TextFormat) : Void
Applies the text formatting specified by the textFormat parameter to some or all of the text in a text field. textFormat must be a TextFormat object that specifies the text formatting changes desired. Only the non-null properties of textFormat are applied to the text field. Any property of textFormat that is set to null will not be applied. By default, all of the properties of a newly created TextFormat object are set to null. There are two types of formatting information in a TextFormat object: character level, and paragraph level formatting. Each character in a text field might have its own character formatting settings, such as font name, font size, bold, and italic. For paragraphs, the first character of the paragraph is examined for the paragraph formatting settings for the entire paragraph. Examples of paragraph formatting settings are left margin, right margin, and indentation. The setTextFormat() method changes the text formatting applied to an individual character, to a range of characters, or to the entire body of text in a text field:

parseXML(value:Strin Parses the XML text specified in the value g) : Void
send(url:String, [target:String], method:String) : Boolean
sendAndLoad(url:Stri Encodes the specified XML object into an XML ng, resultXML:XML) : Void
document, sends it to the specified URL using the POST method, downloads the server's response, and loads it into the resultXMLobject specified in the parameters.
Methods inherited from class XMLNode
appendChild (XMLNode.appendChild method), cloneNode (XMLNode.cloneNode method), hasChildNodes (XMLNode.hasChildNodes method), insertBefore (XMLNode.insertBefore method), removeNode (XMLNode.removeNode method), toString (XMLNode.toString method)
Adds or changes HTTP request headers (such as Content-Type or SOAPAction) sent with POST actions. In the first usage, you pass two strings to the method: header and headerValue. In the second usage, you pass an array of strings, alternating header names and header values. If multiple calls are made to set the same header name, each successive value replaces the value set in the previous call. You cannot add or change the following standard HTTP headers using this method: AcceptRanges, Age, Allow, Allowed, Connection, Content-Length, Content-Location, Content-Range, ETag, Host, Last-Modified, Locations, Max-Forwards, ProxyAuthenticate, Proxy-Authorization, Public, Range, Retry-After, Server, TE, Trailer, Transfer-Encoding, Upgrade, URI, Vary, Via, Warning, and WWW-Authenticate. Parameters
- A string that represents an HTTP request header name. - A string that represents the value associated with header.
Example The following example adds a custom HTTP header named SOAPAction with a value of Foo to an XML object named my_xml:
my_xml.addRequestHeader("SOAPAction", "'Foo'");
The following example creates an array named headers that contains two alternating HTTP headers and their associated values. The array is passed as a parameter to the addRequestHeader() method.
var headers:Array = new Array("Content-Type", "text/plain", "X-ClientAppVersion", "2.0");
my_xml.addRequestHeader(headers);
contentType (XML.contentType property)
The MIME content type that is sent to the server when you call the XML.send() or XML.sendAndLoad() method. The default is application/x-www-form-urlencoded, which is the standard MIME content type used for most HTML forms. Example The following example creates a new XML document and checks its default content type:
// create a new XML document var doc:XML = new XML(); // trace the default content type trace(doc.contentType); // output: application/x-www-form-urlencoded

// create a tag called 'mytag' with // an attribute called 'name' with value 'Val' var doc:XML = new XML("<mytag name=\"Val\"> item </mytag>"); // assign the value of the 'name' attribute to variable y var y:String = doc.firstChild.attributes.name; trace (y); // output: Val // create a new attribute named 'order' with value 'first' doc.firstChild.attributes.order = "first"; // assign the value of the 'order' attribute to variable z var z:String = doc.firstChild.attributes.order trace(z); // output: first
The following is displayed in the Output panel:

Val first

childNodes (XMLNode.childNodes property)
public childNodes : Array [read-only]
An array of the specified XML object's children. Each element in the array is a reference to an XML object that represents a child node. This is a read-only property and cannot be used to manipulate child nodes. Use the appendChild(), insertBefore(), and removeNode() methods to manipulate child nodes. This property is undefined for text nodes (nodeType Example The following example shows how to use the XML.childNodes property to return an array of child nodes:
// create a new XML document var doc:XML = new XML(); // create a root node var rootNode:XMLNode = doc.createElement("rootNode"); // create three child nodes var oldest:XMLNode = doc.createElement("oldest"); var middle:XMLNode = doc.createElement("middle"); var youngest:XMLNode = doc.createElement("youngest"); // add the rootNode as the root of the XML document tree doc.appendChild(rootNode); // add each of the child nodes as children of rootNode rootNode.appendChild(oldest); rootNode.appendChild(middle); rootNode.appendChild(youngest); // create an array and use rootNode to populate it var firstArray:Array = doc.childNodes; trace (firstArray); // output: <rootNode><oldest /><middle /><youngest /></rootNode> // create another array and use the child nodes to populate it var secondArray:Array = rootNode.childNodes; trace(secondArray); // output: <oldest />,<middle />,<youngest /> == 3).

onLoadProgress event 500 onLoadStart event 501 MovieClipLoader() constructor 496 multiline property 628
name property 334 NaN constant 12 NaN property 508 ne not equal (strings) operator 142 NEGATIVE_INFINITY property 508 new operator 141 newline constant 12 nextFrame function 48 nextFrame() method 456 nextScene function 49 nextSibling property 713 nodeName property 713 nodeType property 715 nodeValue property 716 not logical NOT operator 136 null constant 13 Number MAX_VALUE property 507 MIN_VALUE property 508 NaN property 508 NEGATIVE_INFINITY property 508 Number() constructor 509 POSITIVE_INFINITY property 509 toString() method 510 valueOf() method 510 Number class 505 Number function 50 Number() constructor 509 NUMERIC property 232
Object __proto__ property 518 __resolve property 521 addProperty() method 512 constructor property 516 hasOwnProperty() method 516 isPropertyEnumerable() method 517 isPrototypeOf() method 518 Object() constructor 518 prototype property 519
registerClass() method 520 toString() method 525 unwatch() method 526 valueOf() method 527 watch() method 528 Object class 511 Object function 51 Object() constructor 518 on handler 51 onChanged event 629 onClipEvent handler 53 onClose event 725 onConnect event 726 onData event 372, 457, 692, 727 onDragOut event 255, 458 onDragOver event 256, 458 onEnterFrame event 459 onID3 event 572 onKeyDown event 257, 357, 459 onKeyUp event 258, 358, 460 onKillFocus event 259, 461, 630 onLoad event 373, 462, 573, 693 onLoadComplete event 496 onLoadError event 498 onLoadInit event 499 onLoadProgress event 500 onLoadStart event 501 onMouseDown event 400, 463 onMouseMove event 401, 464 onMouseUp event 402, 464 onPress event 259, 465 onRelease event 260, 465 onReleaseOutside event 260, 465 onResize event 585 onRollOut event 261, 466 onRollOver event 261, 466 onScroller event 631 onSetFocus event 261, 467, 540, 632 onSoundComplete event 574 onStatus event 555, 605, 676 onUnload event 468 onXML event 728 Operators 92 or logical OR operator 138 ord function 54 os property 292
parentNode property 718 parseFloat function 55 parseInt function 55 parseXML() method 694 password property 634 pause() method 676 PGDN property 358 PGUP property 359 PI property 391 play function 57 play() method 469, 677 pop() method 233 position property 574 POSITIVE_INFINITY property 509 pow() method 392 prevFrame function 57 prevFrame() method 469 previousSibling property 718 prevScene function 58 private statement 180 prototype property 519 public statement 182 push() method 233

 

Technical specifications

Full description

The "ActionScript 2.0 Language Reference for Macromedia Flash 8" is a comprehensive reference manual that describes the application programming interface (API) for Macromedia Flash Player, the most pervasive client runtime environment in the world. It includes valuable syntax and usage information; detailed descriptions of classes, functions, properties, and events; and copy-and-paste code samples for every element in the ActionScript language. The "ActionScript 2.0 Language Reference for Macromedia Flash 8" will help you: - Learn how to use specific APIs efficiently and effectively - Understand the range and variety of functionality ActionScript offers - Repurpose Macromedia-tested code in your own applications Powerful development and design tools require thorough and authoritative technical advice and documentation. When it comes to Macromedia Flash, no one is more authoritative than Macromedia Development and writing teams. Now their official documentation is available to you in printed book form. As you work, keep this guide by your side for ready access to valuable information on using Flash. We've designed it so that it's easy to annotate as you progress.

 

Tags

RH177H Controller CFD-E75TV HD403LJ Izone 310 Celestron C8 CDX-GT200E CD2301S-24 TX550W MC 2569 Siemens S35I Blazer 1999 Quicksteamer IC-T2E Sable 2002 HTS8100-37B RT58wasm OT-V770 LE46B650 Browning Safe Imedia 1618 600-00D Grandprix 1993 RH361LD 105S20-00N RX-FS430 KOS-A200 RX-VT80 Street P1003J Destiny Cocoon 450 Daggerfall Xvs650L 2605DN Rebel G MC-8483NL Clock Temporis 26 EXT 2005 MIC100 LH-D6430D C 303 Dmcfx700 NV-MX5000 J2060 Chicago SW TK210 ICF-CD7000BLK Software Satis Duet II SF-2030 Beocom 5 Alum10N Entrepreneur MC-7683D VL400 Mount Lavamat 620 KX-T2835 SU-A700 Mk3 MG8-2FX SC505 AVR 142 Smart TEC AVH-P6000DVD SL-CT710 NGC 77 Esam6600 Yamaha 01V MFT1500 2 Emmie SH18ZA9 WF-T1141tp3 DAV-SR1W DPX-MP4030 DCR-DVD203E SB-M300m2 Headphone SET Remote GN2100 USB BD7-II TCL37D2 213 PTZ TS 450 GZ-MG610 Plug IN CPA-9C RT-32FZ10PX CJ-N883W Prego 70 DN-D6000 RX-V2200 Aficio 1113 Elph LT Xcountry Review Mechcommander Gold Shotgun LT 50

 

manuel d'instructions, Guide de l'utilisateur | Manual de instrucciones, Instrucciones de uso | Bedienungsanleitung, Bedienungsanleitung | Manual de Instruções, guia do usuário | инструкция | návod na použitie, Užívateľská príručka, návod k použití | bruksanvisningen | instrukcja, podręcznik użytkownika | kullanım kılavuzu, Kullanım | kézikönyv, használati útmutató | manuale di istruzioni, istruzioni d'uso | handleiding, gebruikershandleiding

 

Sitemap

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101