Actionscript 3 XML issue
- Started
- Last post
- 6 Responses
- noiseisthis0
you have an "h" in line 1 of your xml document. delete and retry
- CyBrain0
I removed the h in the first line of the XML doc but still get he error.
I found out that the line causing the problem is
my_total = my_songs.length();
Is it because my_total is defined as an XMLList data type?- trace(my_total);
after line 17noiseisthis - and what is my_total being used for? its not referenced anywhere else in the as docnoiseisthis
- trace(my_total);
- kumori040
In your code, you declare "my_songs" as an XMLList. But in your error line you're asking it to be a number (length() returns a number). You can't coerce an XMLList type to a Number.
- CyBrain0
I can't assign my_total without the whole thing crashing.
I was in the middle of a tutorial that said test it now. http://www.republicofcode.com/tu…
It's a music player that will use the number of songs to affect how the next and previous buttons work.
- Milan0
my_songs.length(); returns an int so try changing the datatype of my_total to int.