When I load a jpeg into a movieclip in flash and rotate it, the image looks choppy.
Is there any way to fix this (anti-aliasing or something)?
I know this is a flash junior problem and I can't believe I haven't run into it before (I usually use vector images), but I would appreciate any help!
btw - I was going to try using Matrix.rotate, but I have to publish to Flash player 7 and that is not available until Flash player 8
sorted it with this line:
movieclip._quality = "BEST";
I don't understand why this works when I already had my jpeg quality jacked up to 100 in the publish settings. Apparently "BEST" is higher than 100%... :|
that "BEST" setting refers to the quality of the Flash playback - not the JPG. So you must have had your 100% quality JPGs being played inside a "SHITTY" quality Flash SWF 
you need to apply smoothing to the image after it loads. I have a utility method that i use to do the work for me.
package com.snepo.util { import flash.display.Loader; import flash.display.Bitmap;
/**
* @author andrewwright
*/
public class ImageUtil
{
public static function smooth ( loader : Loader ) : void
{
var bmp : Bitmap = loader.content as Bitmap;
bmp.smoothing = true;
}
}
}
usage:
var image:Loader = new Loader(); image.load ( new URLRequest ( "/path/to/img.png" ); image.contentLoaderInfo.addEventListener ( Event.COMPLETE, onImageLoaded );
function onImageLoaded ( evt:Event ):void { var loader:Loader = ( evt.target as LoaderInfo ).loader as Loader; ImageUtil.smooth ( loader );
this.addChild ( loader );
}
hope it helps.
/A
that won't work in FP7 will it?
I was just about to say the same thing... Will that work in FP7?
If not, I will definitely keep it in mind for later projects, thanks lith!
And DBM, but I LIKE making SHITTY swfs! 
I think this might be the old school version of lith's AS3:
oListener.onLoadInit = function(mcMovieClip:Object) {
var bitmap:BitmapData = new BitmapData( mcMovieClip._width, mcMovieClip._height, true);
mcMovieClip.attachBitmap( bitmap, this.getNextHighestDepth(), "auto", true);
bitmap.draw(mcMovieClip);
}
EDIT:-- And the BitmapData class is not available on FP7 either... d'oh.
are people honestly still targeting fp7? fp9 is at 98% and fp10 beta is already released. i'd rather stand on my hands and cum in my mouth than write AS2 anymore. blech!
well, good luck with it anyways 
I've been told that I am lucky to be developing for FP7. Some of the guys working here are developing for FP5!
I. shit. you. not.
Originally posted by: ernieweaselfat Some of the guys working here are developing for FP5!
:eek:
that's one big rock they're living under. What's the target market?
Originally posted by: tenPlus [quote]Originally posted by: ernieweaselfat Some of the guys working here are developing for FP5!
:eek:
that's one big rock they're living under. What's the target market?[/quote]
We're developing employee training simulations (for some rather large companies).
They'd rather have shitty old sims than make sure they're employee computers have the latest copy of flash.
:|
sure, I understand what you're saying. It must be frustrating.
It also highlights the fact that those terminals do not have access to any outside information because as we all know - it doesn't take much surfing to run into a page with a flash app which requires the latest update. In this day and age I wonder what percentage of the population still works for an employer that doesn't allow some sort of outside access. While not quite the dark ages, an employer is not being very progressive blocking outside access. I am given reports of employee's who fall outside the acceptable use guidlines and then haul them up for a warning. It's now a part of the overall process of staff managment.