Reviews & Opinions
Independent and trusted. Read before buy Macromedia Flex - Flex Actionscript Language Reference!

Macromedia Flex - Flex Actionscript Language Reference


Bookmark
Macromedia Flex - Flex Actionscript Language Reference

Bookmark and Share

 

Macromedia Flex - Flex Actionscript Language ReferenceAbout Macromedia Flex - Flex Actionscript Language Reference
Here you can find all about Macromedia Flex - Flex Actionscript Language Reference like manual and other informations. For example: review.

Macromedia Flex - Flex Actionscript Language Reference manual (user guide) is ready to download for free.

On the bottom of page users can write a review. If you own a Macromedia Flex - Flex Actionscript Language Reference please write about it to help other people.
[ Report abuse or wrong photo | Share your Macromedia Flex - Flex Actionscript 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 Flex-flex Actionscript Language Reference, size: 6.6 MB

 

Macromedia Flex - Flex Actionscript Language Reference

 

 

User reviews and opinions

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

Comments to date: 4. Page 1 of 1. Average Rating:
cicade 7:32am on Thursday, October 21st, 2010 
Overkill for most basic networks or domains, but if virtualization is on your radar, then Hyper-V definitely something to consider. Another great piece of software from Microsoft. Due to the OEM licence the price is right too None
BUNI-San 2:15am on Saturday, September 4th, 2010 
Easy to setup ; Runs like a Win 7 Desktop No real cons other than you need to know what you are doing or you can get into trouble real quick Im not sure why they other reviewer said it wont work with mail servers? I have mdaemon running fine on it for a corporate domain. Easy to install.
tarrantm 8:25am on Sunday, June 6th, 2010 
Not really This book is more SBS 2008 for dummies than an administrators companion. Very comprehensive Very comprehensive book from the basics through to the more complex setup items. Depressingly big yet sparse Like the Windows Small Business Server "Pocket Companion". Perfect all round book for Server 2008 Just WOW! I have learnt more from this book in the past 4hrs than I have in the past year.
Le_coq 5:12am on Wednesday, March 31st, 2010 
fast fast delivery faster then my over night book i got and im still waiting for it

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

class ClassBase { }

You can subsequently create a subclass of ClassBase named ClassExtender, which has one property named someString, as follows:
class ClassExtender extends ClassBase { var someString:String; }
Using both classes, you can create a class instance that is declared using the ClassBase data type, but instantiated using the ClassExtender constructor. An upcast is considered a safe operation, because the base class does not contain any properties or methods that are not in the subclass.
var myClass:ClassBase = new ClassExtender();

ADOBE FLEX 3 51

A subclass, however, does contain properties or methods that its base class does not. For example, the ClassExtender class contains the someString property, which does not exist in the ClassBase class. In ActionScript 3.0 standard mode, you can reference this property using the myClass instance without generating a compile-time error, as shown in the following example:
var myClass:ClassBase = new ClassExtender(); myClass.someString = "hello"; // no error in ActionScript 3.0 standard mode The is operator
The is operator, which is new for ActionScript 3.0, allows you to test whether a variable or expression is a member of a given data type. In previous versions of ActionScript, the instanceof operator provided this functionality, but in ActionScript 3.0 the instanceof operator should not be used to test for data type membership. The is operator should be used instead of the instanceof operator for manual type checking, because the expression x instanceof y merely checks the prototype chain of x for the existence of y (and in ActionScript 3.0, the prototype chain does not provide a complete picture of the inheritance hierarchy). The is operator examines the proper inheritance hierarchy and can be used to check not only whether an object is an instance of a particular class, but also whether an object is an instance of a class that implements a particular interface. The following example creates an instance of the Sprite class named mySprite and uses the is operator to test whether mySprite is an instance of the Sprite and DisplayObject classes, and whether it implements the IEventDispatcher interface:

ADOBE FLEX 3 55

In previous versions of ActionScript, a variable with no type annotation was automatically assigned the Object data type. This is no longer true in ActionScript 3.0, which now includes the idea of a truly untyped variable. Variables with no type annotation are now considered untyped. If you prefer to make it clear to readers of your code that your intention is to leave a variable untyped, you can use the new asterisk (*) symbol for the type annotation, which is equivalent to omitting a type annotation. The following example shows two equivalent statements, both of which declare an untyped variable x:

var x var x:*

Only untyped variables can hold the value undefined. If you attempt to assign the value undefined to a variable that has a data type, Flash Player or Adobe AIR will convert the value undefined to the default value of that data type. For instances of the Object data type, the default value is null, which means that Flash Player or Adobe AIR will convert the value undefined to null if you attempt to assign undefined to an Object instance.

Type conversions

A type conversion is said to occur when a value is transformed into a value of a different data type. Type conversions can be either implicit or explicit. Implicit conversion, which is also called coercion, is sometimes performed by Flash Player or Adobe AIR at run time. For example, if the value 2 is assigned to a variable of the Boolean data type, Flash Player or Adobe AIR converts the value 2 to the Boolean value true before assigning the value to the variable. Explicit conversion, which is also called casting, occurs when your code instructs the compiler to treat a variable of one data type as if it belongs to a different data type. When primitive values are involved, casting actually converts values from one data type to another. To cast an object to a different type, you wrap the object name in parentheses and precede it with the name of the new type. For example, the following code takes a Boolean value and casts it to an integer:
var myBoolean:Boolean = true; var myINT:int = int(myBoolean); trace(myINT); // 1 Implicit conversions
Implicit conversions happen at run time in a number of contexts:
In assignment statements When values are passed as function arguments When values are returned from functions In expressions using certain operators, such as the addition (+) operator
For user-defined types, implicit conversions succeed when the value to be converted is an instance of the destination class or a class that derives from the destination class. If an implicit conversion is unsuccessful, an error occurs. For example, the following code contains a successful implicit conversion and an unsuccessful implicit conversion:

Chapter 7: Working with strings
The String class contains methods that let you work with text strings. Strings are important in working with many objects. The methods described in this chapter are useful in working with strings used in objects such as TextField, StaticText, XML, ContextMenu, and FileReference objects. Strings are sequences of characters. ActionScript 3.0 supports ASCII and Unicode characters.
Basics of strings. 130 Creating strings. 131 The length property. 132 Working with characters in strings. 133 Comparing strings. 133 Obtaining string representations of other objects. 134 Concatenating strings. 134 Finding substrings and patterns in strings. 135 Converting strings between uppercase and lowercase. 138 Example: ASCII art. 139

Basics of strings

Introduction to working with strings
In programming parlance, a string is a text valuea sequence of letters, numbers, or other characters strung together into a single value. For instance, this line of code creates a variable with the data type String and assigns a literal string value to that variable:
var albumName:String = "Three for the money";
As this example shows, in ActionScript you can denote a string value by surrounding text with double or single quotation marks. Here are several more examples of strings:
"Hello" "555-7649" "http://www.adobe.com/"
Any time you manipulate a piece of text in ActionScript, you are working with a string value. The ActionScript String class is the data type you can use to work with text values. String instances are frequently used for properties, method parameters, and so forth in many other ActionScript classes.
Common tasks for working with strings
The following are common string-related tasks that are explored in this chapter:
Creating String objects Working with special characters such as carriage-return, tab, and non-keyboard characters

ADOBE FLEX 3 131

Measuring string length Isolating individual characters in a string Joining strings Comparing strings Finding, extracting, and replacing portions of a string Making strings uppercase or lowercase

Subclasses of the Event class
For many events, the common set of properties defined in the Event class is sufficient. Other events, however, have unique characteristics that cannot be captured by the properties available in the Event class. For these events, the Flash Player API defines several subclasses of the Event class. Each subclass provides additional properties and event types that are unique to that category of events. For example, events related to mouse input have several unique characteristics that cannot be captured by the properties defined in the Event class. The MouseEvent class extends the Event class by adding ten properties that contain information such as the location of the mouse event and whether specific keys were pressed during the mouse event. An Event subclass also contains constants that represent the event types that are associated with the subclass. For example, the MouseEvent class defines constants for several mouse event types, include the click, doubleClick, mouseDown, and mouseUp event types. As described in the section Event class utility methods on page 235, when creating an Event subclass you must override the clone() and toString() methods to provide functionality specific to the subclass.

Event listeners

Event listeners, which are also called event handlers, are functions that Flash Player and AIR execute in response to specific events. Adding an event listener is a two-step process. First, you create a function or class method for Flash Player or AIR to execute in response to the event. This is sometimes called the listener function or the event handler function. Second, you use the addEventListener() method to register your listener function with the target of the event or any display list object that lies along the appropriate event flow.
Creating a listener function
The creation of listener functions is one area where the ActionScript 3.0 event model deviates from the DOM event model. In the DOM event model, there is a clear distinction between an event listener and a listener function: an event listener is an instance of a class that implements the EventListener interface, whereas a listener function is a method of that class named handleEvent(). In the DOM event model, you register the class instance that contains the listener function rather than the actual listener function. In the ActionScript 3.0 event model, there is no distinction between an event listener and a listener function. ActionScript 3.0 does not have an EventListener interface, and listener functions can be defined outside a class or as part of a class. Moreover, listener functions do not have to be named handleEvent()they can be named with any valid identifier. In ActionScript 3.0, you register the name of the actual listener function.

Updating the satellite position
The doEveryFrame() function is the heart of the applications animation process. It is called for every frame, at a rate equal the framerate of the SWF file. Because the variables of the draw change slightly, this conveys the appearance of animation. The function first clears all previous draws and redraws the background. Then, it loops through each satellite container and increments the position property of each satellite, and updates the radius and orbitRadius properties that may have changed from user interaction with the control panel. Finally, the satellite updates to its new position by calling the draw() method of the Satellite class. Note that the counter, i, only increments up to the visibleSatellites variable. This is because if the user has limited the amount of satellites that are displayed through the control panel, the remaining satellites in the loop should not be redrawn but should instead be hidden. This occurs in a loop which immediately follows the loop responsible for drawing. When the doEveryFrame() function completes, the number of visibleSatellites update in position across the screen.
Responding to user interaction
User interaction occurs via the control panel, which is managed by the ControlPanel class. This class sets a listener along with the individual minimum, maximum, and default values of each slider. As the user moves these sliders, the changeSetting() function is called. This function updates the properties of the control panel. If the change requires a rebuild of the display, an event is dispatched which is then handled in the main application file. As the control panel settings change, the doEveryFrame() function draws each satellite with the updated variables.

ADOBE FLEX 3 306

Customizing further
This example is only a basic schematic of how to generate visuals using the drawing API. It uses relatively few lines of code to create an interactive experience that appears quite complex. Even so, this example could be extended with minor changes. A few ideas:
The doEveryFrame() function could increment the color value of the satellite. The doEveryFrame() function could shrink or expand the satellite radius over time.
The satellite radius does not have to be circular; it could use the Math class to move according to a sine wave, for example.
Satellites could use hit detection with other satellites. The drawing API can be used as an alternative to creating visual effects in the Flash authoring environment, drawing basic shapes at run time. But it can also be used to create visual effects of a variety and scope that are not possible to create by hand. Using the drawing API and a bit of mathematics, the ActionScript author can give life to many unexpected creations.

import import import import import import flash.display.BitmapData; flash.display.Loader; flash.events.MouseEvent; flash.filters.DisplacementMapFilter; flash.geom.Point; flash.net.URLRequest;
// Load an image onto the Stage. var loader:Loader = new Loader(); var url:URLRequest = new URLRequest("http://www.helpexamples.com/flash/images/image3.jpg"); loader.load(url); this.addChild(loader); var mapImage:BitmapData; var displacementMap:DisplacementMapFilter; // This function is called when the image finishes loading. function setupStage(event:Event):void { // Center the loaded image on the Stage. loader.x = (stage.stageWidth - loader.width) / 2; loader.y = (stage.stageHeight - loader.height) / 2; // Create the displacement map image. mapImage = new BitmapData(loader.width, loader.height, false, 0xFF0000); // Create the displacement filter. displacementMap = new DisplacementMapFilter(); displacementMap.mapBitmap = mapImage; displacementMap.mapPoint = new Point(0, 0); displacementMap.componentX = BitmapDataChannel.RED; displacementMap.scaleX = 250; loader.filters = [displacementMap]; } loader.contentLoaderInfo.addEventListener(Event.COMPLETE, setupStage);

ADOBE FLEX 3 335

The properties used to define the displacement are as follows:
Map bitmap: The displacement bitmap is a new BitmapData instance created by the code. Its dimensions match the dimensions of the loaded image (so the displacement is applied to the entire image). It is filled with solid red pixels.
Map point: This value is set to the point 0, 0again, causing the displacement to be applied to the entire image.
X component: This value is set to the constant BitmapDataChannel.RED, meaning the red value of the map bitmap will determine how much the pixels are displaced (how much they move) along the x axis. X scale: This value is set to 250. The full amount of displacement (from the map image being completely red) only displaces the image by a small amount (roughly one-half of a pixel), so if this value was set to 1 the image would only shift.5 pixels horizontally. By setting it to 250, the image shifts by approximately 125 pixels.
These settings cause the filtered images pixels to shift 250 pixels to the left. The direction (left or right) and amount of shift is based on the color value of the pixels in the map image. Conceptually, Flash Player or AIR goes through the pixels of the filtered image one by one (at least, the pixels in the region where the filter is applied, which in this case means all the pixels), and does the following with each pixel:
1 It finds the corresponding pixel in the map image. For example, when Flash Player or AIR is calculating the displacement amount for the pixel in the top-left corner of the filtered image, it looks at the pixel in the top-left corner of the map image. 2 It determines the value of the specified color channel in the map pixel. In this case, the x component color channel is the red channel, so Flash Player and AIR look to see what the value of the red channel of the map image is at the pixel in question. Since the map image is solid red, the pixels red channel is 0xFF, or 255. This is used as the displacement value.

Example: Filter Workbench
The Filter Workbench provides a user interface to apply different filters to images and other visual content and see the resulting code that can be used to generate the same effect in ActionScript. In addition to providing a tool for experimenting with filters, this application demonstrates the following techniques:
Creating instances of various filters Applying multiple filters to a display object
To get the application files for this sample, see www.adobe.com/go/learn_programmingAS3samples_flash. The Filter Workbench application files can be found in the Samples/FilterWorkbench folder. The application consists of the following files:

ADOBE FLEX 3 339

File com/example/programmingas3/filterWorkbench/FilterWorkbenchController.as com/example/programmingas3/filterWorkbench/IFilterFactory.as
Description Class that provides the main functionality of the application, including switching content to which filters are applied, and applying filters to content. Interface defining common methods that are implemented by each of the filter factory classes. This interface defines the common functionality that the FilterWorkbenchController class uses to interact with the individual filter factory classes. Set of classes, each of which implements the IFilterFactory interface. Each of these classes provides the functionality of creating and setting values for a single type of filter. The filter property panels in the application use these factory classes to create instances of their particular filters, which the FilterWorkbenchController class retrieves and applies to the image content.
in folder com/example/programmingas3/filterWorkbench/: BevelFactory.as BlurFactory.as ColorMatrixFactory.as ConvolutionFactory.as DropShadowFactory.as GlowFactory.as GradientBevelFactory.as GradientGlowFactory.as
com/example/programmingas3/filterWorkbench/IFilterPanel.as Interface defining common methods that are implemented by classes that define the user interface panels that are used to manipulate filter values in the application. com/example/programmingas3/filterWorkbench/ColorStringFormatter.as com/example/programmingas3/filterWorkbench/GradientColor.as User interface (Flex) FilterWorkbench.mxml flexapp/FilterWorkbench.as The main file defining the applications user interface. Class that provides the functionality for the main applications user interface; this class is used as the code-behind class for the application MXML file. Set of classes that provide the functionality for each panel that is used to set options for a single filter. For each class, there is also an associated MovieClip symbol in the library of the main application FLA file, whose name matches the name of the class (for example, the symbol BlurPanel is linked to the class defined in BlurPanel.as). The components that make up the user interface are positioned and named within those symbols. Utility class that includes a method to convert a numeric color value to hexadecimal String format Class that serves as a value object, combining into a single object the three values (color, alpha, and ratio) that are associated with each color in the GradientBevelFilter and GradientGlowFilter

Types of text
The type of text within a text field is characterized by its source:
Dynamic text Dynamic text includes content that is loaded from an external source, such as a text file, an XML file, or even a remote web service. For more information, see Types of text on page 357.
Input text Input text is any text entered by a user or dynamic text that a user can edit. You can set up a style sheet to format input text, or use the flash.text.TextFormat class to assign properties to the text field for the input content. For more information, see Capturing text input on page 360.
Static text Static text is created through the Flash authoring tool only. You cannot create a static text instance using ActionScript 3.0. However, you can use ActionScript classes like StaticText and TextSnapshot to manipulate an existing static text instance. For more information, see Working with static text on page 367.
Modifying the text field contents
You can define dynamic text by assigning a string to the flash.text.TextField.text property. You assign a string directly to the property, as follows:
myTextField.text = Hello World;
You can also assign the text property a value from a variable defined in your script, as in the following example:
package { import flash.display.Sprite; import flash.text.*; public class TextWithImage extends Sprite { private var myTextBox:TextField = new TextField(); private var myText:String = "Hello World"; public function TextWithImage() { addChild(myTextBox); myTextBox.text = myText; } } }
Alternatively, you can assign the text property a value from a remote variable. You have three options for loading text values from remote sources:
The flash.net.URLLoader and flash.net.URLRequest classes load variables for the text from a local or remote location. The FlashVars attribute is embedded in the HTML page hosting the SWF file and can contain values for text variables. The flash.net.SharedObject class manages persistent storage of values. For more information, see Storing local data on page 475.

ADOBE FLEX 3 358

Displaying HTML text
The flash.text.TextField class has an htmlText property that you can use to identify your text string as one containing HTML tags for formatting the content. As in the following example, you must assign your string value to the htmlText property (not the text property) for Flash Player or AIR to render the text as HTML:
var myText:String = "<p>This is <b>some</b> content to <i>render</i> as <u>HTML</u> text.</p>"; myTextBox.htmlText = myText;

If the string for connectionName does not begin with an underscore, Flash Player adds a prefix with the superdomain name and a colon (for example, myDomain:connectionName). Although this ensures that your connection does not conflict with connections of the same name from other domains, any sending LocalConnection objects must specify this superdomain (for example, myDomain:connectionName). If you move the SWF file with the receiving LocalConnection object to another domain, Flash Player changes the prefix to reflect the new superdomain (for example, anotherDomain:connectionName). All sending LocalConnection objects have to be manually edited to point to the new superdomain. If the string for connectionName begins with an underscore (for example, _connectionName), Flash Player does not add a prefix to the string. This means the receiving and sending LocalConnection objects will use identical strings for connectionName. If the receiving object uses LocalConnection.allowDomain() to specify that connections from any domain will be accepted, you can move the SWF file with the receiving LocalConnection object to another domain without altering any sending LocalConnection objects.

ADOBE FLEX 3 472

Socket connections
There are two different types of socket connections possible in ActionScript 3.0: XML socket connections and binary socket connections. An XML socket lets you connect to a remote server and create a server connection that remains open until explicitly closed. This lets you exchange XML data between a server and client without having to continually open new server connections. Another benefit of using an XML socket server is that the user doesnt need to explicitly request data. You can send data from the server without requests, and you can send data to every client connected to the XML socket server. A binary socket connection is similar to an XML socket except that the client and server dont need to exchange XML packets specifically. Instead, the connection can transfer data as binary information. This allows you to connect to a wide range of services, including mail servers (POP3, SMTP, and IMAP), and news servers (NNTP).

Socket class

Introduced in ActionScript 3.0, the Socket class enables ActionScript to make socket connections and to read and write raw binary data. It is similar to the XMLSocket class, but does not dictate the format of the received and transmitted data. The Socket class is useful for interoperating with servers that use binary protocols. By using binary socket connections, you can write code that allows interaction with several different Internet protocols, such as POP3, SMTP, IMAP, and NNTP. This in turn enables Flash Player to connect to mail and news servers. Flash Player can interface with a server by using the binary protocol of that server directly. Some servers use the bigendian byte order, and some use the little-endian byte order. Most servers on the Internet use the big-endian byte order because network byte order is big-endian. The little-endian byte order is popular because the Intel x86 architecture uses it. You should use the endian byte order that matches the byte order of the server that is sending or receiving data. All operations that are performed by the IDataInput and IDataOutput interfaces, and the classes that implement those interfaces (ByteArray, Socket, and URLStream), are encoded by default in big-endian format; that is, with the most significant byte first. This is done to match Java and official network byte order. To change whether big-endian or little-endian byte order is used, you can set the endian property to Endian.BIG_ENDIAN or Endian.LITTLE_ENDIAN. The Socket class inherits all the methods implemented by the IDataInput and IDataOutput interfaces (located in the flash.utils package), and those methods should be used to write to and read from the Socket.

try { var so:SharedObject = SharedObject.getLocal("contactManager", null, true); } catch (error:Error) { trace("Unable to create SharedObject."); }

ADOBE FLEX 3 478

Regardless of the value of this parameter, the created shared objects count toward the total amount of disk space allowed for a domain.
Working with file upload and download
The FileReference class lets you add the ability to upload and download files between a client and a server. Users are prompted to select a file to upload or a location for download from a dialog box (such as the Open dialog box on the Windows operating system). Each FileReference object that you create with ActionScript refers to a single file on the users hard disk. The object has properties that contain information about the files size, type, name, creation date, and modification date. Note: The creator property is supported on Mac OS only. All other platforms return null. You can create an instance of the FileReference class in two ways. You can use the new operator, as the following code shows:
import flash.net.FileReference; var myFileReference:FileReference = new FileReference();
Or you can call the FileReferenceList.browse() method, which opens a dialog box on the users system to prompt the user to select one or more files to upload and then creates an array of FileReference objects if the user selects one or more files successfully. Each FileReference object represents a file selected by the user from the dialog box. A FileReference object does not contain any data in the FileReference properties (such as name, size, or modificationDate) until one of the following happens:
The FileReference.browse() method or FileReferenceList.browse() method has been called, and the user has selected a file from the file picker.
The FileReference.download() method has been called, and the user has selected a file from the file picker. Note: When performing a download, only the FileReference.name property is populated before the download is complete. After the file has been downloaded, all properties are available. While calls to the FileReference.browse(), FileReferenceList.browse(), or FileReference.download() method are executing, most players will continue SWF file playback.

FileReference class

Using the IME class

The IME class lets you manipulate the operating systems IME within Flash Player or Adobe AIR. Using ActionScript, you can determine the following:
If an IME is installed on the user's computer (Capabilities.hasIME) If the IME is enabled or disabled on the users computer (IME.enabled) The conversion mode the current IME is using (IME.conversionMode)

ADOBE FLEX 3 501

You can associate an input text field with a particular IME context. When you switch between input fields, you can also switch the IME between Hiragana (Japanese), full-width numbers, half-width numbers, direct input, and so on. An IME lets users type non-ASCII text characters in multibyte languages, such as Chinese, Japanese, and Korean. For more information on working with IMEs, see the documentation for the operating system for which you are developing the application. For additional resources, see the following web sites:
http://www.microsoft.com/globaldev/default.mspx http://developer.apple.com/documentation/ http://java.sun.com/
Note: If an IME is not active on the user's computer, calls to IME methods or properties, other than Capabilities.hasIME, will fail. Once you manually activate an IME, subsequent ActionScript calls to IME methods and properties will work as expected. For example, if you are using a Japanese IME, you must activate it before you can call any IME method or property.
Checking if an IME is installed and enabled
Before you call any of the IME methods or properties, you should always check to see if the users computer currently has an IME installed and enabled. The following code illustrates how to check that the user has an IME both installed and active before you call any methods:
if (Capabilities.hasIME) { if (IME.enabled) { trace("IME is installed and enabled."); } else { trace("IME is installed but not enabled. Please enable your IME and try again."); } } else { trace("IME is not installed. Please install an IME and try again."); }
The previous code first checks to see if the user has an IME installed using the Capabilities.hasIME property. If this property is set to true, the code then checks whether the users IME is currently enabled, using the IME.enabled property.
Determining which IME conversion mode is currently enabled
When building multilingual applications, you may need to determine which conversion mode the user currently has active. The following code demonstrates how to check whether the user has an IME installed, and if so, which IME conversion mode is currently active:
if (Capabilities.hasIME) { switch (IME.conversionMode) { case IMEConversionMode.ALPHANUMERIC_FULL: tf.text = "Current conversion mode is alphanumeric (full-width)."; break;

/// <summary> /// Called by the proxy when an ActionScript ExternalInterface call /// is made by the SWF /// </summary> private object proxy_ExternalInterfaceCall(object sender, ExternalInterfaceCallEventArgs e) { switch (e.FunctionCall.FunctionName) { case "isReady": return isReady(); case "setSWFIsReady": setSWFIsReady(); return null; case "newMessage": newMessage((string)e.FunctionCall.Arguments[0]); return null;

ADOBE FLEX 3 532

case "statusChange": statusChange(); return null; default: return null; } }.
The method gets passed an ExternalInterfaceCallEventArgs instance, named e in this example. That object, in turn, has a FunctionCall property that is an instance of the ExternalInterfaceCall class. An ExternalInterfaceCall instance is a simple value object with two properties. The FunctionName property contains the function name specified in the ActionScript ExternalInterface.Call() statement. If any parameters are added in ActionScript, those parameters are included in the ExternalInterfaceCall objects Arguments property. In this case, the method that handles the event is simply a switch statement that acts like a traffic manager. The value of the FunctionName property (e.FunctionCall.FunctionName) determines which method of the AppForm class is called. The branches of the switch statement in the previous code listing demonstrate common method call scenarios. For instance, any method must return a value to ActionScript (for example, the isReady() method call) or else should return null (as seen in the other method calls). Accessing parameters passed from ActionScript is demonstrated in the newMessage() method call (which passes along a parameter e.FunctionCall.Arguments[0], the first element of the Arguments array). Calling an ActionScript function from C# using the ExternalInterfaceProxy class is even more straightforward than receiving a function call from ActionScript. To call an ActionScript function, you use the ExternalInterfaceProxy instances Call() method, as follows:

class definitions, multiple 498 class inheritance 112 class keyword 86 class object 34, 111 classes about 85 about writing code for 25 abstract not supported 87 attributes 86 base 101 body 87 built-in 34 characteristics 12 creating custom 24 declaring static and instance properties 87 default access control 89 defining namespaces inside 87 definitions of 86 dynamic 52, 76, 89 dynamic attribute 86 inheriting instance properties 102 internal attribute 89 organizing 26 private attribute 88 private classes 35 property attributes 88 protected attribute 89 public attribute 88 public classes 38 sealed 52 static properties 106 subclasses 101 top-level statements 87 classpath 37 clearInterval() function 127 clearTimeout() function 127 client system environment about 495 common tasks 495 Clipboard saving text 497 security 560 clock example 127 clone() method (BitmapData class) 383 clone() method (Event class) 235 close bracket 191 close parenthesis 191
code, ways to include in applications 21 ColdFusion 467 collision detection at pixel level 382 colon (:) operator 49 colors adjusting in display objects 278 altering specific 279 background 276 combining from different images 276 setting for display objects 279 ColorTransform class 314 colorTransform property 314 comma operator 45 comments about 19, 61 in XML 211, 212 communication between Flash Player instances 467 between SWF files 469 between SWF files in different domains 471 compatibility, Flash Player and FLV files 417 compiler options 157 compile-time type checking 49 complex values 48 compound literals 60 computeSpectrum() method (SoundMixer class) 550, 553, 554 concat() method Array class 151 String class 134 concatenation of strings 134 of XML objects 217 concatenation (+) operator, XMLList 217 conditional (?:) operator 69 conditionals 69 connect() method LocalConnection class 546 NetConnection class 546, 549 Socket class 546 XMLSocket class 473, 546 constants 62, 90, 233 constructors about 91 in ActionScript 1.0 109
content property (Loader class) 550 content, loading dynamically 285 contentLoaderInfo property 286, 557 contentType property 463 context menu, customizing 455 cookies 475 coordinate spaces defined 307 translating 309 Coordinated Universal Time (UTC) 123 core Error classes in ActionScript 180 core Error classes in ECMAScript 178 createBox() method 313 createGradientBox() method 299 cross-domain policy files 555 checkPolicyFile property and 287, 554 extracting data 553 img tag and 549 securityDomain property and 549 URLLoader and URLStream classes 555 cross-scripting 550 CSS defined 356 loading 364 styles 363 cue points triggering actions 403 in video 402 currentDomain property 557 currentTarget property 235 cursors, customizing 454 custom classes 24 custom data types, enumerations 96 custom error classes 175 custom LocalConnection client 468 D data loading external 462 security of 553, 556 sending to servers 466 data property (URLRequest class) 463 data structures 144 data types about 10 Boolean 53

 

Tags

TS 450 Convertible 2003 Turbo-13R Tagliasiepi Heredis 9 180I-MB Fishing 2 Strde485 Voyage 200 SP6000K AW12ECB8 VPC-CG10 Z7040 DMR-E53 Printer Satellite 2140 SHR-2082P250 EMP-TW520 RA-970BX Simrad FS20 OT-708 Powerdirector 7 F 07 NV-FJ623 Lavamat502 35-18 S 650BD KVT-827DVD PS50A416C LH-RH9691PA 4690N Ezmarker 7 CL1000N CDX-3180 Roland FP-9 Software 5 3 Ryobi 105R NV-FJ625AM Splendid 180 RE LK45C 6 0 TE 610E Qtek 8310 NV-HS800B DCR-DVD405 Officejet R45 Omizzy Sk5 PX-712A DVD-SH875M KV-29LS30K PCG-GRX500 Review NT-R19 Plus NWD-B103 V-MAX-2001 Analogique Builders Syncmaster 173P Vivicam 3350 RBC52SB Colibri 25 DR-BT22 Tricks 2 CV KDL-40EX401 RT22dasw M1610N SD-200 Enterprise 6 KR-V6090 RAR621 Motorola C113 ESF43011 HP 6500 KDV 500 SP101 Euro-thermostat K310I Intermatic DT7 Units ZFX305W NAD 7125 EC M350WVN 2033SN LA32A330 S12AHN-n44 Editor LFV882 GT Line DCS3440 Services Controller Vintage-PE1 GT122D Forms OT-C717 MHC-RG470

 

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