The chief quality of Vectors is that they hold a single type of object. This is why they are sometimes called “typed arrays”. So what would happen if you wanted to convert an array of mixed-type objects into a vector?
Posts Tagged arrays
Many classes in AS3 are dynamic, meaning that you can add and remove their fields at runtime. This is powerful, but extraordinarily slow. This series will cover some common ways you might be inadvertently using dynamic access or using it too much. This will help you make your code faster. In the first installation of the series, I’m going to talk about the simple act of indexing an array or vector.
Comparing Objects
Aug 10
The comparison operators (< , <=, ==, >=, >) are clearly core to any programming language. The AS3 docs tell us a little about AS3′s special handling of strings when compared, but there is more to the story.
I often wonder about language features that I know have a lot going on behind the scenes. In AS3, this commonly has me wondering about the for-in and for-each loops, which I use frequently. This article is about what happens to those loops when you change the array you’re iterating over during the iteration.
Converting Vectors to Arrays
Jul 22
Vectors– typed arrays in AS3– are much quicker than arrays and therefore very useful. There are many times where you end up with arrays though and need to convert them into vectors for the bulk of your using that data. This article is about that process.
Clearing an Array or Vector
Jun 24
There are many ways to clear an Array or Vector. I’m tired of seeing the foolish ones. Read this and make sure you’re not doing anything foolish:
Missing Array Elements
Jun 7
As a sane programmer, you probably wouldn’t ever think to do this. But It’s perfectly legal to do so.