【AS2】Flash 8 中新增ActionScrip代码列表

      Flash平台 2005-9-14 11:3

New ActionScript in Flash 8

Documentation includes a page that lists the new ActionScript you can use with Flash Player 8. I am "reprinting" that information here. It's available in the Help panel here (search "additions to" with quotes):

Learning ActionScript 2.0 in Flash > What's New in Flash 8 ActionScript > New in ActionScript 2.0 and Flash 8 > Additions to the ActionScript language

And on LiveDocs here:

http://livedocs.macromedia.com/flash/8/main/00001133.html

Note that there is new information in the LiveDocs and this blog (ie: developments after "print time").

Read the extended entry for the entire lists!

New Classes

Format: Class Package Description

BevelFilter flash.filters Adds bevel effects to objects.

BitmapData flash.display Creates and manipulates arbitrarily sized transparent or opaque bitmap images.

BitmapFilter flash.display Is a base class for filter effects.

BlurFilter flash.filters Applies blurs to objects in Flash.

ColorMatrixFilter flash.filters Applies transformations to ARGB colors and alpha values.

ColorTransform flash.geom Adjusts color values in movie clips. The Color class is deprecated in favor of this class.

ConvolutionFilter flash.filters Applies matrix convolution filter effects.

DisplacementMapFilter flash.filters Uses pixel values from a BitmapData object to perform displacement on an object.

DropShadowFilter flash.filters Adds drop shadows to objects.

ExternalInterface flash.external Communicates by using ActionScript with the Flash Player container (the system holding the Flash application, such as a browser with JavaScript, or the desktop application).

FileReference flash.net Uploads and downloads files between the user's computer and a server.

FileReferenceList flash.net Selects one or more files to upload.

GlowFilter flash.filters Adds glow effects to objects.

GradientBevelFilter flash.filters Adds gradient bevels to objects.

GradientGlowFilter flash.filters Adds gradient glow effects to objects.

IME in the System class Manipulates the operating system's input method editor (IME) within Flash Player.

Locale mx.lang Controls how multilanguage text appears in a SWF file.

Matrix flash.geom Represents a transformation matrix that determines how to map points from one coordinate space to another.

Point flash.geom Represents a location in a two-dimensional coordinate system (x represents the horizontal axis and y represents the vertical axis).

Rectangle flash.geom Creates and modifies Rectangle objects.

TextRenderer flash.text Provides functionality for anti-aliasing embedded fonts.

Transform flash.geom Collects data about color transformations and coordinates manipulations that you apply to a MovieClip instance.

Note: Official support is added for the AsBroadcaster class in Flash 8. This class was not officially supported in Flash MX 2004.

Table 3 lists the new language elements (such as methods, properties, and parameters) added to existing classes in ActionScript.

New Language Elements in ActionScript Classes

Format: Element Type Description

