Dynamic array or vector

Hi!

In Flash, how can I create a array of dynamic length (vector in other programming languages).

Thanks

var myArray = new Array();

It’s already of dynamic length. You can add what you want to it. You don’t have to set the size like in some other languages.

If I am correct, the only way to add data into array is byt indexing. As such, the can be undefined value. In such case, it does work as well as vector where you can have dynamic length with all meaningful value and operation like: add, remove…

Check the help topic in flash on the Array() class. It has push, pop, shift and unshift functions. u should b able 2 do most of whats needed with them.