李艳军

 

如何在Flex标签中写事件函数

在事件变量值中直接写函数语句,如果是多条语句,则用“;”号隔开。

示例如下:

<mx:Box id="label" backgroundColor="{outColor}" width="{labelWidth}" height="{labelHeight}"
                horizontalAlign="center" verticalAlign="middle"
                buttonMode="true" mouseOver="label.setStyle('backgroundColor',overColor)"
                mouseOut="label.setStyle('backgroundColor',outColor)">
            <s:Label id="plotButton" text="{plotLabel}" click="button1_clickHandler(event)"/>
        </mx:Box>

posted on 2015-08-17 16:11  李艳军  阅读(247)  评论(0编辑  收藏  举报

导航