Ah, yes, I thought I has stated that. I am using AS2.
I tried setting the Math.random first and then I used Math.floor,
that seemed to work,
but I put an extra catch and set up a..
if(ranCode == undefined){
ranCode = 0;
}
and so a zero gets added instead of any undefined
and that seems to suffice. I just hope I never get all undefined(s).
lol all zeros
But all in all i got it to work and not done refining.
I was creating my own captcha and it works. Now I just need to test
if the characters are recognizable by a reader.
Onward and upward. :)
Thanks everyone for your help.. it helped a lot.
Karl
On Jun 18, 2010, at 1:25 AM, Steven Sacks wrote:
I guess you were using AS2? There is no native RegEx in AS2,
though, so I don't see how you were going to use AS3 in AS2. In
AS3, you should NEVER use anything other than ints to iterate
integer values. Don't use uint, and don't use Number.
That code I provided is code I wrote and tested in Flash, not in
the email. That being said, it should have been:
int(Math.random() * 62)
not
Math.round(Math.random() * 62)
Since array[array.length] will return undefined.
On 6/17/2010 12:45 PM, Karl DeSaulniers wrote:
Thanks Juan, Thanks Jim.
@Steve
I noticed with your example I get "undefined" as one of the results.
Also, I had to change the var i:int; to var i:number = 0;
I got an error with int saying it could not load the class or
interface
for int.
What am I missing here?
TIA
Karl
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Karl DeSaulniers
Design Drumm
http://designdrumm.com
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders