
334
Writing ActionScript with Script Assist
20.
In the Actions Toolbox, navigate to ActionScript 2.0 Classes > Movie > MovieClip >
Events > onRelease, and double-click onRelease. The
onRelease
method is added to the
Actions panel.
21.
Click in the Object text box, and click the Target Path button.
The Target Path dialog box is displayed.
22.
In the Target Path dialog box, select the MyCircle movie clip instance, and ensure that the
Relative path radio button is selected. Click OK.
23.
Click the Add (+) button, and select Global Functions > MovieClip Control > stopDrag.
The finished code looks like this:
this.my_mc.onPress = function() {
startDrag(this, false, 0, 0, 300, 300);
};
this.my_mc.onRelease = function() {
stopDrag();
};
24.
Test your completed code by selecting Control > Test Movie. In the Test Movie window,
move the pointer over the circle you created, and drag it around the Text Movie window.
To learn more about writing ActionScript, see
Learning ActionScript 2.0 in Flash
.
Содержание FLASH 8-FLASH
Страница 1: ...Using Flash ...
Страница 12: ...12 Contents ...
Страница 110: ...110 Using Symbols Instances and Library Assets ...
Страница 128: ...128 Working with Color Strokes and Fills ...
Страница 156: ...156 Drawing ...
Страница 190: ...190 Working with Text ...
Страница 224: ...224 Working with Graphic Objects ...
Страница 270: ...270 Creating Motion ...
Страница 310: ...310 Working with Video ...
Страница 362: ...362 Working with Screens Flash Professional Only ...
Страница 386: ...386 Creating Multilanguage Text ...
Страница 454: ...454 Data Integration Flash Professional Only ...
Страница 500: ...500 Publishing ...
Страница 534: ...534 Creating Accessible Content ...