# \[howto\] elastic image...action

**URL:** https://forum.kirupa.com/t/howto-elastic-image-action/7770
**Category:** flash
**Created:** [November 7, 2002, 12:26pm UTC](https://forum.kirupa.com/t/howto-elastic-image-action/7770 "2002-11-07T12:26:02Z")
**Posts on this page:** 13
**Page:** 1

<div class="post-metadata">

### Author: ![sWo0p](https://avatars.discourse-cdn.com/v4/letter/s/f0a364/32.png) [@sWo0p](https://forum.kirupa.com/u/sWo0p)
#### Post date: [November 7, 2002, 12:26pm UTC](https://forum.kirupa.com/t/howto-elastic-image-action/7770/1 "2002-11-07T12:26:02Z")

</div>

Hi im working on en site that needs a bouncie image, but all the tuts and movie clip i can find only work with onmouseover effect… i dont want onmouseover but bounce when the clip loads…

maybe someone can rearange this script so it bouces on clipload…

this in the 1st frame:

```auto
Movieclip.prototype.elasticScale = function(target, accel, convert) {
	xScale = xScale * accel + (target - this._xscale) * convert 
	yScale = yScale * accel + (target - this._yscale) * convert 
	this._xscale += xScale
	this._yscale += yScale
}

```

and this in the movie clip:

```auto
onClipEvent (enterFrame) {
	if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
		elasticScale(150, 0.9, 0.1)
	} else {
		elasticScale(100, 0.9, 0.1)
	}
}

```

please can someone help?

---

<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: [November 7, 2002, 6:12pm UTC](https://forum.kirupa.com/t/howto-elastic-image-action/7770/2 "2002-11-07T18:12:52Z")

</div>

Can’t you just do…

```auto
onClipEvent (enterFrame) {
	elasticScale(150, 0.9, 0.1);
}

```

???

---

<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: [November 7, 2002, 7:19pm UTC](https://forum.kirupa.com/t/howto-elastic-image-action/7770/3 "2002-11-07T19:19:28Z")

</div>

okay i tryed your idea and must laugh 🙂  
i always seem to have the bigest codes…

dhamm you juist made my code 2 times smaller 🙂

butt okay back to the code… you solution does work but did’nt give me the effect that i was going for…

i need to give in a minimu point of start and a maximun point of end…

of he jumps up from say 1 to 100% and stops

thats may goal…!!

---

<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: [November 7, 2002, 8:27pm UTC](https://forum.kirupa.com/t/howto-elastic-image-action/7770/4 "2002-11-07T20:27:16Z")

</div>

yesssss… i did it 🙂

dhuuu i was so simple 🙂

i juist made my movie clip very small

thanks for help…~!

---

<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: [November 7, 2002, 10:11pm UTC](https://forum.kirupa.com/t/howto-elastic-image-action/7770/5 "2002-11-07T22:11:04Z")

</div>

Awesome 🙂

I am glad I could help. And don’t worry about using too much code… I have the same problem. I can’t optimize my code for anything.

I can optimize it a bit, but I always seem to miss something that I can optimize 🙂

---

<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: [November 7, 2002, 10:13pm UTC](https://forum.kirupa.com/t/howto-elastic-image-action/7770/6 "2002-11-07T22:13:46Z")

</div>

well, i got a good resources on optimizing ur Actionscript, if it is needed, i would post it as a thread

---

<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: [November 7, 2002, 10:15pm UTC](https://forum.kirupa.com/t/howto-elastic-image-action/7770/7 "2002-11-07T22:15:25Z")

</div>

If it is the one that was posted on bits forum, I already have it 🙂

A lot of it I know how to do, I just overlook it :-\ 😛

---

<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: [November 7, 2002, 10:16pm UTC](https://forum.kirupa.com/t/howto-elastic-image-action/7770/8 "2002-11-07T22:16:41Z")

</div>

which one, “flasm”?

---

<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: [November 7, 2002, 10:19pm UTC](https://forum.kirupa.com/t/howto-elastic-image-action/7770/9 "2002-11-07T22:19:51Z")

</div>

Yep 🙂

---

<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: [November 8, 2002, 1:20pm UTC](https://forum.kirupa.com/t/howto-elastic-image-action/7770/10 "2002-11-08T13:20:23Z")

</div>

i think its i need to show you the result 😛 for al you hard work 🙂

[swf=“[http://213.46.31.46/other.designs/sneaknet//flash/cyric\_new.swf](http://213.46.31.46/other.designs/sneaknet//flash/cyric_new.swf) height=279 width=230”][/swf]

It’s a work in progress… 🙂 (use your mouse over the image)  
check rest of the site [here](http://213.46.31.46/other.designs/sneaknet/index.html) tell me what you think of it 🙂 (oh yeh and dont minde the button menu 🙂

Added a little extra stuff to it, if you wanne see the code ask and i’ll post it 🙂

---

<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: [November 8, 2002, 5:08pm UTC](https://forum.kirupa.com/t/howto-elastic-image-action/7770/11 "2002-11-08T17:08:34Z")

</div>

Thats pretty good. Good job 🙂

One question about the site though… why do you have the name of the link come up next to the name of the link when you roll over it on the main menu?

---

<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: [November 8, 2002, 6:09pm UTC](https://forum.kirupa.com/t/howto-elastic-image-action/7770/12 "2002-11-08T18:09:58Z")

</div>

Like i say, dont minde the buttons… 🙂 its a little error in the script 🙂

did’nt get to it yet 🙂 bin buzy FLASHING

---

<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: [November 8, 2002, 7:29pm UTC](https://forum.kirupa.com/t/howto-elastic-image-action/7770/13 "2002-11-08T19:29:11Z")

</div>

Oh ok 🙂

Good Luck with everything!
