# Can you dynamically scale a draggable object?

**URL:** <https://forum.kirupa.com/t/can-you-dynamically-scale-a-draggable-object/59240>\
**Category:** flash\
**Created:** [July 29, 2004, 3:32pm UTC](https://forum.kirupa.com/t/can-you-dynamically-scale-a-draggable-object/59240 "2004-07-29T15:32:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jaz](https://avatars.discourse-cdn.com/v4/letter/j/4491bb/32.png) [@jaz](https://forum.kirupa.com/u/jaz)\
**Post date:** [July 29, 2004, 3:32pm UTC](https://forum.kirupa.com/t/can-you-dynamically-scale-a-draggable-object/59240/1 "2004-07-29T15:32:39Z")

</div>

Greetings all,

I wonder if anyone can help me with a little problem?

Imagine you are dragging a movieclip around the stage with your cursor using:

startDrag("", true);

I want to scale that MC bigger and smaller relative to my \_ymouse position

I know how to set up the variables to do this, and then to retrieve this data and apply it to scale an object using a loop.

But not when there’s a startDrag("", true); involved.

I’ve tried putting the loop down inside the dragging movieclip, and not on the main timeline, but startDrag("", true); always inhibits the loop.

Anyone know how to get round this?

Thanks  
jaz

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 29, 2004, 4:04pm UTC](https://forum.kirupa.com/t/can-you-dynamically-scale-a-draggable-object/59240/2 "2004-07-29T16:04:51Z")

</div>

Hey jaz, to me your problem isnt that little. I managed to put up some code because I’ve been wondering how this could be done but never had time to get to it. I have to say, what I got in the end is pretty nice. =)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 29, 2004, 4:55pm UTC](https://forum.kirupa.com/t/can-you-dynamically-scale-a-draggable-object/59240/3 "2004-07-29T16:55:30Z")

</div>

Cheers Bob, thanks for the impressive code. I agree, you’ve come up with a nice looking resizer…

I like the use of onEnterFrame instead of a timeline loop, I think that is the answer I’ve been looking for! I’m going to have to mull it all over a bit until I’ve got my head around it.

Thanks

Jaz
