设置Button控件创建完毕时触发的事件.
Button控件的creationCompleteEffect样式.
示例:
刷新查看效果.
代码:
你也可以通过css设置:
也可以通过as的方法设置:
示例:
刷新查看效果.
代码:
<?xml version="1.0" encoding="utf-8"?>
<!-- http://blog.flexexamples.com/2008/06/17/setting-a-creation-complete-effect-on-a-button-control-in-flex/ -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="vertical"
verticalAlign="middle"
backgroundColor="white">
<mx:Button id="button"
label="Button"
creationCompleteEffect="Zoom" />
</mx:Application>
<!-- http://blog.flexexamples.com/2008/06/17/setting-a-creation-complete-effect-on-a-button-control-in-flex/ -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="vertical"
verticalAlign="middle"
backgroundColor="white">
<mx:Button id="button"
label="Button"
creationCompleteEffect="Zoom" />
</mx:Application>
你也可以通过css设置:
<?xml version="1.0" encoding="utf-8"?>
<!-- http://blog.flexexamples.com/2008/06/17/setting-a-creation-complete-effect-on-a-button-control-in-flex/ -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="vertical"
verticalAlign="middle"
backgroundColor="white">
<mx:Style>
Button {
creationCompleteEffect: Zoom;
}
</mx:Style>
<mx:Button id="button"
label="Button" />
</mx:Application>
<!-- http://blog.flexexamples.com/2008/06/17/setting-a-creation-complete-effect-on-a-button-control-in-flex/ -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="vertical"
verticalAlign="middle"
backgroundColor="white">
<mx:Style>
Button {
creationCompleteEffect: Zoom;
}
</mx:Style>
<mx:Button id="button"
label="Button" />
</mx:Application>
也可以通过as的方法设置:
<?xml version="1.0" encoding="utf-8"?>
<!-- http://blog.flexexamples.com/2008/06/17/setting-a-creation-complete-effect-on-a-button-control-in-flex/ -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="vertical"
verticalAlign="middle"
backgroundColor="white"
creationComplete="init();">
<mx:Script>
<![CDATA[
import mx.controls.Button;
import mx.effects.Zoom;
private var button:Button;
private function init():void {
button = new Button();
button.label = "Button";
button.setStyle("creationCompleteEffect", Zoom);
addChild(button);
}
]]>
</mx:Script>
</mx:Application>
<!-- http://blog.flexexamples.com/2008/06/17/setting-a-creation-complete-effect-on-a-button-control-in-flex/ -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="vertical"
verticalAlign="middle"
backgroundColor="white"
creationComplete="init();">
<mx:Script>
<![CDATA[
import mx.controls.Button;
import mx.effects.Zoom;
private var button:Button;
private function init():void {
button = new Button();
button.label = "Button";
button.setStyle("creationCompleteEffect", Zoom);
addChild(button);
}
]]>
</mx:Script>
</mx:Application>