Summary - MACROMEDIA FLASH MX 2004-LEARNING FLASH Manual

Learning flash
Table of Contents

Advertisement

Define private methods in the class that use the existing movie clip methods,
9.
:
stopDrag()
class Drag extends MovieClip
{
function Drag()
{
onPress=doDrag;
onRelease=doDrop;
}
private function doDrag():Void
{
this.startDrag();
}
private function doDrop():Void
{
this.stopDrag()
}
}
Save the ActionScript file.
10.
Test the Shape.fla document. You should be able to drag the movie clip.
11.
Note: An example of the ActionScript file you just created, named Drag.as, is located in your finished
files folder. For the path, see

Summary

Congratulations on learning how to work with objects and classes in ActionScript 2.0. In a few
minutes, you learned how to accomplish the following tasks:
Create and use objects from existing classes
Create a custom class
Create a property within a custom class
Create a method within a custom class
Extend an existing class and take advantage of inheritance
"Set up your workspace" on page
startDrag()
113.
Summary
and
121

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH MX 2004-LEARNING FLASH and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Flash mx 2004 - actionscript

Table of Contents