1. Flash CS3: Images look jagged when rotating, scaling, etc…

    Posted on: June 12, 2008

    Problem:

    Bitmap images in Flash look like crap when animated to rotate or scale.

    Solution:

    Right-click on the image in the library, select Properties and check Allow Smoothing

    Here’s a screenshot:

    Flash CS3 Allow Smoothing for Bitmaps

  2. Actionscript 3: Event.target returns children of movieclip

    Posted on: June 11, 2008

    Problem:

    You’ve added a listener to a movieclip, but the target returned is another movieclip or sprite within that movieclip.

    Solution:

    myMovieclip.mouseChildren = false;
    (more…)

  3. If I were on Wheel of Fortune…

    Posted on: June 3, 2008

    Ryan: I’d like to buy a vowel… a “B” please…

    Pat Sajak: “B” isn’t a vowel.

    Ryan: Oh really? Well why don’t you just go ahead and give that to me then Pat?


  4. Resizing bitmap images with Actionscript 3.0

    Posted on:

    Hey, I just did a quick experiment with bitmaps in AS3. Nothing fancy, I just loaded in an external JPEG, resized it into 3 different sizes and then drew them to stage. I’m sure someone can use this. For now, everything is hard-coded and the code is right in the .FLA. Maybe I’ll try and make a nice class out of this, although I’m sure there’s already one out there. Anyway, check out the code or download the FLA.

    var mediaLoader:Loader = new Loader();
    var bmFullsize:Bitmap;
    var bmHalfsize:Bitmap;
    var bmThumbsize:Bitmap;
     
    mediaLoader.load(new URLRequest("ostrich.jpg"));
    mediaLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, resizeImages);
     
    function resizeImages(e:Event):void
    {
    	bmFullsize = new Bitmap(e.target.content.bitmapData.clone());
    	bmHalfsize = new Bitmap(e.target.content.bitmapData.clone());
    	bmThumbsize = new Bitmap(e.target.content.bitmapData.clone());
    	bmFullsize.width = 300;
    	bmFullsize.height = 300;
    	bmFullsize.smoothing = true;
    	bmHalfsize.width = 150;
    	bmHalfsize.height = 150;
    	bmHalfsize.x = bmFullsize.width;
    	bmHalfsize.smoothing = true;
    	bmThumbsize.width = 75;
    	bmThumbsize.height = 75;
    	bmThumbsize.x = (bmFullsize.width + bmHalfsize.width);
    	bmThumbsize.smoothing = true;
    	showImages();
    }
     
    function showImages():void
    {
    	addChild(bmFullsize);
    	addChild(bmHalfsize);
    	addChild(bmThumbsize);
    }