flex里Library的使用
发布时间:2020-12-15 04:18:59 所属栏目:百科 来源:网络整理
导读:?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"
<?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 = "titamtangirl."; //?? ??? ??? ??? ?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,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>
(编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |