flash.sampler.getSize()
is a handy tool for figuring out how much memory a class instance uses. However, it is often flat-out wrong. Today’s article tries it out on a variety of classes to find out which ones it works on and which ones it doesn’t.
Posts Tagged bitmapdata
Last week’s article showed a variety of tricks for saving memory with ByteArray
. Today’s article explores some tricks to use with BitmapData
to save even more memory.
In almost all circumstances, Stage3D
requires you to provide textures with power-of-two dimensions. This is often inconvenient as most images are not already sized that way. Today’s article provides a simple class to easily build a texture with power-of-two dimensions. An example app is also provided.
Flash makes it pretty easy to use any DisplayObject
as a Stage3D
texture. This is a great feature since you can use powerful, traditional classes like MovieClip
, Sprite
, TextField
, and Shape
to build a texture—often with vector graphics—and then use Stage3D
‘s GPU hardware acceleration to render them with maximum performance. But this path is fraught with subtle problems, any one of which could result in poor rendering quality that’s quite hard to debug. Today’s article takes you through the process step by step to make sure you end up with great results.
The [Embed]
metadata tag has been in AS3 since the beginning, but few know how to use it fully. Today’s article shows how you can go beyond the standard usage to maximize the usefulness of [Embed]
. Read on for some useful tricks you may not know about and take another step toward mastering AS3.
Normal bitmaps can be boring, so many games spice them up by rotating and scaling them for various purposes. Rotated characters can follow the curve of a 2D terrain in a game like Dragon, Fly!. Mario himself can scale up to huge size in New Super Mario Bros.. So today we continue the HTML5 vs. JavaScript series by testing the performance of rotating and scaling bitmaps to better compare the performance across Windows, Mac, iOS, and Android. Will Flash maintain its lead? Read on to find out.
HTML5 is all the rage and a lot of Flash developers are either curious about it or have actually made the switch. But how does its performance stack up against Flash? That is a very complicated question, so we’ll begin today with just a simple test of the speed at which a lot of bitmaps can be drawn to the screen. Who will win? Read on to find out.
Does the type of image matter when you’re compressing it to PNG? Does it affect performance? Size? This week’s article looks into these questions to find out how each of the PNG compressors performs on three different types of images: an icon, a photo, and random noise.
Flash Player has had built-in PNG compression since version 11.3. But how does it fare against all of the other PNG compressors out there? Does it compress faster? Does it produce smaller file sizes? Today’s article explores your options when it comes to compressing PNG files so you can get the fastest or smallest PNG possible.
Which image format is fastest to load? That was perhaps the most relevant question in last week’s article, so it’s time to explore it more deeply. Today’s article examines differences between different types of PNG, JPEG, and JPEG-XR files to answer questions like “does the JPEG quality setting matter?” and “is indexed PNG faster than full (ARGB) PNG?” Read on for the test and all the details.