| Package | ardisia.components.captcha |
| Class | public class CaptchaVisual |
| Inheritance | CaptchaVisual spark.components.supportClasses.SkinnableTextBase |
This captcha is not very secure. Any spam bot that could inspect swf properties during runtime could easily figure out the token and pass the captcha. Do not use if security is important.
View the technical documentation on the Ardisia Labs website for more information.
| Property | Defined By | ||
|---|---|---|---|
| drawNoise : Boolean
True to display a perlin noise profile behind the token. | CaptchaVisual | ||
| drawPolyLine : Boolean
True to draw a randomized poly line in front of the token. | CaptchaVisual | ||
| randomTokenLength : int = 6
The number of characters for randomly generated tokens. | CaptchaVisual | ||
| token : String
The captcha token. | CaptchaVisual | ||
| Method | Defined By | ||
|---|---|---|---|
dispose():void
Call to remove the component from the display list and clear out
bitmap data. | CaptchaVisual | ||
getRandomString():String
Generates a random string. | CaptchaVisual | ||
| Method | Defined By | ||
|---|---|---|---|
updateBitmapImagePart():void
Update the bitmapImage skin part. | CaptchaVisual | ||
updateDisplayLabelPart():void
Update the bitmapImage skin part. | CaptchaVisual | ||
updatePolyLineStrokePart():void
Update the polyLineStrokePart. | CaptchaVisual | ||
| Event | Summary | Defined By | ||
|---|---|---|---|---|
| Dispatched when the displayed captcha token has changed. | CaptchaVisual | |||
This component uses skins made up of skin parts. Do not set the skin parts directly. The component's skin sets the skin parts.
| Skin Part | Description | Defined By | ||
|---|---|---|---|---|
bitmapImagePart:spark.primitives.BitmapImage | Required: false Part Type: Static The BitmapImage that will display the perlin noise. Required if the "drawNoise" property is true. | CaptchaVisual | ||
displacementFilterPart:DisplacementMapFilterFixed | Required: false Part Type: Static The DisplacementMapFilter used to distort the token. The base spark filter has a bug, which is why a corrected class must be used. | CaptchaVisual | ||
displayLabelPart:spark.components.supportClasses.TextBase | Required: true Part Type: Static Renders the text (token). | CaptchaVisual | ||
dropShadowFilterPart:spark.filters.DropShadowFilter | Required: false Part Type: Static The DropshadowFilter used to affect the token. | CaptchaVisual | ||
polyLineStrokePart:mx.graphics.IStroke | Required: true Part Type: Static A poly line that can be optionally drawn across the component. | CaptchaVisual | ||
| drawNoise | property |
drawNoise:BooleanTrue to display a perlin noise profile behind the token.
The bitmapImagePart must exist for the noise to get drawn.
The default value is false.
public function get drawNoise():Boolean public function set drawNoise(value:Boolean):void| drawPolyLine | property |
drawPolyLine:BooleanTrue to draw a randomized poly line in front of the token.
Change the optional polyLineStrokePart skin part in the skin to customize the stroke used.
The default value is true.
public function get drawPolyLine():Boolean public function set drawPolyLine(value:Boolean):void| randomTokenLength | property |
public var randomTokenLength:int = 6The number of characters for randomly generated tokens.
The default value is 6.
| token | property |
token:StringThe captcha token.
This property is bindable.
The default value is null.
This property can be used as the source for data binding.
public function get token():String public function set token(value:String):void| dispose | () | method |
public function dispose():voidCall to remove the component from the display list and clear out bitmap data.
| getRandomString | () | method |
public function getRandomString():StringGenerates a random string. The length is determined by the "randomTokenLength" property. Only uses the upper and lower case letters and numbers.
ReturnsString — the randomized String
|
| updateBitmapImagePart | () | method |
protected function updateBitmapImagePart():voidUpdate the bitmapImage skin part.
| updateDisplayLabelPart | () | method |
protected function updateDisplayLabelPart():voidUpdate the bitmapImage skin part.
| updatePolyLineStrokePart | () | method |
protected function updatePolyLineStrokePart():voidUpdate the polyLineStrokePart.
| change | Event |
ardisia.components.captcha.events.CaptchaVisualEventardisia.components.captcha.events.CaptchaVisualEventDispatched when the displayed captcha token has changed.