PDA

View Full Version : [MX04] Resizing mc WITHOUT xscale



Rasper
November 4th, 2004, 07:54 AM
Hi there,

I'm having a problem which is very well known I think.
I'm having a buch of pictures of different height and width, which have to be loaded into different movieclips, and resized to 'bout 100px * 100px (so they're all the same size ~> thumbnails)

The problem width xscale and yscale, is that you have to specify the amount the movieclip/image resizes, in percentages instead of in pixels.

So my question, is there ANY way you can resize a dynamically loaded JPEG to EXACTLY 100*100 pixels ????

Here's my code (which doesn't work):

movieMain.thumbsHolder.createEmptyMovieClip("afbeelding" + j, j);
imageHolder = movieMain.thumbsHolder["afbeelding" + j]; imageHolder.loadMovie(path);
imageHolder._y = j * 200;
imageHolder._height = 100;
imageHolder._width = 100;

murka390
November 4th, 2004, 11:41 AM
have you tried it like this?

imageholder._height = 100;
imageholder._width = 100

Rasper
November 4th, 2004, 12:03 PM
have you tried it like this?

imageholder._height = 100;
imageholder._width = 100:h:
Isn't that the exact same thing I'm doing in the code I supplied earlier??

senocular
November 4th, 2004, 12:25 PM
size it after the image loads

Rasper
November 4th, 2004, 12:52 PM
size it after the image loads
I've been working on this piece of code all day (well not only this ofcourse) and tried to resize it when the images were loaded, but no success.
But after reading your post I gave it another shot, and it WORKED!
After fiddling with the code, I must have changed something which did the trick.

So thank you :beer: