_xscale and _yscale should be your friends.
Your approach is good btw.
I am loading dynamically some images to a emptyClip. The images have
different width anh height values each one. What i wanted is that my
Clip
(or image after loading) had a maximum width of 163....
I am using this code at my Clip but it´s not working correctly. Can
anyone
help?
onClipEvent (data) {
maxWidth = 163;
if (this._width > maxWidth)
{
scaleFactor = maxWidth / this._width;
this._width = Math.floor (this._width * scaleFactor);
this._height = Math.floor (this._height * scaleFactor);
}
}
-----------
erixtekila
http://blog.v-i-a.net/
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders