Your computer has RAM, but it also has much faster forms of memory. If you want your app to run quickly, you need to be aware of these other memories. Today’s article discusses them and shows two AS3 examples that, even with such a high level language, you can still take advantage of them.
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.
AS3 has always had great support for XML built right into the language, but how fast is it? Today’s article compares the performance of operators that work on
XML objects like
["x"] against their equivalents in plain
Object instances and typed
class instances. Just how slow are the XML operators? Read on to find out.
When you request a
Context3D you’ll either get the requested profile or software rendering. But what if you’d rather fall back to a lesser hardware context? What if your app can make use of the regular/baseline profile but can run with reduced graphical effects using the constrained mode profile? Today’s article presents a utility class that makes it a snap to always get the best
Context3D that Flash Player can give you.
AS3 has never had very good support for multi-line strings… until now. Today’s article discusses the proper and improper ways of writing multi-line strings and delves into the bytecode so you really understand what’s going on.
The last article gave a very basic example of the
flash.concurrent.Condition class introduced in Flash Player 11.5. That example was (hopefully) a simple and easy way to understand the mechanics of how the
Condition class works. Unfortunately, it was not a useful example and actually demonstrated the opposite of what you’d want to use it for. Today’s article shows a somewhat more complicated example that should serve as an example of appropriate usage for
Condition class that debuted alongside the
Mutex class in Flash Player 11.5 is very useful but much less understood. Unfortunately, Adobe’s documentation doesn’t include a usage example and there seem to be none available elsewhere on the internet. So today’s article provides an example of how to use the
In the last article we learned that a
ByteArray shared between two workers also shares its
length field but not its
position field. This raises a followup question: what about when the length changes? Today’s article sees what happens when you change the length of a
ByteArray that is shared between two ActionScript workers to see just how shared that
length field really is.