2010-06-12 5 views
0

Hy,: comment faire deux redimensionnez effet en même temps

Est-il possible de redimensionner l'application au même moment où le changement de taille d'accordéon, pour que l'effet redimensionner Og dernier synchronisé avec Redimensionnement de Demande?

Dans mon code ,, l'application est redimensionnée après le redimensionnement d'accordéon est terminée:

<?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> 

Répondre

1

Jetez un oeil à http://livedocs.adobe.com/flex/3/langref/mx/effects/Parallel.html, il pourrait faire ce que vous avez besoin.

+0

Cette classe ne fonctionne pas sur un objet à la fois. J'ai besoin d'exécuter un effet sur deux objets de manière asynchrone. – 123quatre

+0

L'effet Redimensionner possède une propriété targets qui prend un tableau d'objets pour effectuer la transition en parallèle. – jln646v

Questions connexes