随笔分类 -  FLEX

FLEX中ViewStack刷新解决方案
摘要:在ViewStack的生命周期中仅只会加载一次view,对于某些业务来说这样的加载方式不大合适,有没有一种办法在每次切换NavigatorContent的时候都重新加载view呢?办法是有的,直接上代码 <mx:ViewStack id="viewStack1" bottom="0" right="0" top="0" left="0" change="viewStack1_changeHandler(event)"> <s:NavigatorContent 阅读全文
posted @ 2011-12-06 03:11 深海大虾
手机身份证IP地址开放接口
摘要:GET后返回XML数据, 包含原IP及归属地.此外type还可以: mobile(手机号), id(身份证). 尚未发现有限制.附录: Java通过网易API获取IP归属地.static Pattern patternLocation = Pattern.compile("<LOCATION>(.+{1,})</LOCATION>"); /** * 根据IP返回归属地. * @param ip * @return */ private static String getLocationByIP(String ip) { String location 阅读全文
posted @ 2011-10-30 11:07 深海大虾
在xmlns中书写与运算符&&
摘要:使用&amp;&amp;来代替&&比如:enabled="{this.getListPageModel.event.status!=ReturnEvent.STATUS_LOADING&amp;&amp;modelDel.event.status!=ReturnEvent.STATUS_LOADING&amp;&amp;modelTrash.event.status!=ReturnEvent.STATUS_LOADING}" 阅读全文
posted @ 2011-08-30 11:36 深海大虾
转载:mouseOver/mouseOut 与 rollOver/rollOut的区别
摘要:一直在做有关鼠标移动都是用mouseOver,mouseOut. 但是最近做一個项目的时候用mouseOver,mouseOut出问题.后来网络上找了一下关于mouseOver,mouseOut的研究.在网上看到一位叫polygeek的朋友用例子的清晰描述 mouseOver,mouseOut 与 rollOver,rollOut的区别 .后来换成rollover,rollout问题就解决了.下面是原文:http://polygeek.com/1519_flex_the-difference-between-rollover-and-mouseover演示flex:http://polyge. 阅读全文
posted @ 2011-07-01 10:16 深海大虾
让ButtonBar显示ViewStack自定义的icon
摘要:<?xml version="1.0" encoding="utf-8"?><s:Group xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" xmlns:view="ddkj.eb.cms.view.*" width="400" hei 阅读全文
posted @ 2011-06-27 14:46 深海大虾
自定义TextInput中displayAsPassword的字符
摘要:经过挖掘发现RichEditableText.as (line 679)有一句 /** * @private */ mx_internal var passwordChar:String = "*";在加载完毕的时候重写一下就行了protected function group1_creationCompleteHandler(event:FlexEvent):void { this.txtUserLoginPassword.textDisplay.mx_internal::passwordChar = "#"; }<s:TextInput id= 阅读全文
posted @ 2011-06-13 15:53 深海大虾