Changeset 151
- Timestamp:
- 05/07/08 19:13:31 (8 months ago)
- Location:
- trunk/buddypub/bpclientflex/src
- Files:
-
- 2 modified
-
index.mxml (modified) (1 diff)
-
org/cnflex/buddypub/mvc/view/popup/MessagePopup.mxml (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/buddypub/bpclientflex/src/index.mxml
r150 r151 15 15 <mx:Script> 16 16 <![CDATA[ 17 import mx.controls.Alert; 18 import mx.effects.Move; 17 19 import org.cnflex.buddypub.mvc.control.EventHandlers; 18 import com.firemoss.modelglue.event.ModelGlueEvent; 20 import com.firemoss.modelglue.event.ModelGlueEvent; 21 19 22 ]]> 20 23 </mx:Script> 24 21 25 <container:Main width="100%" height="100%"/> 22 <popup:MessagePopup x="300" y="300"/> 26 <mx:Button click="msgBox.addMessage()" label="测试"/> 27 <popup:MessagePopup id="msgBox" visible="false" x="{width-msgBox.width-2}" /> 28 23 29 </mx:Application> -
trunk/buddypub/bpclientflex/src/org/cnflex/buddypub/mvc/view/popup/MessagePopup.mxml
r150 r151 1 1 <?xml version="1.0" encoding="utf-8"?> 2 <mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" width="2 00" height="250"2 <mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" width="250" height="150" 3 3 borderColor="#FF690A" themeColor="#FEFFFF" borderStyle="solid" 4 backgroundAlpha="1" 4 backgroundAlpha="1" visible="{isPlaying}" mouseOver="isMouseOver=true" 5 mouseOut="isMouseOver=false" 5 6 backgroundColor="#fff5df" > 6 7 7 8 <mx:Script> 8 9 <![CDATA[ 10 import mx.core.Application; 11 import mx.managers.CursorManager; 12 13 private var isMouseOver:Boolean = false; 14 15 [Bindable] 16 private var isPlaying:Boolean = false; 17 9 18 [Bindable] 10 19 private var msgTitle:String = "提示:"; 11 20 21 [Bindable] 22 private var msgContent:String = "内容内容内容内容内容内容!"; 23 24 public function addMessage():void{ 25 showMessage(); 26 } 27 28 private function showMessage():void{ 29 30 moveup.yFrom = Application.application.height; 31 moveup.yTo = Application.application.height - height; 32 isPlaying = true; 33 moveup.play(); 34 } 35 36 private function displayMessage():void{ 37 setTimeout(hideMessage,2000); 38 } 39 40 private function doneMessage():void{ 41 //Alert.show("display done!"); 42 isPlaying = false; 43 } 44 45 private function hideMessage():void{ 46 if(isMouseOver){ 47 setTimeout(hideMessage,1000); 48 }else{ 49 movedown.yFrom = Application.application.height - height; 50 movedown.yTo = Application.application.height; 51 movedown.play(); 52 } 53 } 12 54 13 55 ]]> 14 56 </mx:Script> 57 58 <mx:Move id="moveup" target="{this}" duration="1000" effectEnd="displayMessage()" /> 59 <mx:Move id="movedown" target="{this}" duration="1000" effectEnd="doneMessage()"/> 15 60 16 17 <mx:HBox width="100%" backgroundColor="#FF680A">18 <mx:Label width="100%" paddingLeft="6" text="{msgTitle}" fontSize="14" color="#FFFFFF" />19 </mx:HBox>20 21 <mx:VBox width="100%" height="100%">22 23 </mx:VBox>61 <mx:Box width="100%" backgroundColor="#FF680A"> 62 <mx:Label width="100%" paddingLeft="6" text="{msgTitle}" fontSize="14" color="#FFFFFF" /> 63 </mx:Box> 64 65 <mx:Box width="100%" height="100%" horizontalAlign="center" verticalAlign="middle"> 66 <mx:Text text="{msgContent}" fontSize="14"/> 67 </mx:Box> 68 24 69 25 70 </mx:Canvas>
