package {
import flash.display.Sprite;
import flash.events.*;
import flash.text.*;
public class ParseString extends Sprite
{
public var theTextField:TextField = new TextField();
public function ParseString()
{
var sT:ShowText = new ShowText();
theTextField = sT.makeInputText( 10, 10, 20, 400, true, true );
this.addChild(theTextField);
var s:ShowCircle = new ShowCircle(50, 150, 15);
s.addEventListener(MouseEvent.CLICK, showText);
this.addChild(s);
}
public function showText(e:Event):void
{
var sT:ShowText = new ShowText();
var um:String = theTextField.text.toString();
var guy:Array = um.split(" ");
var result:TextField = sT.makeDynamicText( guy[0], 10, 50, 20, 400, false, true );
this.addChild(result);
}
}
}

Sweetness. From here I need to count all the words and how many times each one is used.
0 comments:
Post a Comment