![MACROMEDIA FLASH 8-FLASH Скачать руководство пользователя страница 264](http://html2.mh-extra.com/html/macromedia/flash-8-flash/flash-8-flash_tutorials-manual_3348958264.webp)
264 ActionScript: Work with Objects and Classes
Learn about extending existing
classes
The
extends
keyword in ActionScript 2.0 allows you to use all the
methods and properties of an existing class in a new class. For example, if
you wanted to define a class called Drag that inherited everything from the
MovieClip class, you could use the following:
class Drag extends MovieClip
{}
The Drag class now inherits all properties and methods from the existing
MovieClip class, and you can use MovieClip properties and methods
anywhere within the class definition, as in the following example:
class Drag extends MovieClip
{
// constructor
function Drag ()
{
onPress=doDrag;
onRelease=doDrop;
}
private function doDrag():Void
{
this.startDrag();
}
private function doDrop():Void
{
this.stopDrag();
}
}
NO
TE
The following ActionScript is an example only. Do not enter the script in
your lesson FLA file.
NO
T
E
The Convert to Symbol dialog box now offers a class field in which you
can associate visual objects (such as movie clip) with any class that you
define in ActionScript 2.0.
Содержание FLASH 8-FLASH
Страница 1: ...Flash Tutorials...
Страница 10: ...10 Contents...
Страница 12: ...12 Introduction...
Страница 42: ...42 Basic Tasks Creating a banner Part 1...
Страница 78: ...78 Basic Tasks Creating a banner Part 3...
Страница 88: ...88 Basic Tasks Create Accessible Flash Content...
Страница 106: ...106 Basic Tasks Create an Application...
Страница 116: ...116 Basic Tasks Use Layout Tools...
Страница 124: ...124 Basic Tasks Create Symbols and Instances...
Страница 134: ...134 Basic Tasks Add Button Animation and Navigation...
Страница 144: ...144 Basic Tasks Create a Presentation with Screens Flash Professional Only...
Страница 192: ...192 Creating Graphics Applying Gradients...
Страница 198: ...198 Creating Graphics Apply Graphic Filters and Blends Flash Professional Only...
Страница 224: ...224 ActionScript Use Script Assist mode...
Страница 268: ...268 ActionScript Work with Objects and Classes...
Страница 270: ...270 Data Integration Overview Flash Professional Only...