clearTimeout Global function Cancels a specified setTimeout call. (See the ActionScript 2.0 Language Reference on LiveDocs for more information. http://livedocs.macromedia.com/flash/8/main/00001717.html)

setTimeout Global function Provides the ability to call a function after a specified delay (in milliseconds). (See the ActionScript 2.0 Language Reference on LiveDocs for more information. http://livedocs.macromedia.com/flash/8/main/00001717.html)

showRedrawRegions Global function Provides the ability for the debugger player to outline the regions of the screen that are being redrawn (that is, dirty regions that are being updated). The function has the player show what was redrawn, but does not let you control redraw regions.

Button.blendMode Property Sets the blending mode for the button instance.

Button.cacheAsBitmap Property Lets you cache the object as an internal bitmap representation of the instance.

Button.filters Property An indexed array that contains each filter object associated with the button.

Button.scale9Grid Property Rectangular region that defines nine scaling regions for the instance.

System.capabilities.hasIME Property Indicates if the system has an IME installed.

Date.getUTCYear Property Returns the year of this date, according to universal time.

Key.isAccessible() Method Returns a Boolean value that indicates whether the last key pressed may be accessed by other SWF files, depending on security restrictions.

LoadVars.onHTTPStatus Event handler Returns the status code that's returned from the server (for example, the value 404 for page not found). For more information, see http://livedocs.macromedia.com/flash/8/main/00002333.html in the ActionScript 2.0 Language Reference.

MovieClip.attachBitmap() Method Attaches a bitmap image to a movie clip.

MovieClip.beginBitmapFill() Method Fills a movie clip with a bitmap image.

spreadMethod, interpolationMethod, and focalPointRatio Parameters of the MovieClip.beginGradientFill() method The method fills a drawing area with a bitmap image, and the bitmap can be repeated or tiled to fill the area.

MovieClip.blendMode Property Sets the blending mode for the instance.

MovieClip.cacheAsBitmap Property Caches the object as an internal bitmap representation of the instance.

MovieClip.filters Property An indexed array that contains each filter object that's currently associated with the instance.

MovieClip.getRect() Method Returns properties that are the minimum and maximum coordinate values of the specified instance.

MovieClip.lineGradientStyle() Method Specifies a gradient line style that Flash uses when drawing a path.

pixelHinting, noScale, capsStyle, jointStyle, and miterLimit Parameters of the MovieClip.lineStyle() method These parameters specify kinds of line styles you can use when drawing lines.

MovieClip.opaqueBackground Property Sets the color of the movie clip's opaque (not transparent) background to the color that the RGB hexadecimal value specifies.

MovieClip.scale9Grid Property The rectangular region that defines nine scaling regions for the instance.

MovieClip.scrollRect Property Lets you quickly scroll movie clip content and have a window viewing larger content.

MovieClip.transform Property Lets you make settings regarding a movie clip's matrix, color transform, and pixel bounds.

status Parameter of the MovieClipLoader.onLoadComplete event handler Returns the status code that's returned from the server (for example, the value 404 for page not found).

MovieClipLoader.onLoadError Event handler Is invoked when a file loaded with MovieClipLoader.loadClip() fails to load.

NetStream.onCuePoint Event handler Is invoked when an embedded cue point is reached while playing an FLV file.

secure Parameter of the SharedObject.getLocal() method Determines whether access to this shared object is restricted to SWF files delivered over an HTTPS connection.

System.security.sandboxType Property Indicates the type of security sandbox in which the calling SWF file is operating.

TextField.antiAliasType Property Sets the type of anti-aliasing that you use for the TextField instance.

TextField.filters Property An indexed array that contains each filter object that's currently associated with the TextField instance.

TextField.gridFitType Property Sets the type of grid fitting that you use for the instance.

TextField.sharpness Property Sets the sharpness of the glyph edges for the TextField instance. You must set the antiAliasType() method to advanced if you use this property.

TextField.thickness Property Sets the thickness of the glyph edges in the TextField instance. You must set the antiAliasType() method to advanced if you use this property.

justify Value for the TextFormat.align property Justifies a specified paragraph.

TextFormat.indent Property Lets you use negative values.

TextFormat.kerning Property Lets you turn kerning on or off for the TextFormat object.

TextFormat.leading Property Lets you use negative leading, so the space between lines is less than the text height. This lets you put lines of text close together in your applications.

TextFormat.letterSpacing Property Lets you specify the amount of space that is uniformly distributed between characters.

Video._alpha Property The specified amount of transparency for the video object.

Video._height Property Indicates the height of the video instance.

Video._name Property Indicates the instance name of the video.

Video._parent Property Indicates the movie clip instance or object that contains the video instance.

Video._rotation Property Sets the amount of rotation of the video instance in degrees.

Video._visible Property Sets the visibility of a video instance.

Video._width Property Sets the width of the video instance.

Video._x Property Sets the x coordinate of the video instance.

Video._xmouse Property Sets the x coordinate of the mouse pointer position.

Video._xscale Property Sets the horizontal scale percentage of the video instance.

Video._y Property Sets the y coordinate of the video instance.

Video._ymouse Property Sets the y coordinate of the mouse pointer position.

Video._yscale Property Sets the vertical scale percentage of the video instance.

XML.onHTTPStatus Event handler Returns the status code that's returned from the server (for example, the value 404 for page not found).

XMLNode.localName Property of the XMLNode class Returns the full name of the XML node object (including the prefix and the local name).

XMLNode.namespaceURI Property Reads the URI of the namespace to which the XML nodes prefix resolves.

XMLNode.prefix Property Reads the prefix of the node name.

XMLNode.getNamespaceForPrefix() Method Returns the namespace URI associated with the specified prefix for the node.

XMLNode.getPrefixForNamespace Method Returns the prefix associated with a specified namespace URI for the node.

Note: Official support and documentation is added for the NetStream.onMetaData event handler in Flash 8.

【文章链接】

【官方文档】

标签集:TAGS:
回复Comments() 点击Count()

回复Comments

{commenttime}{commentauthor}

{CommentUrl}
{commentcontent}