| Flashscript classes (ActionScript 3) | Home | MX | MX 2004 | Flash 8 | Flash 9 |Flash 10 |PHP |Components | Snippets | Contact | |
SpamHolder |
|
|
| Property | Defined By |
|---|---|
| All inherited properties of the Sprite class. | N/A |
| Method | Defined By |
|---|---|
|
SpamHolder()
Creates a new instance of the SpamHolder class. |
SpamHolder |
|
prevSpam(spamArray:Array, target:Object, yPosition:Number):void
Initiates creating a spamholder. |
SpamHolder |
|
returnCode():String
Returns the string from the textfield. |
SpamHolder |
| Event | Defined By |
|---|---|
| All inherited events for the Sprite class. | N/A |
| Constructor Detail |
|---|
|
SpamHolder () Constructor
public function SpamHolder() |
| Intializes a new SpamHolder instance. |
| Method Detail |
|---|
|
prevSpam ():void method
This method will initiate the creation of the spamholder. |
Parameters
|
|
returnCode ():String method
This method will return the phrase in the textfield, which can be compared against a user's entry. |
| Examples |
|---|
Create a new fla file and name it Spamprevents.fla. Place the fla in the same folder as the biz folder. Then create an Actionscript file, name it Spamprevents.as and place this script.
package
{
import flash.display.Sprite;
import biz.flashscript.text.SpamHolder;
public class Spamprevents extends Sprite
{
public function Spamprevents ():void
{
var spamArray:Array = new Array("nuL3 flASh","IHAte SpAm","Prev Crime","IloVe Lucy","rr321 ffGG");
var mc:SpamHolder=new SpamHolder();
mc.x = 100;
mc.y = 100;
addChild (mc);
mc.prevSpam (spamArray,mc,10);
trace (mc.returnCode());
}
}
}
|