package{
import flash.display.Sprite;
public class Main extends Sprite{
public function Main(){
var filename:String = "document.jpg";
var nameParts:Array = filename.split(".");
var extensionless:String = nameParts[0];
trace ("The filename is " + extensionless);
var extension:String = nameParts[1];
trace ("The file extension is " + extension);
}
}
}
|