flex: как сделать два эффекта изменения размера одновременно
Hy,
Можно ли изменить размер приложения в тот же момент, когда изменяется размер Аккордеона, чтобы эффект изменял размер последнего из синхронизированных с изменением размера Приложения?
В моем коде,, Размер приложения изменяется после завершения изменения Аккордеона:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute" minWidth="400" minHeight="300" backgroundColor="white" horizontalScrollPolicy="off" verticalScrollPolicy="off" mouseDown="stage.nativeWindow.startMove()">
<mx:Resize id="expand" target="{application}" heightTo="{acc01.height}"/>
<mx:Accordion id="acc01" x="0" y="0" resizeToContent="true" resize="expand.play();" horizontalScrollPolicy="off" verticalScrollPolicy="off">
<mx:VBox label="Accordion Pane 1" width="100%" height="100%">
<mx:Label text="hello"/>
<mx:Label text="hello"/>
<mx:Label text="hello"/>
<mx:Label text="hello"/>
</mx:VBox>
<mx:VBox label="Panel 2" width="100%" height="100%">
<mx:Label text="hello"/>
<mx:Label text="hello"/>
</mx:VBox>
<mx:VBox label="Panel 3" width="100%" height="100%">
<mx:Label text="hello"/>
<mx:Label text="hello"/>
</mx:VBox>
<mx:VBox label="Panel 4" width="100%" height="100%">
<mx:Label text="hello"/>
<mx:Label text="hello"/>
</mx:VBox>
</mx:Accordion>
</mx:Application>
1 ответ
Посмотрите на http://livedocs.adobe.com/flex/3/langref/mx/effects/Parallel.html, он может сделать то, что вам нужно.