Question about draggable mask


	I am a graphic artist and I am a beginner at actionscript.  I saw a draggable mask effect found here 

I am wondering is it possible to do the same thing with keyboard commands instead of a mouse drag? The project im working on is a picture of a darkened room with objects in it. The user will use a flashlight to look for items in this room. The movie clip will have the lit room with the objects in it while the background will be the darkened room. The reason i want the use of the keyboard to use the flash light is because, once they find an object…the user will use the mouse to select and drag the obljects to an item box. I am wondering if u can help me with this.

Well, yes, it’s doable. I don’t know how this tutorial is done, but there’s a tutorial on this site explaining how to control a clip with the arrow keys (and a draggable mask tutorial by the way :beam: )

pom :cowboy:

ive actually done the drag mask tut on this site. but its hard to explain. when i make the movie clip move with the arrow keys. the background that is in the movie clip doesnt move…i dont know how to write the code to tell the background in the movie clip to move so that it matches the background. when i do the drag mouse script it works fine. I just want to do the same effect but instead of using the mouse to drag the flash light…i want to use the arrow keys.

here you go… i commented it… hope it is explained ok… i added the easing formula to make the movement a little smoother… if you want it without easing there isnt much to be changed… just ask if you have any questions

oh yeah… BTW this is MX…

lol almost forgot… just in case you are wondering all of the code is inside the mask (the circle)