Code:
<?xml version="1.0" encoding="utf-8"?>
<mx:application mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:script>
<![CDATA[
//these don't work with resize effect
private function a1():void{
b.percentHeight = 20;
a.percentHeight = 80;
}
private function b1():void{
a.percentHeight = 20;
b.percentHeight = 80;
}
//these DO work with resize effect
private function a2():void{
b.height = v.height * 0.2;
a.height = v.height * 0.8;
}
private function b2():void{
a.height = v.height * 0.2;
b.height = v.height * 0.8;
}
]]>
</mx:Script>
<mx:resize id="resize">
<!--
Run as is, with click functions a1 and b1, to see what goes wrong with resizing with a Resize object and percent heights.
(It's a doozy.)
Then change click functions to a2 and b2 to see how it is done right (rightly?).
Note, a1 and b1 work just fine if no Resize object is used.
-->
<mx:vdividedbox width="100%" height="100%" id="v">
<mx:panel id="a" title="A" width="100%" height="100%" backgroundcolor="#FFFFCC" resizeeffect="{resize}">
<mx:button click="a1()" label="Make A bigger">
</mx:Panel>
<mx:panel id="b" title="B" width="100%" height="100%" backgroundcolor="#99CCFF" resizeeffect="{resize}">
<mx:button click="b1()" label="Make B bigger">
</mx:Panel>
</mx:VDividedBox>
</mx:Application>
Monday, January 19, 2009
Tuesday, January 6, 2009
Little nugget
From the funny Onion News Video post today:
Congress approves Intellectual Stimulus Package giving every American a graduate degree. Debate and analysis next "In the Know" 9-10 PM ET Wednesday
Congress approves Intellectual Stimulus Package giving every American a graduate degree. Debate and analysis next "In the Know" 9-10 PM ET Wednesday
Monday, January 5, 2009
Subscribe to:
Posts (Atom)