package { import com.exanimo.security.recaptcha.RecaptchaLoader; import flash.display.Sprite; import flash.events.Event; import flash.text.TextField; public class RecaptchaExample1 extends Sprite { private var _recaptcha:RecaptchaLoader; /** * * */ public function RecaptchaExample1() { this._recaptcha = new RecaptchaLoader(); this._recaptcha.publicKey = '6LcxNgEAAAAAAFSU05DpBsWQRrCsR03HJDaYBM2M'; this._recaptcha.contentLoaderInfo.addEventListener(Event.COMPLETE, this.showChallengeText); this._recaptcha.load(); this.addChild(this._recaptcha); } public function showChallengeText(e:Event):void { this.challengeField.text = 'CHALLENGE: ' + this._recaptcha.challenge; } } }