Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 10-05-2010, 05:22 PM   #1
jmandawg
Registered User
 
Join Date: Oct 2010
Posts: 4
Default How to Initialize an arraylist

Hi,

How can i initialize an arraylist with data? IIRC there is a one line way to do it something like:

public static var categories:ArrayList = new ArrayList("john", "smith");

Thanks.
jmandawg is offline   Reply With Quote
Old 10-05-2010, 05:29 PM   #2
ASWC
Super Moderator
 
ASWC's Avatar
 
Join Date: Dec 2007
Location: Greenville, SC
Posts: 6,528
Default

ActionScript Code:
public var categories:ArrayList; //constructor if any categories = new ArrayList(); //categories.addItem(); add an Object //categories.addItemAt(); add an Object //categories.addAllAt(); add an IList //categories.addAll(); add an IList
__________________
aswebcreations
Super Duper!
ASWC is offline   Reply With Quote
Old 10-05-2010, 05:58 PM   #3
jmandawg
Registered User
 
Join Date: Oct 2010
Posts: 4
Default

Ok, thanks. I thought there was a one-liner for doing it.
jmandawg is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:36 AM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.