0
Participant
,
/t5/animate-discussions/array-problem-from-string-to-sub-addchild/td-p/809273
Feb 07, 2009
Feb 07, 2009
Copy link to clipboard
Copied
Hello great people.
how can it be that I cant be allowed to do this? I get errors with pladsList array which should attach a jpg to a movieclip from an XML
1. Array with strings, (MovieClips on stage).
2. addChild the loaded JPG.
gets error "value is not a function."
how can it be that I cant be allowed to do this? I get errors with pladsList array which should attach a jpg to a movieclip from an XML
1. Array with strings, (MovieClips on stage).
2. addChild the loaded JPG.
gets error "value is not a function."
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
Participant
,
Feb 07, 2009
Feb 07, 2009
code
LEGEND
,
/t5/animate-discussions/array-problem-from-string-to-sub-addchild/m-p/809274#M17841
Feb 07, 2009
Feb 07, 2009
Copy link to clipboard
Copied
The forum doesn't allow me to type in the right text to show
[ i ], it treats that as italics!
Put "this[" before your pladsList addChild line, and "]" before the .addChild part, so that your array element is evaluated.
Put "this[" before your pladsList addChild line, and "]" before the .addChild part, so that your array element is evaluated.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
LEGEND
,
LATEST
/t5/animate-discussions/array-problem-from-string-to-sub-addchild/m-p/809279#M17846
Feb 08, 2009
Feb 08, 2009
Copy link to clipboard
Copied
I'm going to try again to show what the line should look
like, by using the Attach Code button.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Guru
,
/t5/animate-discussions/array-problem-from-string-to-sub-addchild/m-p/809275#M17842
Feb 07, 2009
Feb 07, 2009
Copy link to clipboard
Copied
xmlList.length() needs to be xmlList.length
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
2le
AUTHOR
Participant
,
/t5/animate-discussions/array-problem-from-string-to-sub-addchild/m-p/809277#M17844
Feb 07, 2009
Feb 07, 2009
Copy link to clipboard
Copied
quote:
Originally posted by: dzedward
xmlList.length() needs to be xmlList.length
xmlList.length() is a function which tracks the length of the array.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Guru
,
/t5/animate-discussions/array-problem-from-string-to-sub-addchild/m-p/809278#M17845
Feb 08, 2009
Feb 08, 2009
Copy link to clipboard
Copied
length() is not a method of the Array class, but length is a
property. I had hastily read your code wrong due to the error you
specified, since I sometimes mix up Array.length with XML.length()
and it spits out the same error. However, why would you store
strings in your array to represent the movie clips. Store the
actual reference and you wouldn't have a problem.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Participant
,
/t5/animate-discussions/array-problem-from-string-to-sub-addchild/m-p/809276#M17843
Feb 07, 2009
Feb 07, 2009
Copy link to clipboard
Copied
code
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

