Image autofit

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.

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

TD

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

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

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??

say its a 200x200 area…

_xscale=200
_yscale=200

and it will make the image 200x200

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?

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!

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?

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

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

any idea how to change the location of the nav ?