-
Arrays HELP!!!!!
Hey everyone..been struggling with this for a while and could use a lot of help with this......
I have an array I created like the following:
var items = new Array({month:"January", value:this.January}, {month:"February", value:this.February}, {month:"March", value:this.March}, {month:"April", value:this.April}, {month:"May", value:this.May}, {month:"June", value:this.June}, {month:"July", value:this.July}, {month:"August", value:this.August}, {month:"September", value:this.September}, {month:"October", value:this.October}, {month:"November", value:this.November}, {month:"December", value:this.December});
How would I create this array in a "FOR" loop so that I can build this dynamically rather than static....
something like the following I tried:
var items = new Array();
for (var j = 0; j<11; j++) {
?????????
}
PPPPLLLEEASE any help would be greatly appreciated
-
Basically:
for (var j = 0; j<numberOfItems; j++) {
items.push(itemJ);
//or
//items[j]=itemJ;
}
how to access the individual items (to put them into the array) depends on how the item objects are provided. do you get them from a php page? are they already individual objects in ActionScript?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|