Skip to navigation

malevolent design weblog

This blog is now defunct, but you can find more stuff over at my personal site

New, Improved Flash ‘Fuzzy Felt’

Last year I wrote about how to create a drag-and-drop activity with simple ActionScript, and afterwards realised I should’ve added a couple more lines of code. Here’s an improved version that stops pieces getting dragged off the edge, and moves them to the front when they’re clicked.

To create a draggable piece, put a graphic/animation into a button, and put this script on the button:

on (press)
	_parent.topDepth ++;
on (release, releaseOutside)

Then put the button into a movie clip. Repeat for all pieces.

Here’s an updated example FLA (Flash MX or newer required).


Comments are now closed for this entry.