西西軟件園多重安全檢測(cè)下載網(wǎng)站、值得信賴的軟件下載站!
軟件
軟件
文章
搜索

首頁編程開發(fā)php教程 → FLEX3學(xué)習(xí)點(diǎn)滴

FLEX3學(xué)習(xí)點(diǎn)滴

相關(guān)軟件相關(guān)文章發(fā)表評(píng)論 來源:本站整理時(shí)間:2010/8/9 0:16:42字體大小:A-A+

作者:佚名點(diǎn)擊:169次評(píng)論:2次標(biāo)簽: 學(xué)習(xí)

  • 類型:學(xué)生模板大。1.8M語言:中文 評(píng)分:10.0
  • 標(biāo)簽:
立即下載

我可能永遠(yuǎn)沒有機(jī)會(huì)用FLEX,但我還是要堅(jiān)持學(xué)習(xí)它,這是我的一個(gè)興趣
組件可以設(shè)置minWidth等值,這樣子在拖到大小時(shí),不能小于這個(gè)值

Flex 不支持使用層疊樣式表 (CSS) 來控制組件的所有可視方面。屬性, 比如 x, y, width 和 height 是 UIComponent 類的屬性

用StyleManager設(shè)置樣式
var css:CSSStyleDeclaration = new CSSStyleDeclaration('mystyle');
css.setStyle('fontSize','30');
css.setStyle('color','blue');
StyleManager.setStyleDeclaration('.panel',css,true);


NavBar及其子類,不接受XMLList做為數(shù)據(jù)源,我也不知道為什么
<mx:Button label="Button">
<mx:icon>@Embed(source='file:///C|/Users/terry/Desktop/20066162321370.jpg')</mx:icon>
</mx:Button>
以下效果一樣
<mx:Image id="loader1" source="@Embed(source='logo.jpg')"/>
<mx:Image id="loader1" source="@Embed('logo.jpg')"/>

HScrollBar
其值在Design中填不上,主要有下列值
<mx:HScrollBar
minScrollPosition="0" maxScrollPosition="100"
lineScrollSize="5" pageScrollSize="10" />

LinkBar數(shù)據(jù)源是對(duì)象數(shù)組時(shí),獲得對(duì)象的屬性
var o:LinkBar = LinkBar(evt.target) ;
race(o.dataProvider[evt.index].data)

RadioButtonGroup EventDispatcher Object

NavBar及其子類,事件
mx.events.ItemClickEvent
可以用event.index event.label獲得數(shù)據(jù)

有as代碼定義XMLList是外邊用一個(gè)空的<>為什么呢

private var a:XMLList =
<>
<a>aa</a>
<a>bb</a>
</>

Menu菜單等相關(guān)的東西,數(shù)據(jù)可以在事件中用
event.item獲得


數(shù)據(jù)驗(yàn)證
提示的樣式
.errorTip
{
fontSize: 12;
}

基本的:指定source property,trigger,triggerEvent

正測(cè)驗(yàn)證是的,事件
public function validResult(evt:ValidationResultEvent):void{
if(evt.type == ValidationResultEvent.VALID ){
var re:RegExpValidationResult;
for(var i:int=0;i<evt.results.length;i++){
re = evt.results[i];
result.text += "\n" + re.matchedString;
}
else{
result.text = 'not find';
}
}

Vresult = Text.validate();
if(Vresult.type = ValidationResultEvent.VALID


如何裁入這體并使用
[Embed("../assets/STXINWEI.TTF",fontName="myfont")]
[Bindable]
private var f:Class;

<mx:Label text="我要轉(zhuǎn)" width="245" fontFamily="myfont"/>

自定義下載bar
繼承自DownloadProgressBar,重寫幾個(gè)屬性及方法
構(gòu)造函數(shù)中:
downloadingLabel="downing";
要重寫的方法:
showDisplayForInit
showDisplayForDownloading

應(yīng)用程序本身用Application.application為訪問

ModuleManager加載模塊
ModuleManager.getModule()其返回IModuleInfo
要把模塊加到主程序中,必須類型轉(zhuǎn)換一下
IModuleInfo.factory.create() as 模塊

光標(biāo)管理
CursorManager.setBusyCursor();

ToolTipManager 提示管理器
可以使用其它容器,象Panel等來實(shí)現(xiàn)
其要實(shí)現(xiàn)<mx:Panel implements="mx.core.IToolTip" IToolTip這個(gè)接口才可以
使用時(shí)
public function onshow(evt:ToolTipEvent):void{
var p:ppp = new ppp();
evt.toolTip = p;
}

BrowserManager和瀏覽器交互
BrowserManager.getInstance();其返回一個(gè)
IBrowserManager對(duì)象,其完成具體功能,

如何給圖片表背景線?
<mx:backgroundElements>
<mx:GridLines direction="horizontal">
mx:horizontalStroke>
<mx:Stroke weight="2" color="#ff0000" alpha="0.5" />
</mx:horizontalStroke>
<mx:horizontalFill>
<mx:SolidColor color="#cccccc" alpha="0.8" />
</mx:horizontalFill>
</mx:GridLines>
</mx:backgroundElements>

ajaxBridge
要在服務(wù)器中訪問,不能直接打開,那樣子會(huì)報(bào)錯(cuò)

mx.utils.ObjectUtil
有字符串或數(shù)字比較的方法

低數(shù)據(jù)量通信
Webservice
<mx:opertaion>
resultformat
result
fault
<mx:request>
指定參數(shù)
</mx:request>
</mx:opertion>

備注:在yii中寫的webservice返回的雖然是xml,flex認(rèn)成是一段String需要格式轉(zhuǎn)換
var s:String = evt.result as String;
var shopxml:XML = new XML(s);
shops = shopxml.shop;
上邊這咱做法是先轉(zhuǎn)成xml,再轉(zhuǎn)成xmllist


AMFPHP
一:用Responder
二:remoteObject
1:編譯中加上 -services "services-config.xml"
2:從serices中復(fù)制上邊的文件,并改其中的gateway為正確的路徑
3:配置source destination
<mx:RemoteObject source="Hello" destination="amfphp" id="service">
<mx:method name="sayHello" result="getsay(event)" />
</mx:RemoteObject>
4:調(diào)用service.getOperation('sayHello').send(參數(shù))

對(duì)象映射是[RemoteClass(alias="Project.Students")]中的alias是指定Flex對(duì)應(yīng)的類的路徑,而不是php中的
就是說其寫php中的public $_explicitType = "Project.Students";指到同一個(gè)地方

得到的數(shù)據(jù)雖然為數(shù)組,想有還是要轉(zhuǎn)換一下new ArrayCollection(ArrayUtil.toArray(evt.result));

    相關(guān)評(píng)論

    閱讀本文后您有什么感想? 已有人給出評(píng)價(jià)!

    • 8 喜歡喜歡
    • 3 頂
    • 1 難過難過
    • 5 囧
    • 3 圍觀圍觀
    • 2 無聊無聊

    熱門評(píng)論

    最新評(píng)論

    發(fā)表評(píng)論 查看所有評(píng)論(2)

    昵稱:
    表情: 高興 可 汗 我不要 害羞 好 下下下 送花 屎 親親
    字?jǐn)?shù): 0/500 (您的評(píng)論需要經(jīng)過審核才能顯示)