Custom Search

Making 'User Movable' Objects

This tutorial will teach you how to make an object within your Flash document that can be moved by the user. This is termed 'drag and drop' the object. This technique is very useful for making 'dress-up dolls' or simple 'token moving' games.

Step 1

Import a graphic to your document page (or draw a graphic using Flash). It doesn't matter whether it is a png, jpg or gif.

Step 2

Covert your graphic to a movieclip symbol (Modify - Covert to symbol - movieclip).

Step 3

'Right click' on your symbol and open the 'actions window' (Window - Actions) and paste the code below into the box.

on(press) {
startDrag(this);
}

on(release) {
stopDrag();
Mouse.show();
}

on(rollOut)
{
Mouse.show();
}

on(releaseOutside) {
stopDrag();
}

Et voilà! You have done it - test your movie.

Using layers you can have your symbol move behind or infront of other objects on the screen. Note that 'Fuzzy the Fuzzle' moves behind the tree but in front of the bush!

Content on this page requires a newer version of Adobe Flash Player.

Get Adobe Flash player