![MACROMEDIA FLASH 8-FLASH Скачать руководство пользователя страница 265](http://html2.mh-extra.com/html/macromedia/flash-8-flash/flash-8-flash_tutorials-manual_3348958265.webp)
Extend the MovieClip class to create a new class 265
Extend the MovieClip class to
create a new class
You’ll create a new class by extending the built-in MovieClip class.
1.
Create a new Flash document and name it
Shape.fla
.
2.
Using the drawing tools, draw a shape on the Stage.
With the entire shape selected, right-click (Windows) or Control-click
(Macintosh) the shape and select Convert to Symbol from the
context menu.
3.
In the Convert to Symbol dialog box, select Movie Clip as the behavior,
and click Advanced.
Select Export for ActionScript.
4.
In the Name text box, enter
myShape
.
5.
In the AS 2.0 Class text box, enter
Drag
.
Click OK. This associates the movie clip with the Drag class that
you’ll create.
6.
Using the Property inspector, assign the movie clip an instance name,
then save the FLA file.
7.
Create an ActionScript file by doing one of the following:
■
If you’re using Flash Professional 8, select File > New > ActionScript
File (Not Flash Document). Save the document with the name
Drag
, in the same location where you saved Shape.fla.
■
If you’re using Flash Basic 8, open a text editor, such as Notepad.
Save the file with the name
Drag.as
, in the same location where you
saved Shape.fla.
NO
TE
A finished sample file of the document you just created, named
handson3.fla, is located in your finished files folder. For the path, see
“Set
up your workspace” on page 256
.
Содержание 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...