Changeset 152
- Timestamp:
- 05/07/08 23:07:43 (8 months ago)
- Location:
- trunk/buddypub/bpclientflex/src
- Files:
-
- 3 modified
-
index.mxml (modified) (1 diff)
-
org/cnflex/buddypub/mvc/control/EventHandlers.as (modified) (1 diff)
-
org/cnflex/buddypub/mvc/view/popup/MessagePopup.mxml (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/buddypub/bpclientflex/src/index.mxml
r151 r152 20 20 import com.firemoss.modelglue.event.ModelGlueEvent; 21 21 22 private function testAlert():void{ 23 var event:ModelGlueEvent = new ModelGlueEvent(EventHandlers.ALERT_MESSAGE,{message:"This is a test message"}); 24 event.dispatch(); 25 } 26 22 27 ]]> 23 28 </mx:Script> 24 29 25 30 <container:Main width="100%" height="100%"/> 26 <mx:Button click=" msgBox.addMessage()" label="测试"/>31 <mx:Button click="testAlert()" label="测试"/> 27 32 <popup:MessagePopup id="msgBox" visible="false" x="{width-msgBox.width-2}" /> 28 33 -
trunk/buddypub/bpclientflex/src/org/cnflex/buddypub/mvc/control/EventHandlers.as
r135 r152 21 21 public static const RPC_FAULT:String = "RPC_FAULT"; 22 22 public static const INTERNAL_FAULT:String = "INTERNAL_FAULT"; 23 public static const ALERT_MESSAGE:String = "ALERT_MESSAGE"; 23 24 24 25 public static const USER_LOGIN:String = "USER_LOGIN"; -
trunk/buddypub/bpclientflex/src/org/cnflex/buddypub/mvc/view/popup/MessagePopup.mxml
r151 r152 3 3 borderColor="#FF690A" themeColor="#FEFFFF" borderStyle="solid" 4 4 backgroundAlpha="1" visible="{isPlaying}" mouseOver="isMouseOver=true" 5 mouseOut="isMouseOver=false" 5 mouseOut="isMouseOver=false" creationComplete="init()" 6 6 backgroundColor="#fff5df" > 7 7 8 8 <mx:Script> 9 9 <![CDATA[ 10 import org.cnflex.buddypub.mvc.control.EventHandlers; 11 import com.firemoss.modelglue.ModelGlueFramework; 12 import com.firemoss.modelglue.event.ModelGlueEvent; 13 import mx.collections.ArrayCollection; 10 14 import mx.core.Application; 11 15 import mx.managers.CursorManager; … … 20 24 21 25 [Bindable] 22 private var msgContent:String = " 内容内容内容内容内容内容!";26 private var msgContent:String = ""; 23 27 24 public function addMessage():void{ 25 showMessage(); 28 private var queueMessages:ArrayCollection = new ArrayCollection(); 29 30 private function init():void{ 31 ModelGlueFramework.subscribe(EventHandlers.ALERT_MESSAGE,this,addMessage); 32 } 33 34 public function addMessage(event:ModelGlueEvent):void{ 35 if(isPlaying){ 36 37 }else{ 38 showMessage(); 39 } 26 40 } 27 41
