XML E4X Operators vs. XML Class Methods

Tags: , , , , ,

We know that the XML E4X operators are an 10x slower than plain Object, but how slow are they compared to the XML class’ methods like elements() and attributes? Today’s article finds that out.

Read the rest of this article »

5 Comments

Take Advantage of CPU Caching

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.

Read the rest of this article »

9 Comments

Easily Create Power-of-Two Textures

Tags: , , ,

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.

Read the rest of this article »

6 Comments

XML Operator Speed

Tags: , , , , , , ,

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, .x, ..x, and ["x"] against their equivalents in plain Object instances and typed class instances. Just how slow are the XML operators? Read on to find out.

Read the rest of this article »

4 Comments

The Four Vector Classes

Tags: , , , , , , , ,

There are four Vector classes in AS3. It seems like there is only one—Vector—and that it supports generics, but that is only an illusion. Today’s article will do some tests to reveal the implications to your app’s correctness and efficiency.

Read the rest of this article »

3 Comments

Easily Get the Best Context3D

Tags: , , , , , , , ,

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.

Read the rest of this article »

4 Comments

Multi-Line Strings

Tags: , ,

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.

Read the rest of this article »

14 Comments

ActionScript Workers: Condition Class Demo

Tags: , , , ,

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.

Read the rest of this article »

10 Comments

ActionScript Workers: Condition Class Example

Tags: , , ,

The 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 flash.concurrent.Condition class.

Read the rest of this article »

4 Comments

ActionScript Workers: Changing ByteArray Length

Tags: , , ,

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.

Read the rest of this article »

No Comments