How can I swap components in my app?
i have application (flex3) contains canvas. canvas contains hbox 3 components - call them team1, middlesection , team2.
team1 , team2 canvases containing several components inside of them representing 2 sports teams (home , away).
middlesection contains button called "swap" swaps team1 , team2 (like football teams change ends @ end of each quarter).
team1 , team2 both instances of custom team component extends canvas , contains panel, data grid, , other goodies.
unfortunately, can't life of me them swap.
i had hoped this:
private function doswapteams(event:mouseevent):void {
var temp:team = team1;
team1 = team2;
team2 = temp;
}
but no luck.
i tried getting array of children , swapping that...again, no luck. tried invalidating - no luck.
any ideas?
thanks!
all doing changing references. not effect gui.
to define 2 states. 1 inital setup, , 1 swapped setup.
i.e.
in initial setup set postion of team1 top of screen, , in swapped setup, set postion of team1 bottom. , team2.
look @ docs states, , mx:setproperty
thanks,
vackar
More discussions in Flex (Read Only)
adobe
Comments
Post a Comment