TwelvestoneFlash

rotating jpgs loaded into flash


Sign in

  • Waiting for Godot ( 730 k posts )
    Just conversation.
  • Thunder Dome ( 23 k posts )
    Photoshop Tennis and Collabs.
  • Photography ( 5.1 k posts )
    For all you shutterbugs, sh...
  • Flash ( 18 k posts )
    ActionScripting to tweens, ...
  • Front End ( 5.9 k posts )
    general front end design an...
  • Back End ( 9.7 k posts )
    serverside scripting, progr...
  • Projects and Theory ( 12 k posts )
    This forum is for discussio...
  • FAQ ( 269 posts )
    All those nagging questions...
  • Design ( 17 k posts )
    graphics & all aspects of g...
  • Purgatory ( 3.6 k posts )
    12stone Jail, feel free to ...
Big Ern
 
2008-07-23

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

Big Ern
 
2008-07-23

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%... :|

DontBogartMe
 
2008-07-23

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 k

lithium
 
2008-07-24

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

DontBogartMe
 
2008-07-24

that won't work in FP7 will it?

Big Ern
 
2008-07-24

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

Big Ern
 
2008-07-24

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.

lithium
 
2008-07-24

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 k

Big Ern
 
2008-07-25

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.

tenPlus
 
2008-07-25

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?

Big Ern
 
2008-07-26

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.

:|

tenPlus
 
2008-07-27

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.

Sorry, you must be a member to post to a conversation. Either log in or sign up to get involved.
TwelvestoneFlash

rotating jpgs loaded into flash