# Dynamic image resizing

**URL:** <https://forum.kirupa.com/t/dynamic-image-resizing/23706>\
**Category:** flash\
**Created:** [June 21, 2003, 7:20am UTC](https://forum.kirupa.com/t/dynamic-image-resizing/23706 "2003-06-21T07:20:11Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jinos](https://avatars.discourse-cdn.com/v4/letter/j/a9adbd/32.png) [@jinos](https://forum.kirupa.com/u/jinos)\
**Post date:** [June 21, 2003, 7:20am UTC](https://forum.kirupa.com/t/dynamic-image-resizing/23706/1 "2003-06-21T07:20:11Z")

</div>

hi, could anyone out there, how to acheive this following effect :

i have 3 images properly aligned in a 100 width 200 width area. i need one image to enlargeded 200 percent when i rollOver and at the same time dynamically resize the other two, maybe 50% of the original size, and still properly fit in the same area.

I will elaborate more if my question is not very much clear.  
Any help is highly appreciated.

thanks in advance  
jinos

---

<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:** [June 21, 2003, 10:40am UTC](https://forum.kirupa.com/t/dynamic-image-resizing/23706/2 "2003-06-21T10:40:47Z")

</div>

The good old Tsunami 🙂

Check this: [http://www.actionscript.org/showMovie.php?id=467](http://www.actionscript.org/showMovie.php?id=467)

pom :phil:

---

<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:** [June 22, 2003, 5:59am UTC](https://forum.kirupa.com/t/dynamic-image-resizing/23706/3 "2003-06-22T05:59:13Z")

</div>

but that link u posted is not working…any other working example? i have tried that tsunami example, but its a bit hard for me to grasp…maybe i am not that good in actionscripting…Any other help?

thanks a lot for trying to help me out.

---

<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:** [June 22, 2003, 10:32am UTC](https://forum.kirupa.com/t/dynamic-image-resizing/23706/4 "2003-06-22T10:32:05Z")

</div>

let me see if i can make the script from me head…

[AS]

//make the picture movies.Let’s say pic1, pic2, pic3  
//put this code in each of them

onClipEvent(Load){  
s = 5;  
t\_xscale = \_xscale;

}  
onClipEvent(EnterFrame){  
\_xscale = \_yscale = (t\_xscale - \_xscale)/s;  
}  
[/AS]  
Give them instances names like in my example above(pic1,pic2 and pic3).

Now put them in buttons and put the following code inside of them:

[AS]  
on(rollover){  
pic1.t\_xscale = 200;  
pic2.t\_xscale = 50;  
pic3.t\_xscale = 50;  
}  
on(rollout){  
pic1.t\_xscale = 100;  
pic2.t\_xscale = 100;  
pic3.t\_xscale = 100;  
[/AS]

Dunno it will work since i’m on a machine that doesn’t have Flash instaled but if it doesn’t work post a message with the problem to know what to corect.😉

---

<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:** [June 22, 2003, 5:08pm UTC](https://forum.kirupa.com/t/dynamic-image-resizing/23706/5 "2003-06-22T17:08:36Z")

</div>

what if i wanna resize a ractangulala image in a traptizium or a slimpy any other shape with curves.
