What makes you think that that error is coming from that code? What is
your handleComplete() method? And aren't you getting a line number
telling you the exact line in which "value is not a function"?
 
- Gordon

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of {reduxdj}
Sent: Saturday, March 24, 2007 11:25 PM
To: [email protected]
Subject: [flexcoders] Randomizing Array (from actionscript cookbook3 and
other places)



I am getting an error with the following code

TypeError: Error #1006: value is not a function.
at com.me.data::PictureProviderXML/::handleComplete()


function randomSort(a, b) {
return Math.random()>.5 ? -1 : 1;
}

var numbers:Array = new Array();

for (var n:int=0;n<photos.length;n++){
numbers[n] = n;
}
numbers.sort(randomSort);

any ideas, it looks like I am using this properly any ideas?

Thanks,
Patrick



 

Reply via email to