# Scale as long as mouse is pressed?

**URL:** <https://forum.kirupa.com/t/scale-as-long-as-mouse-is-pressed/61680>\
**Category:** flash\
**Created:** [August 20, 2004, 3:14pm UTC](https://forum.kirupa.com/t/scale-as-long-as-mouse-is-pressed/61680 "2004-08-20T15:14:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Uli](https://avatars.discourse-cdn.com/v4/letter/u/ccd318/32.png) [@Uli](https://forum.kirupa.com/u/Uli)\
**Post date:** [August 20, 2004, 3:14pm UTC](https://forum.kirupa.com/t/scale-as-long-as-mouse-is-pressed/61680/1 "2004-08-20T15:14:14Z")

</div>

Hello,

I’d like to scale a MC depending on the action of the mouse:  
if you press and move the mouse up, the MC scales down and the contrary…  
Any idea on how to do that??

I started with

```php

onClipEvent (enterFrame) {
	this.onMouseDown = function() {
		this.onMouseMove = function() {
			if (_root._ymouse<prevposy) {
				this._xscale = this._yscale += 20;
			}
		};
	};
(...)

```

But it just does it as i pressed, and i wanna “drag scale”…  
TiA 🙂
