Category Archives: ActionScript

ActionScript

Flex: Bindable注意事项

Bindable通过Event机制来实现. 详见: http://liguoliang.com/2008/09/104/
但是在该过程中, 时常会因不小心变更对象 导致Bindable无法继续. 如下:
某DataGrid, 其dataprovider为 studentsAC – ArrayColl

More…

Posted in ActionScript, Flex | Tagged , | Leave a comment

Flex小技巧: 设定Visiable = flase后重新排列UI

初始化完成后:
image
点击左侧目录后:
image
 
具体实现:
初始化时:
//Main – Maincontent
vboxMainRightcontent = new VBox();
empListContainer = new MainContent();
empListC

More…

Posted in ActionScript, Flex | Tagged , , , | 1 Comment

Flex: 对象编辑器的实现思路

要求: 如下编辑器:
编辑职员信息, 在验证其输入均合法之后, 并判断该对象是否需要保存 – 如果没有改变, 则不需要保存
image
 
分析:
1. 可继承Vbox等组件设计该Edtior
主要进行创建, 添加组件等操作…
2. 设定编辑对象, 设定正在编辑的职员,

More…

Posted in ActionScript, Flex | Tagged , | Leave a comment

Flex: 输入组件 – TextInput, ComboBox, Radiobutton, TextArea等 对其输入内容进行验证

如: 某编辑器:
image
代码:
textName.addEventListener(Event.CHANGE, onTextNameChange);//增加监听函数,监听EventChange, 如果不需实时验证, 可监听FlexEvent.VALUE_COMMIT事件.
//———–

More…

Posted in ActionScript | Tagged , , , , , | Leave a comment

Flex端调用Java服务的过程

1. get Operation
2. set arguments
3. AddResponder, Send();
如下:

private var op:AbstractOperation;
public function loadEmployees():void {
op = AppC

More…

Posted in ActionScript, Flex | Tagged , , , | Leave a comment