| Flashscript classes (ActionScript 3) | Home | MX | MX 2004 | Flash 8 | Flash 9 |Flash 10 |PHP |Components | Snippets | Contact | |
SplitString |
|
|
| Method | Defined By |
|---|---|
|
SplitString.getInstance()
Creates a new instance of the SplitString class. |
SplitString |
|
getString(mst:String):String
Returns the letter part of a string. |
SplitString |
|
getNumber(mst:String):Number
Returns the number part of a string. |
SplitString |
| Constructor Detail |
|---|
| SplitString.getInstance() |
| Intializes a new SplitString instance. |
| Method Detail |
|---|
|
getString ():String method
This method will return a letter part of a string. |
Parameters
|
|
getNumber ():String method
This method will return the number part of a string as numbers. |
Parameters
|
| Examples |
|---|
Create a new fla file and name it SplitStrings.fla. Place the fla in the same folder as the biz folder. Then create an Actionscript file, name it SplitStrings.as and place this script.
package
{
import flash.display.Sprite;
import biz.flashscript.text.SplitString;
public class SplitStrings extends Sprite
{
public function SplitStrings ():void
{
var findString:SplitString = SplitString.getInstance();
var ms:String = "abcde123";
trace (findString.getString(ms));
ms = "abcde123";
trace (findString.getNumber(ms));
}
}
}
|