Flash Window or Movie Move – Dragable Content Using ActionScript

by Hiroshi on October 26, 2008

in Actionscript, Adobe Flash, Control, Drag, Tips, Utilities

Drag-able content is flash looks very sexy. Suppose you created a movie clip that had all the sound controls in it. You can enable it to drag freely across the main movie or within fixed parameters. I used it once at sound control panel. I had to create a movie clip that is able to appear and disappear and also it was able to move within fixed parameters. Its so cool.

Simple Movie Drag

Create a movieclip and name it d or whatever you like. In movie clip create a button and put actionscript on it.

on (press) {
startDrag("/d");
}
on (release) {
stopDrag();
}

Download Drag Script

Drag with Parameters and Control

To apply restrictions for specific area in which movie clip is drag able consider this example.

on (press) {
startDrag("_root.window", false, 92, 92, 458, 308);
}
on (release) {
stopDrag();
}

92, 92, 458, 308 are left, right, top and bottom parameters boundries window cant cross. Window is movie clip name which is concerned.

Download Script

Multiple Objects Drag Example

Movie Properties Control

Move movie clip right, left, up, down, resize, rotate, brightness, contrast etc

Download Movie Properties Control Example

Related Posts

Previous post:

Next post: