Flash Buttons Create a Draggable Button
Howdy folks, for those of you, who have often wondered how to create a button that can be dragged around the screen with the Flash program. Well, today, we’ll see exactly how to create such a draggable button.
1. create a rectangle shape, and convert this rectangle shape to a symbol of button type, and give it a name of btnDraggable, and click OK
2. enter a name for this button instance, eg. box
3. select Window > Actions, to open Actions panel
4. click and drag the ‘on’ action, which is under Global Functions > Movie Clip Control, to the script area on the right, and double-click on the press parameter
script area should now look like below:
on(press){
}
5. click after opening bracket, and press Enter
6. click and drag the ’startDrag’ action, which is under Global Functions > Movie Clip Control, to the script area on the right.
7. with cursor in the parameter of startDrag action, click ‘Insert a target path’ button
8. select the button instance called box (you gave the button instance name of box earlier), and click ok
script area should now look like below:
on(press){
startDrag(this);
}
9. click after the ending bracket
10. click and drag the ‘on’ action, which is under Global Functions > Movie Clip Control, to the script area on the right, and double-click on the release parameter
script area should now look like below:
on(press){
startDrag(this);
}
on(release){
}
11. click after opening bracket, and press Enter
12. click and drag the ’stopDrag’ action, which is under Global Functions > Movie Clip Control, to the script area on the right.
script area should now look like below:
on(press){
startDrag(this);
}
on(release){
stopDrag();
}
13. close actions panel
14. press Ctrl + Enter to Test Movie (you should now have a button which you can click and drag around)

Comments »
No comments yet.
RSS feed for comments on this post.