flex小错误(常记多做)
1、假如一个自定义控件被用在一个主控件里,在自定义控件里的方法可以转换为主控件的方法,完成调用。
userRulesCanvas.mxml 和 editRulesCanvas.mxml
compent控件代码如下:
private function submitClick():void
{
if((code.length == 0)||(addr.length == 0))
{ //这里可调用主程序的方法editSipAccountHandle()
parentApplication.editSipAccountHandle(code.text,addr.text)
closeHandle()
}
}
主控件代码如下:
public function editSipAccountHandle(sipAccount:String)
{
getUserRuleWs.modifyRulePhone(sipAccount);
}
2、xml格式的string对象的读取
event.result的值等于如下
<?xml version="1.0" encoding="UTF-8"?>
<rule>
<sipAccount>sip:hill@ocp.gz.com</sipAccount>
<extension>sip:8190@ext.protel.com.hk</extension>
<action>
<outgoing>
<sipPhoneAddr code="408">sip:969071526@ext.protel.com.hk</sipPhoneAddr>
<sipPhoneAddr code="404">sip:963306728@ext.protel.com.hk</sipPhoneAddr>
相关文档:
We're going to keep this post lean and mean, and get down to
business with 10 Tips that will keep your Flex applications fast, lean,
and responsive.
Rule # 1: Clean up after yourself
In general, it is good practice to maintain clean code. Not only
in the sense of having properly formatted and ......
一、自定义Panel组件
package test
{
import mx.containers.Panel;
import mx.core.UIComponent;
/**
* 自定义Panel
* **/
public class MyPanel extends Panel
......
选定矩形的一个顶点为起点,开始画
x0:顶点横坐标
y0:顶点纵坐标
x1:水平线上另一顶点的横坐标
y1:水平线上另一丁点的纵坐标
private function drawDottenRect(g:Graphics,
x0:Number,
&nbs ......
前言
最近,正竭斯底里地重构flex技术平台开发的产品【wizBuilder CS】。以前为赶功能,界面部分代码都写得好乱,现在是时候修理下自己作的孽了,顺便为产品添加多语言支持(Localization)。
主要任务
代码重构
多语言支持
添加新功能、修改现有功能、去掉不合理的功能
修正重构过程中发现的 ......
Flex中如何通过strokeWidth, strokeColor和shadowColor样式,创建一个自定义风格的HRule或VRule
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="vertical"
verticalAlign="middle"
&nbs ......