Do you even need to cast as Bitmap? can't you just do
container.forceSmoothing = true; ? Oops - that might be AS2.

On Tue, Jul 22, 2008 at 12:59 PM, Matt S. <[EMAIL PROTECTED]> wrote:

> smoothing. Cast the image as a Bitmap and apply smoothing, and you'll
> be able to resize without image degradation.
>
> function loadTheImage(iMG):void {
>        url = "uploads/"+iMG+".jpg";
>        var request:URLRequest = new URLRequest(url);
>        var loader:Loader = new Loader();
>        loader.load(request);
>        loader.contentLoaderInfo.addEventListener(Event.COMPLETE,
> onThumbLoad);
>        loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS,
> preLoader);
>
> }
>
> function onThumbLoad(e:Event):void {
>        //"cast" the loaded content as Bitmap
>        var b:Bitmap;
>        b = e.target.content as Bitmap;
>        b.smoothing = true;
>
>        this.img_mc.addChild(b);
> }
>
> .m
>
>
> On Tue, Jul 22, 2008 at 12:40 PM, Lehr, Theodore M (N-SGIS)
> <[EMAIL PROTECTED]> wrote:
> > I have a small movie where I am importing images and dynamically
> > resizing them - the problem is that when it is shrunken - it gets really
> > pixellated - I am using jpegs - is there a way to make it so they look
> > better - maybe import a different type of image ?????
> >
> > _______________________________________________
> > Flashcoders mailing list
> > Flashcoders@chattyfig.figleaf.com
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
> _______________________________________________
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to