0
Participant
,
/t5/animate-discussions/labels-in-array/td-p/7781199
Nov 17, 2015
Nov 17, 2015
Copy link to clipboard
Copied
I have an array that holds frame labels and high and low damage values, like so.
var atkList:Array = [{frame:'punch',h:1800,l:1000}, {frame:'overkick',h:750,l:1250}];
I don't know how to access the properties of each object. I've tried a few methods but none work.
TOPICS
ActionScript
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
1 Correct answer
Enthusiast
,
Nov 17, 2015
Nov 17, 2015
trace(atkList[0].frame);
trace(atkList[0].h);
trace(atkList[0].l);
trace(atkList[1].frame); //etc..
Enthusiast
,
/t5/animate-discussions/labels-in-array/m-p/7781200#M155037
Nov 17, 2015
Nov 17, 2015
Copy link to clipboard
Copied
trace(atkList[0].frame);
trace(atkList[0].h);
trace(atkList[0].l);
trace(atkList[1].frame); //etc..
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
mcdermitt
AUTHOR
Participant
,
/t5/animate-discussions/labels-in-array/m-p/7781201#M155038
Nov 18, 2015
Nov 18, 2015
Copy link to clipboard
Copied
Ok, it works perfectly.
Thanks!
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Enthusiast
,
LATEST
/t5/animate-discussions/labels-in-array/m-p/7781202#M155039
Nov 18, 2015
Nov 18, 2015
Copy link to clipboard
Copied
You're welcome.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

