<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" creationComplete="application1_creationCompleteHandler(event)">
<fx:Library>
<fx:Definition name="MYsq">
<s:Group>
<s:Rect width="100%" height="100%">
<s:stroke>
<s:SolidColorStroke color="red"/>
</s:stroke>
</s:Rect>
</s:Group>
</fx:Definition>
</fx:Library>
<fx:Script>
<![CDATA[
import ascb.util.DateFormat;
import mx.events.FlexEvent;
import mx.formatters.DateFormatter;
protected function application1_creationCompleteHandler(event:FlexEvent):void
{
// var exp:Date = new Date(2013,5,30);
// trace(DateFormat.DAYS[exp.month]);
// var str:String = "\ti\tam\ta\ngirl.";
// trace(str);
// var str2:String = "djnfwojcvnwoejraok'Dkfawejfosdjfwenfljweiflnsjoeflsdkfnowejwsef";
// var index:int = -1;
// while((index = str2.indexOf("f",index+1))!=-1)
// {
// trace("f在str2的第"+index);
// }
// var letters:Array = [14,45,10,1,125,4,87,2,1,57,25,5];
// letters.sort(Array.NUMERIC);
// trace(letters);
}
]]>
</fx:Script>
<fx:Declarations>
<!-- 将非可视元素(例如服务、值对象)放在此处 -->
</fx:Declarations>
<fx:MYsq x="25" y="25" width="20" height="20"/>
<fx:MYsq x="25" y="50" width="20" height="20"/>
<fx:MYsq x="50" y="50" width="20" height="20"/>
<fx:MYsq x="75" y="50" width="20" height="20"/>
</s:Application>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" creationComplete="application1_creationCompleteHandler(event)">
<fx:Library>
<fx:Definition name="MYsq">
<s:Group>
<s:Rect width="100%" height="100%">
<s:stroke>
<s:SolidColorStroke color="red"/>
</s:stroke>
</s:Rect>
</s:Group>
</fx:Definition>
</fx:Library>
<fx:Script>
<![CDATA[
import ascb.util.DateFormat;
import mx.events.FlexEvent;
import mx.formatters.DateFormatter;
protected function application1_creationCompleteHandler(event:FlexEvent):void
{
// var exp:Date = new Date(2013,5,30);
// trace(DateFormat.DAYS[exp.month]);
// var str:String = "\ti\tam\ta\ngirl.";
// trace(str);
// var str2:String = "djnfwojcvnwoejraok'Dkfawejfosdjfwenfljweiflnsjoeflsdkfnowejwsef";
// var index:int = -1;
// while((index = str2.indexOf("f",index+1))!=-1)
// {
// trace("f在str2的第"+index);
// }
// var letters:Array = [14,45,10,1,125,4,87,2,1,57,25,5];
// letters.sort(Array.NUMERIC);
// trace(letters);
}
]]>
</fx:Script>
<fx:Declarations>
<!-- 将非可视元素(例如服务、值对象)放在此处 -->
</fx:Declarations>
<fx:MYsq x="25" y="25" width="20" height="20"/>
<fx:MYsq x="25" y="50" width="20" height="20"/>
<fx:MYsq x="50" y="50" width="20" height="20"/>
<fx:MYsq x="75" y="50" width="20" height="20"/>
</s:Application>