Jump to content


  • Posts

  • Joined

  • Last visited

spajon's Achievements


Newbie (1/14)



  1. Hi, I have just downloaded the TransformManager component and I launched the sample flex project where you should be able to resize an image and a TextArea, but no image was displayed on the screen. Am I doing something wrong or is there something that I have missed? If I comment the lines with the FlexTransformManager in the mxml then the image is displayed. Here is the code: @font-face { src:local("Verdana"); fontFamily: embeddedFont; advancedAntiAliasing: true; } </p><p> import mx.core.UIComponent;</p><p> import mx.core.FlexSprite;</p><p> import com.greensock.events.TransformEvent;</p><p> import com.greensock.transform.utils.*;</p><p> import com.greensock.transform.*;</p><p> import mx.controls.Label;</p><p>&nbsp;</p><p> private function init():void {</p><p> myManager.addEventListener(TransformEvent.SELECTION_CHANGE, onSelectionChange, false, 0, true);</p><p> myManager.addEventListener(TransformEvent.SCALE, onScale, false, 0, true);</p><p> myManager.addEventListener(TransformEvent.FINISH_INTERACTIVE_SCALE, onFinishInteractiveScale, false, 0, true); </p><p> myManager.addEventListener(TransformEvent.DOUBLE_CLICK, onDoubleClick, false, 0, true); </p><p>&nbsp;</p><p> /* To impose some scale limitations, uncomment this...</p><p> var item:TransformItem = myManager.getItem(image1);</p><p> item.setScaleConstraints(0.5, 1, 0.5, 1); //impose scale limits </p><p> item = myManager.getItem(myTextArea);</p><p> item.constrainScale = true; //cause image2 to scale proportionately when interactively scaling it </p><p> */</p><p> }</p><p> private function onScale($e:TransformEvent):void {</p><p> trace("Scaled " + $e.items.length + " items");</p><p> }</p><p> public function onFinishInteractiveScale($e:TransformEvent):void {</p><p> trace("Finished interactive scale");</p><p> }</p><p> public function onDoubleClick($e:TransformEvent):void {</p><p> trace("Double-clicked selection containing " + $e.items.length + " items");</p><p> }</p><p> private function onSelectionChange($e:TransformEvent):void {</p><p> trace("Changed selection. Items just selected/deselected (changed): " + $e.items.length + ", total items now selected: " + myManager.selectedItems.length);</p><p> }</p><p>