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
相关文档:
1.下载eclipse的插件包:FB3_WWEJ_Plugin.exe
地址:http://trials.adobe.com/Applications/Flex/FlexBuilder/3/FB3_WWEJ_Plugin.exe
2.在任意目录建一个以下结构的目录:flex_plugin->eclipse->plugins和features
3.进入Flex Builder 3 的安装目录 将plugins目录下所有以 com.adobe 开头的文件或文件夹copy到上 ......
自定义类(BroadCastMarquee.as):
package marquee
{
import flash.events.MouseEvent;
import flash.events.TimerEvent;
import flash.geom.Rectangle;
import flash.text.TextField;
import flash.text.TextFiel ......
今天突发奇想,想试一试Flex的保存功能,知道FileReference这个类里面直接就有save方法,API也说的很清楚,可是FB里面死活就是找不到这个方法,无奈上网一找才发现原来这个功能是Flash10的功能,而我的FB的默认配置是Flash9,具体修改方法:点项目属性->FLex Compiler->Requiment Flash Player Version改为10.0.0就可 ......
import flash.display.DisplayObject;
import mx.core.Application;
import mx.managers.PopUpManager;
var win:TestWindows= PopUpManager.createPopUp(DisplayObject(Application.application),TitleWindows,true) as TitleWindows;
PopUpManager.centerPopUp(win); ......