# Moving the camera view when the mouse button down is detected. HELP!

**URL:** <https://forum.kirupa.com/t/moving-the-camera-view-when-the-mouse-button-down-is-detected-help/326807>\
**Category:** flash\
**Created:** [January 13, 2012, 3:01pm UTC](https://forum.kirupa.com/t/moving-the-camera-view-when-the-mouse-button-down-is-detected-help/326807 "2012-01-13T15:01:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Matt7](https://avatars.discourse-cdn.com/v4/letter/m/9fc29f/32.png) [@Matt7](https://forum.kirupa.com/u/Matt7)\
**Post date:** [January 13, 2012, 3:01pm UTC](https://forum.kirupa.com/t/moving-the-camera-view-when-the-mouse-button-down-is-detected-help/326807/1 "2012-01-13T15:01:32Z")

</div>

I am quite new to actionscript 3.0 but i’m sure this should be so simple.

The objective is to get the camera view to move when the mouse button is down.

Here I have managed to get the camera view to move forward using the UP arrow key:

```auto
cameraView.velocity = 0;
var fmovement = 0;
	
	if (Key.isDown(Key.UP)) {fmovement += 10; cameraView.velocity += 2;}
	else cameraView.velocity *= .95;

```

How can I change this to when the mouse click is down??? thanks in advance.
