In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly introduces the commonly used Flex source code, the article is very detailed, has a certain reference value, interested friends must read it!
12 commonly used Flex source code
1. Copy the contents to the system clipboard
Java code
System.setClipboard (strContent); System.setClipboard (strContent)
two。 Copy an ArrayCollectionFlex source code
Java code
/ / dummysolution (well,itworks) varbar:ArrayCollection=newArrayCollection (); foreach (vari:Objectinac) {bar.addItem (I);} / varbarbarfrog ListCollectionViewwords newListCollectionView (ListCollectionView (ac) .list); / / dummysolution (well,itworks) varbar:ArrayCollection=newArrayCollection (); foreach (vari:Objectinac) {bar.addItem (I);} / promoasticcards plausible var barbarCollectionViewwords newListCollectionView (ListCollectionView (CollectionView (ac) .list)
3. Open a new browser window
Java code
NavigateToURL (newURLRequest ('http://52friends.com'),'_blank'); navigateToURL (newURLRequest (' http://52friends.com'),'_blank');)
4. Refresh browser Flex source code
Java code
NavigateToURL (newURLRequest ("_ javascript:location.reload ();"), "_ self") navigateToURL (newURLRequest ("_ javascript:location.reload ();"), "_ self")
5. Close the browser Flex source code
Java code
NavigateToURL (newURLRequest ("_ javascript:window.close ()"), "_ self"); navigateToURL (newURLRequest ("_ javascript:window.close ()"), "_ self")
6. Set the background of the Alert window to transparent
Java code
Alert {modalTransparency:0.0;modalTransparencyBlur:0;} Alert {modalTransparency:0.0;modalTransparencyBlur:0;}
7. Take random color Flex source code
Java code
Lbl.setStyle ('color',0xffffff*Math.random ()); lbl.setStyle (' color',0xffffff*Math.random ())
8. Clear the space on the left side of the substring
Java code
PublicfunctionLTrim (s:String): String {vari:Number=0; while (s.charCodeAt (I) = = 32 | | s.charCodeAt (I) = = 13 | s.charCodeAt (I) = = 10 | | s.charCodeAt (I) = = 9) {returns.substring (iMagazine. Length);} publicfunctionLTrim (s:String): String {vari:Number=0; while (s.charCodeAt (I) = = 32 | | s.charCodeAt (I) = 13 | | s.charCodeAt (I) = 10 | | s.charCodeAt (I) = 9)
9. Clear the space on the right side of the string Flex source code
Java code
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) {returns.substring;} 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) }
10. Clear the space on the left and right of the string
Java code
PublicfunctionTrim (s:String): String {returnLTrim (RTrim (s));} publicfunctionTrim (s:String): String {returnLTrim (RTrim (s));}
11. Get the data type Flex source code
Java code
GetQualifiedClassName (data) getQualifiedClassName (data)
twelve。 Generate a random string.
Java code
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.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.