FLEX实践—默认弹出窗口
本例中将实现当应用运行时不进行任何操作就先弹出窗口,点击关闭/点击窗口任一位置 时将关闭窗口
1)创建Component—DefaultWin.mxml (目录结构src/components/DefaultWin.mxml)
<?xml version="1.0" encoding="utf-8"?>
<mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml"
click="{this.visible=false}"
showCloseButton="true"
close="{this.visible=false}"
width="450"
height="253"
borderAlpha="0.8"
fontWeight="normal"
headerHeight="20"
borderColor="#EED9FB"
backgroundColor="#070707"
color="#FFFFFF"
cornerRadius="8"
creationComplete="init()">
<mx:Script>
<![CDATA[
private function init():void
{
move_up.yfrom=can.height - 6;
move_up.yTo=0 - content.height + 6;
move_up.repeatCount=0; //loop
move_up.repeatDelay=0; //loop time
move_up.duration=6000; //the time of scroll once
move_up.play();
}
private function move_pause():void
{
move_up.pause(); //pause
}
private function move_resume():void
{
move_up.resume(); //start from the pause position
}
]]>
</mx:Script>
<mx:Move id="move_up"
target="{content}"/>
<mx:VBox width="100%"
height="100%"
horizontalAlign="center">
<mx:HBox width="100%"
&n
相关文档:
发现了一个Flex中TextInput的一个比较有用的属性restrict(约束,限定),先看下例子:
1,<mx:TextInput id="test_ti" width="160" maxChars="20" restrict="0-9" text="0"/>
这样,这个输入框最多只能输入20个字符,只能输入0到9之间的数字了,你如果输入别的是输入不进去的
2,<mx:TextInput id="test_ti" width="1 ......
<?xml version="1.0" encoding="utf-8"?>
<!-- http://yecon.blog.hexun.com/28902341_d.html -->
<!-- http://www.slsay.com -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="vertical"
&nb ......
var login:infoChange=infoChange(PopUpManager.createPopUp( this, infoChange , true));
login.x=250;
login.y=150;
login.userid.text=dg.selectedItem.aa;
login.username.text=dg.selectedItem.bb;
......
<?xml version=
"1.0"
encoding=
"utf-8"
?>
<mx:Application xmlns:mx=
"http://www.adobe.com/2006/mxml"
xmlns:assql=
"com.maclema.mysql.mxml.*"
& ......
flash和flex针对不同的目的,提供了3种不同的坐标系。
全局的就是(stage级别的)
本地坐标系(组件级别的)
内容坐标系(相对于本地坐标系说的 ......