as3 blog

thoughts on actionscript 3 development

   Aug 05

Adding compression to embedded .png files

Until today i was using the Flash IDE to add compression to .png files, then exporting them inside a .swc file for use in FDT. No need! The embed tag has a compression parameter.

public class Main extends Sprite
  {
    [Embed(source="../assets/star.png", mimeType="image/png", compression=true, quality=90)]
    private var Star : Class;

    public function Main()
    {
      var star : Bitmap = new Star();
      addChild(star);
    }
  }
									

You can follow any responses to this entry through the RSS 2.0 feed. You can skip to the end and leave a response. Pinging is currently not allowed.

Leave a Reply

Your email address will not be published. Required fields are marked *

* 7+3=?

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>