If() conditions

Ok here is the project I am working on for me :slight_smile:
http://www.vivavidadesign.com/flash/FinishedPana.html

now it is pretty much done but I just have one problem. The thing I use to move the external image is a MOUSE_MOVE event listener, so when you stop the image stops moving. Now I think I can sort that out but I need some help.

the code for the movement is


if(dirX == "left"){
	panaArea.x += 10
	if( panaArea.x > 0) panaArea.x = 0;
 } if(dirX == "right"){
	 panaArea.x -= 10
	 if( panaArea.x < -590) panaArea.x = -590;

 } else {}

is there any way I can get the .x value to increase and decrease constantly? So as long as the mouse is dragged left, keep moving the MC right. Faster the longer it is held left, with a maximum value. So that it gives the effect of a tween?

For example, with the Keyboard you can have a
stage.addEventListener(KeyboardEvent.KEY_DOWN, function);
which keeps running as long as a key is down. I want something that can run as long as the mouse is dragged left.

I have tried many times but failed. Please help! :frowning: