Create a new fla file and name it FindMatch.fla. Place the fla in the same folder as the biz folder. Place a TextField of size 320x240 with Arial size 10 selected on the main timeline and name it "myText". Place an Input TextBox, name it "myInput" and a button and name it "subMit". Then create an Actionscript file, name it Blurs.as and place this script.
package
{
import flash.display.Sprite;
import flash.display.MovieClip;
import fl.controls.Button;
import flash.events.MouseEvent;
import biz.flashscript.text.FindMatch;
public class Findmatch extends Sprite
{
public var subMit:Button;
private var newMark:FindMatch;
public function Findmatch ():void
{
myText.border = true;
myText.wordWrap = true;
myText.htmlText = 'Yesterday I got a letter from my aunt Mary. At least the return address said so. But I was suspicious
because one has to be careful with letters, Bioterrorism, you know? I looked at the letter from all sides. Yeah, there
it was, a bulge, most probably powder: ANTHRAX! My God, I was frightened. I put the letter down immediately and washed
my hands and rushed to get latex gloves. Horrible thoughts went through my mind about the bugs in the letter and how they are
multiplying in my bloodstream, Yuk. Should I call 911 or better the FBI? Who else knew my aunts address? But most important
of all, why and why me? Who hated me so much to send me a letter with deadly bacteria? Actually I am a popular guy.
Yeah, thats it. Somebody is jealous about my popularity, somebody with a microbiology background or a connection
to foreign terrorists. I dont know any more, I dont know. Stay calm, just stay calm. I took the letter very carefully and
put it in a plastic bag. Then I drove to a nearby river and.....got rid of it, haaaa. <i>(Cell phone rings.)</i>
Hello, aunt Mary.....for my birthday.....200 bucks in cash!';
newMark = new FindMatch();
subMit.label = "SUBMIT";
subMit.addEventListener (MouseEvent.CLICK, searchWord);
}
private function searchWord (ev:MouseEvent):void
{
var pattern:String = myInput.text;
newMark.markText (myText,pattern);
}
}
}
|