Changeset 100 for trunk/buddypub
- Timestamp:
- 04/17/08 00:48:31 (9 months ago)
- Location:
- trunk/buddypub/bpclientflex/src
- Files:
-
- 2 added
- 2 modified
-
assets/pic/logo.jpg (added)
-
index.mxml (modified) (4 diffs)
-
org/cnflex/buddypub/mvc/control/InteractionController.as (modified) (1 diff)
-
org/cnflex/buddypub/mvc/view/container/Main.mxml (added)
Legend:
- Unmodified
- Added
- Removed
-
trunk/buddypub/bpclientflex/src/index.mxml
r91 r100 3 3 xmlns:business="org.cnflex.buddypub.mvc.business.*" 4 4 xmlns:view="org.cnflex.buddypub.mvc.view.*" 5 xmlns:control="org.cnflex.buddypub.mvc.control.*" layout="vertical"> 5 xmlns:control="org.cnflex.buddypub.mvc.control.*" 6 layout="vertical" xmlns:container="org.cnflex.buddypub.mvc.view.container.*" 7 verticalScrollPolicy="off" horizontalScrollPolicy="off" 8 paddingTop="0"> 6 9 7 10 <mx:Style source="assets/css/buddypub_style.css"/> … … 14 17 import org.cnflex.buddypub.mvc.control.EventHandlers; 15 18 import com.firemoss.modelglue.event.ModelGlueEvent; 16 19 /* 17 20 private function calculate():void{ 18 21 var number:int = Math.round(Number(numb.text)); … … 20 23 event.dispatch(); 21 24 } 25 */ 22 26 ]]> 23 27 </mx:Script> 24 28 <!-- 25 29 <mx:Label text="Test"/> 26 30 <mx:Form> … … 30 34 </mx:Form> 31 35 <mx:Button label="Submit" click="calculate()"/> 32 36 --> 37 <container:Main/> 33 38 </mx:Application> -
trunk/buddypub/bpclientflex/src/org/cnflex/buddypub/mvc/control/InteractionController.as
r84 r100 19 19 import com.firemoss.modelglue.event.ModelGlueEvent; 20 20 21 import flash.events.Event; 22 21 23 import mx.controls.Alert; 24 import mx.events.BrowserChangeEvent; 25 import mx.managers.BrowserManager; 26 import mx.managers.IBrowserManager; 27 import mx.utils.URLUtil; 22 28 23 29 public class InteractionController extends ModelGlueController 24 30 { 25 public function notifyUser(event:ModelGlueEvent):void { 31 32 private var browserManager:IBrowserManager; 33 private var urlParsing:Boolean = false; 34 35 public function InteractionController():void{ 36 //initialize deep link configuration 37 browserManager = BrowserManager.getInstance(); 38 browserManager.addEventListener(BrowserChangeEvent.BROWSER_URL_CHANGE, parseURL); 39 browserManager.init("", "Home"); 40 } 41 42 private function parseURL(event:Event):void{ 43 urlParsing = true; 44 var o:Object = URLUtil.stringToObject(browserManager.fragment); 45 //parse url to relate status 46 47 urlParsing = false; 48 } 49 50 private function updateURL():void{ 51 if (!urlParsing){ 52 callLater(actuallyUpdateURL); 53 } 54 } 55 56 private function actuallyUpdateURL():void{ 57 var o:Object = {}; 58 var t:String = ""; 59 var s:String = URLUtil.objectToString(o); 60 browserManager.setFragment(s); 61 browserManager.setTitle(t); 62 } 63 64 public function notifyUser(event:ModelGlueEvent):void { 26 65 if(event is RPCFaultEvent){ 27 66
