Flex常用功能代码

复制内容到系统剪贴板

System.setClipboard(strContent);

 

复制一个ArrayCollection

var bar:ArrayCollection = new ArrayCollection();

for each ( var i:Object in ac ) bar.addItem( i );

var bar:ListCollectionView = new ListCollectionView( ListCollectionView( ac ).list );

 

打开一个URL

navigateToURL(new URLRequest('http://ntt.cc'), '_blank');

 

刷新浏览器

navigateToURL(new URLRequest("javascript:location.reload();"),"_self");

 

关闭浏览器

navigateToURL(new URLRequest("javascript:window.close()"),"_self");

 

设置Alert 窗口的背景为透明

Alert { 

  modalTransparency:0.0;  

  modalTransparencyBlur:0;

}

 

取随机颜色

0xFFFFFF * Math.random();

posted @ 2010-11-03 16:54  子福当自强  阅读(183)  评论(1编辑  收藏  举报
悟道