Log in

View Full Version : flash + recaptcha



thosecars82
06-28-2008, 01:23 PM
hello there
I know how to include a recaptcha in a html or php web page but I don't know how to include a recaptcha in a flash web page. I just thought of calling geturl from as2 flash8 for calling a php that holded the recaptcha

After that, the php script might create a file with a content which indicated success or failure depending on the result of the recaptcha.

Then, after calling geturl in flash, I would call sendandload of a loadvars object for calling a second php script which would be in a loop until it found the file writen by the first php script which holded the recaptcha. The loop would end by reading the file written by the first php script and seeing whether the content is success or failure. Then it would send the result back to flash through the loadvars. Then flash could continue the execution flow depending on the result of the recaptcha.

This is the only solution which came to my mind but it does not seem straightforward to me. Does anyone have any other better solution to include a recaptcha for a website developed with flash?
Thanks in advance

Medyman
06-28-2008, 03:47 PM
Are you specifically trying to incorporate reCaptcha (http://recaptcha.net/) or do you mean any captcha-type application?

thosecars82
06-28-2008, 04:30 PM
Are you specifically trying to incorporate reCaptcha (http://recaptcha.net/) or do you mean any captcha-type application?

Hello there
I am trying to incorporate a reCapthca (http://recaptcha.net/) as you said in first place.
Any suggestion?
Another problem I would like to find a solution for is more general. It consists on how I can manage comunicate a flash website which uses a php website to do the reCaptcha or anyother thing. With sendandload from loadvars object I don't get the interface of the php website visible to let the human interact with the interface. The only way I know to do that is through getURL but this way doesn't let flash to take the result of any variable like with sendandload.
So, do you have any better idea than the one I first suggested that was not really straightforward? Well, may be that is the only way, but I doubt it.
Thanks

Medyman
06-28-2008, 08:57 PM
I'm really not understanding your second question there. Any interface that is to interact with server-side scripting, should be created within Flash.

Re: reCaptcha
That really isn't coded with Flash/Flex interfaces in mind. According to the developers, they have no desire to make the coding of reCaptcha compatible or at least friendly with Flash. You would have to use some alternate techniques to get it to work. A quick Google search reveal this (http://groups.google.com/group/recaptcha/browse_thread/thread/e22d7e3c91bcc9db). That seems like the only way that you can get reCaptcha to work within Flash.

Doing this with AS2's limited regex capabilities might be difficult. Of course, there are some third-party AS2 regex classes (RegExp (http://www.jurjans.lv/flash/RegExp.html) is one). AS3 has native support for regular expressions, so that might make it easier.

Any solution you come up with would be confusing and overly-complicated.

My suggestion is to hand-code a captcha system entirely in Flash. Blizzard had a thread in these forums regarding this a while back (if memory serves). This is the route that I would take. If you're up for learning AS3, there are some AS3 classes for captcha, which would minimize any coding you would have to do