易截截图软件、单文件、免安装、纯绿色、仅160KB

常用的Flex代码总结

常用的Flex代码总结
1.刷新浏览器

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

  2.关闭浏览器

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

  3.打开一个新浏览器窗口

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

  4.复制一个ArrayCollection

  //dummy solution( well, it works )

  var bar:ArrayCollection = new ArrayCollection();

  for each ( var i:Object in ac ){

  bar.addItem( i );

  }

  // fantastic ! //

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

  5.复制内容到系统剪贴板

  System.setClipboard(strContent);

  6.清除子串左侧空格

  public function LTrim(s : String):String

  {

  var i : Number = 0;

  while(s.charCodeAt(i) == 32 || s.charCodeAt(i) == 13 || s.charCodeAt(i) == 10 || s.charCodeAt(i) == 9)

  {

  i++;

  }

  return s.substring(i,s.length);

}

7.设置Alert 窗口的背景为透明

  Alert

  {

  modalTransparency:0.0;

  modalTransparencyBlur:0;

  }

  8.获取取随机颜色

  lbl.setStyle('color', 0xffffff*Math.random());

  9.获取数据类型

  getQualifiedClassName(data)

  10.字符串右侧空格清除

  public function RTrim(s : String):String

  {

  var i : Number = s.length - 1;

  while(s.charCodeAt(i) == 32 || s.charCodeAt(i) == 13 || s.charCodeAt(i) == 10 ||s.charCodeAt(i) == 9)

  {

  i--;

  }

  return s.substring(0,i+1);

  }

  11.清除字串左右的空格

  public function Trim(s : String):String

  {

  return LTrim(RTrim(s));

  }

12.生成随机字符串.

  private function GenerateCheckCo


相关文档:

Flex Event总结

<!-- -->
<!--
/* Font Definitions */
@font-face
{font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;
mso-font-charset:2;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:0 268435456 0 0 -2147483648 0;}
@font-face
{font-family:宋体;
panose-1:2 ......

flex 中GML转换

package org.openscales.core.format
{
 import flash.utils.getQualifiedClassName;
 import flash.xml.XMLNode;
 import org.openscales.core.Util;
 import org.openscales.core.feature.Feature;
 import org.openscales.core.geometry.Collection;
 import org.openscales.core. ......

J2EE集成Flex环境搭建

相关下载
Flex正式版EXE下载地址:
http://trials.adobe.com/Applications/Flex/FlexBuilder/3/FB3_WWEJ.exe
Flex正式版插件下载地址:
http://trials.adobe.com/Applications/Flex/FlexBuilder/3/FB3_WWEJ_Plugin.exe
 
LCDS
官方下载(需要先注册)
 
https://www.adobe.com/cfusion/tdrc/index.cfm?p ......

Flex no.2

--------------ex2_01_solution  选取时间-----------------------
 ...
   private function dateChangeHandler():void
   {
    // The Alert.show() message displays a static string plus the selected date in the startDate control
   ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号