# Help (FlashMX)

**URL:** https://forum.kirupa.com/t/help-flashmx/24514
**Category:** flash
**Created:** [July 1, 2003, 6:15pm UTC](https://forum.kirupa.com/t/help-flashmx/24514 "2003-07-01T18:15:11Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Bolto\_Crank](https://avatars.discourse-cdn.com/v4/letter/b/b5ac83/32.png) [@Bolto\_Crank](https://forum.kirupa.com/u/Bolto_Crank)
#### Post date: [July 1, 2003, 6:15pm UTC](https://forum.kirupa.com/t/help-flashmx/24514/1 "2003-07-01T18:15:11Z")

</div>

I’v got a photo in a movie clip. I got this code in the actionscript pane of the movie clip:

onClipEvent (load) {  
speed = 10;  
x = 100;  
y = 100;  
regul = “0”;  
}  
onClipEvent (mouseUp) {  
if (regul == “0”) {  
x = 300;  
y = 310;  
regul = “1”;  
} else if (regul == “1”) {  
x = 100;  
y = 100;  
regul = “0”;  
}  
}  
onClipEvent (enterFrame) {  
\_xscale += (x-\_xscale)/speed;  
\_yscale += (y-\_yscale)/speed;  
}

I want to make this code to work only when i click on the movie clip.

Sorry but i’m portuguese, my english is very poor  
thanx 🙂

---

<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 1, 2003, 10:13pm UTC](https://forum.kirupa.com/t/help-flashmx/24514/2 "2003-07-01T22:13:26Z")

</div>

Yes, this code does indeed work; however i’m not sure if it works the way you want it to. The movieclip expands and shrinks everytime you click on the movieclip. Can you please specify exactly what you want to do?

---

<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 1, 2003, 11:54pm UTC](https://forum.kirupa.com/t/help-flashmx/24514/3 "2003-07-01T23:54:32Z")

</div>

I am assuming that you want the movie clip to only expand instead of expand and then compress on the next clip, but then again I have a feeling I am still wrong with what you need. Just in case I took out the if statement and made it so that it could only expand.

```auto
onClipEvent (load) {
speed = 10;
x = 100;
y = 100;
}
onClipEvent (mouseUp) {
x += 300;
y += 300;
}
onClipEvent (enterFrame) {
_xscale += (x-_xscale)/speed;
_yscale += (y-_yscale)/speed;
}

```

---

<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 2, 2003, 1:05am UTC](https://forum.kirupa.com/t/help-flashmx/24514/4 "2003-07-02T01:05:39Z")

</div>

I want to make the code work only when i click on the photo.
