AS code 2.0: new language elements
The Flash ActionScript (AS) code control is interactive Flash achieve an important component of the animation software is different from the other specialty skills. This new release of the Flash MX Professional 2004 ActionScript language has been upgraded to 2.0, which is an object-oriented scripting language, the implementation of ECMA-262 standard scripting language support inheritance, and event-type model. ActionScript 2.0 language use can be prepared more robust scripts.
ActionScript 2.0 language of the new features include: a new language elements, improved editing and debugging tools, the introduction of more, the object-oriented programming model.
This series of articles will be presented in detail all the various AS 2.0 code new features and new security model and the old relationship between SWF files.
New and changing language elements
Flash MX Pro 2004 ActionScript 2.0 language, there are some new elements of the language and the language elements have done a useful improvement. (In alphabetical order for the following sequence)
Note: To use these elements must be in the documents released at the designated target player for the Flash 7 player.
(1) Array.sort () and Array.sortOn () method
Allows you to add parameters to specify additional sorting options, such as by descending and ascending sort order, whether the order is case-sensitive, and so on.
(2) Button.menu, MovieClip.menu attributes and TextField.menu
With the new ContextMenuItem class ContextMenu and work together so you can set up right quick menu options and buttons, film clips or text box the link between objects.
(3) Class and ContextMenuItem class ContextMenu
Right so you can quickly customize the menu.
(4) Error category try and throw and catch .. finally ordered ..
So you can implement more robust exception handling.
(5) LoadVars.addRequestHeader () and XML.addRequestHeader () method
Can be added or modified using the HTTP POST method sent the first (such as Content-Type or SOAPAction).
(6) MMExecute () function
Allow you to move scripts from the Flash JavaScript API release orders.
(7) Mouse.onMouseWheel incident
(Windows only) when the user using the mouse wheel to generate Mouse.onMouseWheel interception for the incident.
(8) MovieClip.getNextHighestDepth () method
So you can run in the period to create examples of film editing, and to ensure that they are the object of the father in the film clip in the z axis of space in front of other objects exaggerated. MovieClip.getInstanceAtDepth () method allows you to use as a search depth of indexing, visit the film clips to create dynamic examples.
(9) MovieClip.getSWFVersion () method
So you can determine the SWF files included in the support of the version of the Flash player.
(10) MovieClip.getTextSnapshot () method and the target TextSnapshot
So you can deal with film clips of static text box text.
(11) attributes MovieClip._lockroot
So that you can put a movie clip designated for inclusion in the inside of it and the root of any film clips film clips (_ root), or in a specified root _ Another film clip was included in the film clip to maintain its properties remain unchanged _ root .
(12) MovieClipLoader class
So you can monitor the document included in the progress of the film clips.
(13) NetConnection class category and NetStream
So you can broadcast local streaming video files (FLV).
(14) PrintJob Class
Let you (and users) of the Flash player with more printer control.
(15) Sound.onID3 incident handling functions
So you can visit the Sound contains MP3 files (sound) ID3 data in the object.
(16) Sound.ID3 attributes so you can visit as part of the MP3 files metadata.
(17) System category
Have a new objects and methods, and System.capabilities object to possess several new properties.
(18) attributes TextField.condenseWhite
So you can delete the browser rendering HTML text box of redundant space.
(19) attributes TextField.mouseWheelEnabled
So you can specify when the mouse pointer in the text box and rolling the mouse wheel users, whether the contents of a text box should be rolling.
(20) TextField.StyleSheet category
Allow you to create rules include text formatting (such as font size, color and style of other formats) style sheet object.
(21) TextField.styleSheet property
So you can bring a style sheet object assigned to the text box.
(22) TextFormat.getTextExtent () method
Receive a new set of parameters, and the return of objects it contains a new member.
(23) XML.addRequestHeader () method
So you can add or change the method of using POST HTTP request sent the first (such as Content-Type or SOAPAction).
New security model and the old SWF files
Flash Player the past two domain is identified with the same rules as it is in the Flash 7 player has been changed. In addition, a decision from the HTTP domain SWF files can visit and how HTTPS visit from the domain of SWF files, HTTPS domain from the data included in the rules have changed. In most cases, the impact of these changes nothing unless users, especially against Flash 7 player derived SWF files.
However, if for Flash 6 player or earlier versions of the players released SWF files, the document will be stored in the server in the data included in the document, and if the document in Flash 7 player in the player, users might see before, there has never been a dialog box asks whether to permit the visit. We can store data through the implementation of a site in the strategy document is to prevent the dialog box is displayed.
If you are using runtime shared libraries may also need to implement strategy document. If loading or loading of SWF files against Flash 7 player releases, and they do not come from the same domain, it is necessary to use a strategy document to set permission to visit.
Tags: css code, css code generator, css color code, css language dreamweaver css, xhtml elements xhtml source






Leave a Reply