Applying behaviors in ActionScript with Resize class : ActionScript « Development « Flex






Applying behaviors in ActionScript with Resize class

Applying behaviors in ActionScript with Resize class
          

<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
    creationComplete="createEffect(event);">
    <mx:Script>
        
        import mx.effects.Resize;
        private var resizeLarge:Resize = new Resize();
        private function createEffect(eventObj:Event):void {
            resizeLarge.target=myTA;
            resizeLarge.widthTo=150;
            resizeLarge.heightTo=150;
            resizeLarge.duration=750;
        }
      
    </mx:Script>
    <mx:VBox borderStyle="solid">
        <mx:Button label="Start" click="resizeLarge.end();resizeLarge.play();" />
        <mx:TextArea id="myTA" text="Here is some text." />
    </mx:VBox>
</mx:Application>

   
    
    
    
    
    
    
    
    
    
  








Related examples in the same category

1.Use ActionScript to configure controlsUse ActionScript to configure controls
2.Set target and targets properties in ActionScriptSet target and targets properties in ActionScript
3.Add controls with ActionScriptAdd controls with ActionScript
4.Load swf file with ModuleManager in ActionScriptLoad swf file with ModuleManager in ActionScript
5.Inline ActionScriptInline ActionScript
6.Setting Triggers With ActionScriptSetting Triggers With ActionScript
7.Set Properties of a Child Defined in MXML in ActionScriptSet Properties of a Child Defined in MXML in ActionScript
8.Bind to Properties by Using ActionScriptBind to Properties by Using ActionScript
9.Specify an id value to refer to a component elsewhere in your MXML, either in another tag or in an ActionScript blockSpecify an id value to refer to a component elsewhere in your MXML, either in another tag or in an ActionScript block
10.Tags Are ClassesTags Are Classes
11.Attributes Are PropertiesAttributes Are Properties