I know that my approach is working, the prob is that i have a button to load
another image to the clip. That´s when all the problems come...

The width value is not respected anymore. That´s my prob.



On 2/8/06, erixtekila <[EMAIL PROTECTED]> wrote:
>
> _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
>



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