Converting between an ActionScript Array (Object) and a Vector.<Object>

Are there options for converting an Array to a Vector in ActionScript without iterating the array?

What about the other way (converting a Vector to an Array)?

Answers


For the Array to Vector, use the Vector.<TYPE>() function that accept an array and will return the vector created :

var aObjects:Array = [{a:'1'}, {b:'2'}, {c:'3'}];
// use Vector function
var vObjects:Vector.<Object> = Vector.<Object>(aObjects);

For the other there is no builtin function, so you have to do a loop over each Vector item and put then into an Array


Need Your Help

C# copy gridview contents to clipboard

.net gridview clipboard

I have several gridviews. In each of them, I copy the contents to the clipboard using code like this:

Can you write a Facebook application in C?

c++ c facebook facebook-graph-api

What API is available to use Facebook from C or C++, and is there a library to do the grunt work for me? (So that you for instance can use Facebook from a desktop program written in C++.)

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.