In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
这篇文章主要为大家展示了"程序员常用Flex代码有哪些",内容简而易懂,条理清晰,希望能够帮助大家解决疑惑,下面让小编带领大家一起研究并学习一下"程序员常用Flex代码有哪些"这篇文章吧。
程序员常用的Flex代码总结
1.刷新浏览器的Flex代码
navigateToURL(newURLRequest("_javascript:location. reload();"),"_self")
2.关闭浏览器的Flex代码
navigateToURL(newURLRequest("_javascript:window. close()"),"_self");
3.打开一个新浏览器窗口的Flex代码
navigateToURL(newURLRequest('http://ntt.cc'),'_blank');
4.复制一个ArrayCollection
//dummysolution(well,itworks) varbar:ArrayCollection=newArrayCollection(); foreach(vari:Objectinac){ bar.addItem(i); } //fantastic!// varbar:ListCollectionView=newListCollectionView(ListCollectionView(ac).list);
5.复制内容到系统剪贴板的Flex代码
System.setClipboard(strContent);
6.清除子串左侧空格
publicfunctionLTrim(s:String):String { vari:Number=0; while(s.charCodeAt(i)==32||s.charCodeAt(i)==13||s.charCodeAt(i)==10||s.charCodeAt(i)==9) { i++; } returns.substring(i,s.length); }
7.设置Alert窗口的背景为透明的Flex代码
Alert { modalTransparency:0.0; modalTransparencyBlur:0; }
8.获取取随机颜色的Flex代码
lbl.setStyle('color',0xffffff*Math.random());
9.获取数据类型的Flex代码
getQualifiedClassName(data)
10.字符串右侧空格清除
publicfunctionRTrim(s:String):String { vari:Number=s.length-1; while(s.charCodeAt(i)==32||s.charCodeAt(i)==13||s.charCodeAt(i)==10||s.charCodeAt(i)==9) { i--; } returns.substring(0,i+1); }
11.清除字串左右的空格的Flex代码
publicfunctionTrim(s:String):String { returnLTrim(RTrim(s)); }
12.生成随机字符串的Flex代码
privatefunctionGenerateCheckCode():String { //init varran:Number; varnumber:Number; varcode:String; varcheckCode:String=""; //get4radom for(vari:int=0;i
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.