Hello,

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);
    }
}

Thanks.

--
------------------------------------------------------------
Mário Jorge
Icq: 164987050
Msn + Mail: [EMAIL PROTECTED]
Web: http://www.beedigital.net
Blog: http://www.beedigital.net/blog
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to