# Image autofit

**URL:** https://forum.kirupa.com/t/image-autofit/25563
**Category:** Uncategorized
**Created:** [July 14, 2003, 2:33pm UTC](https://forum.kirupa.com/t/image-autofit/25563 "2003-07-14T14:33:25Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![elietabet](https://avatars.discourse-cdn.com/v4/letter/e/a9a28c/32.png) [@elietabet](https://forum.kirupa.com/u/elietabet)
#### Post date: [July 14, 2003, 2:33pm UTC](https://forum.kirupa.com/t/image-autofit/25563/1 "2003-07-14T14:33:25Z")

</div>

my picture section includes an MC slide show with “next/previous” buttons.

is there any way:  
1- to make this MC calls JPG pictures from a directory.  
2- make them autofit inside the mask.

---

<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 14, 2003, 2:55pm UTC](https://forum.kirupa.com/t/image-autofit/25563/2 "2003-07-14T14:55:39Z")

</div>

ilyas posted this file recently. I have not looked at it, but I believe that it is what you are looking for.

TD

---

<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 14, 2003, 3:39pm UTC](https://forum.kirupa.com/t/image-autofit/25563/3 "2003-07-14T15:39:00Z")

</div>

i got it but do not know what exactly should be done with it ? is ilyas around ?

---

<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 14, 2003, 4:00pm UTC](https://forum.kirupa.com/t/image-autofit/25563/4 "2003-07-14T16:00:42Z")

</div>

look athe the actions in the first keyframe.

Change the image names to match your image names.

i.e. image1.jppg would be listed in the actions as “image1”.

Max width and height is 500 pixels.

TD

---

<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 14, 2003, 4:30pm UTC](https://forum.kirupa.com/t/image-autofit/25563/5 "2003-07-14T16:30:51Z")

</div>

Hue? :hangover:  
I don’t understand what you’re trying to do: constrain the jpgs to a shape, or change the shape to fit the pic??

---

<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 14, 2003, 4:57pm UTC](https://forum.kirupa.com/t/image-autofit/25563/6 "2003-07-14T16:57:52Z")

</div>

say its a 200x200 area…

\_xscale=200  
\_yscale=200

and it will make the image 200x200

---

<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 14, 2003, 5:23pm UTC](https://forum.kirupa.com/t/image-autofit/25563/7 "2003-07-14T17:23:51Z")

</div>

this is just a thought, but could you like have some script that asks for the height and width of the image and then if its bigger than a certain size…it shrinks it back down to the size you want?

for instance: lets say your mc that you load your pics into is 200x200 and the first pic you load in is 250x250

after the pic is loaded you just place the mc’s height and width (which is now the pics) into 2 variables…you do a simple if…then statement and if the pic is bigger than 200x200 you resize the mc (not the pic) to that size…

this was just a random idea that came to me…hope it works?

---

<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 14, 2003, 5:24pm UTC](https://forum.kirupa.com/t/image-autofit/25563/8 "2003-07-14T17:24:57Z")

</div>

ok, i feel like an idiot…i went back and read mdi’s posts…and hes way is a whole lot easier…stupid me…doh!

---

<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 14, 2003, 6:17pm UTC](https://forum.kirupa.com/t/image-autofit/25563/9 "2003-07-14T18:17:12Z")

</div>

ilyas … blackpulp gave a good option … my photos are big and i want the MC to shrink them to fit inside the “pictures” box, which means inside the mask, which also is 150x150.

also, i was wondering how to change the position of those navigation buttons … what i have in mind is this: i will change the pics names to 1,2,3,… and put the nav below the photos, then my visitors will choose pic 1, pic 2, … got 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: [July 14, 2003, 6:28pm UTC](https://forum.kirupa.com/t/image-autofit/25563/10 "2003-07-14T18:28:45Z")

</div>

oh btw … what if my pics are in another directory? should i put “direc/pic1”, “direc/pic2” …

---

<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 14, 2003, 6:39pm UTC](https://forum.kirupa.com/t/image-autofit/25563/11 "2003-07-14T18:39:06Z")

</div>

well you should put their location relative to the location of the flash movie on your server…

---

<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 14, 2003, 9:59pm UTC](https://forum.kirupa.com/t/image-autofit/25563/12 "2003-07-14T21:59:26Z")

</div>

any idea how to change the location of the nav ?
