PseudoGUI: Screen shows green fields, blue sky, yellow sun and a park bench. The fields and the sky are the "main" scenery mxml file gui, and both the sun and the park bench are each mxml components loaded with the standard
<comp:sun id="sun1"> </comp:sun> <comp:bench id="bench1"> </comp:bench> bench contains the username and password entry fields sun contains the login button. Standard Cairngorm where all components are on same View = <mx:Button id="signInButton" label="Sign In" click="{signon(event)}" ............... private function signon(e:MouseEvent):void{ var signonEvent:SignonEvent = new SignonEvent( new LoginVO ( username.text, password.text)); signonEvent.dispatch(); } ........... However here the entry fields are on one component, the login button is on another and neither are the "parent". Do I dispatch an event from the sun indicating it was clicked: <mx:Metadata> [Event(name="userLogAttempt", type = "flash.events.Event")] </mx:Metadata> .......... private function signon2(e:MouseEvent):void ............ {var userLogAttempt:Event = new Event("userLogAttempt"); this.dispatchEvent(userLogAttempt); ......... <mx:button id="btnSun" click="{signon2(event)}"/> ............ and then trap the sun click event on the scenery parent: private function userLogAttempt():void{ Alert.show("Sun clicked = logon attempt"); // should be able to extract username and password from bench child? Build VO here and dispatch classic Cairngorm event ............. } <comp:sun id="sun1"> userLogAttempt="userLogAttempt()"> </comp:sun> ......... where I should be able to extract the username and password from the bench child, right? And then dispatch a classic Cairngorm event? or is there a 'Cairngorm' way of doing this? TIA, Mic.