Jump to content
Search Community

Search the Community

Showing results for tags 'TransformManager'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • GreenSock Forums
    • GSAP
    • Banner Animation
    • Jobs & Freelance
  • Flash / ActionScript Archive
    • GSAP (Flash)
    • Loading (Flash)
    • TransformManager (Flash)

Product Groups

  • Club GreenSock
  • TransformManager
  • Supercharge


There are no results to display.

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



Personal Website



Company Website



Found 16 results

  1. Hello, I am trying to remove some items from the taregetObjects list using array but it's removing only one item! Code sample: var my_item:TransformItem = t_manager.addItem(my_mc); my_item.addEventListener(TransformEvent.SELECT, addToList); function addToList(event:TransformEvent):void { selectedArray = new Array; for (var t:int = 0; t<t_manager.selectedTargetObjects.length; t++) { selectedArray.push(t_manager.selectedTargetObjects[t]); } ///selectedArray = t_manager.selectedTargetObjects; ///selectedArray = t_manager.selectedItems; } //// Remove items from targetObjects array: index = 0 for(var i:int = 0; i< selectedArray.length; i++) { ///////// some code here index++ //trace(index) // output: 4 if (index == selectedArray.length) { for (var t:int = 0; t < index; t++) { t_manager.removeItem(selectedArray[i]); } } } it's removing one item only!
  2. Transform Manager works GREAT in general, first off. But, when I apply a ColorMatrixFilter to a container - in this case taking the whole design area and applying a greyscale effect - the TransformManager selection box / handles show up offset up and left from the actual target. The filter applied looks like- _greyScaleEnabled == true; var matrix:Array = new Array(); matrix=matrix.concat([0.5,0.5,0.5,0,0]);// red matrix=matrix.concat([0.5,0.5,0.5,0,0]);// green matrix=matrix.concat([0.5,0.5,0.5,0,0]);// blue matrix=matrix.concat([0,0,0,1,0]);// alpha var greyscaleFilter:ColorMatrixFilter=new ColorMatrixFilter(matrix); applyCanvasMatrixFilter(greyscaleFilter) applied to the layers container (where all the interactive objects are in child containers for different layers) public function applyCanvasMatrixFilter( $matrixFilter:ColorMatrixFilter ):void { if (!_myFilters) { _myFilters = []; } _myFilters.push($matrixFilter); _layersContainer.filters = _myFilters; } From this point on, after the TransformTool had been positioned perfectly up until this point, it will now be offset significantly up and left. It seems there may be some kind of translation from child x,y position to the stage position / transform tool container (localToGlobal or similar?) that might not be working right when a filter like this is applied to a grandparent of the target object. Scale is at play too of both the target object and the container object as well. Is this a known bug, or are there configurations for the TransformTool that will help correct offset? Does applying a filter to a parent container wipe out location data of child objects in flash somehow? Thanks so much for any insight on how to fix this...
  3. Hi, I am trying to edit the "onKeyPress" function to allow deleting the text fields by pressing two keys (Shift & Backspace), private static function onKeyPress($e:KeyboardEvent):void { _keysDown[$e.keyCode] = true; if ($e.keyCode == Keyboard.DELETE || _keysDown[Keyboard.SHIFT] && _keysDown[Keyboard.BACKSPACE]) ... The code above will not work unless I set the "hasSelectableText" Boolean to false: newVars.hasSelectableText = ($targetObject is TextField) ? false : $hasSelectableText; But now I am not able to highlight the text! how to solve that please? can you point me to the line where I can set the selected object as a text field or "hasSelectableText"? Or if I added the text field inside a movieClip is there any way to use "SCALE_WIDTH_AND_HEIGHT" function instead of the normal scale mode? Thanks.
  4. I would like to trigger an event when the user clicks no an item in my TransformManager list, but I cant figure out what to listen for? here are some things I've tried: listener('add', manager); listener('add', manager.selectedItems); ====== So this works but obviously it heres all the other objects on stage if the user clicks them listener('add', this.stage); ========
  5. Hello to all, As some devs fail to make FabricJS work properly with CreateJS suite, and as there is no clean alternative righ now, do you plan to port TransforManager into HTML5/JS world ?
  6. I have added dynamic text to my TransformManager, is it possible to change the size of dynamically added text ?
  7. I am trying to delete on drag and drop or intersect with checkHitAreare it dorset seem to work with TransformManager. in my app i would like the user to be able to drag an item to a trashcan, the items are all objects that are in a TransformManager. is it possible to call same delete function that is used when desktop users hit the delete key? stage.addEventListener(Event.ENTER_FRAME, checkHitAreare); function checkHitAreare(evt:Event) { var currentMC:MovieClip; var removeMCs:Array = []; for(var i=0; i < stage.numChildren; i++){ currentMC = MovieClip(stage.getChildAt(i)); if (currentMC != this.recp_mc && this.recp_mc.hitTestObject(currentMC)) { removeMCs.push(currentMC); } } for(var j:int = 0 ; j < removeMCs.length;j++) { stage.removeChild(removeMCs[j]); } }
  8. is there sorting I could do to stop my dynamic text field from disappearing on rotate ? yourtxt.addEventListener(MouseEvent.CLICK, textFrom); function textFrom(event:MouseEvent):void { var textFormat:TextFormat = new TextFormat("Cubano","35","0xEFB20C","focusRectPadding",0); var textField:TextField = new TextField(); textField.defaultTextFormat = textFormat; textField.text = 'Your text here'; textField.x = 258.75; textField.y = 100; textField.width = 300; textField.height = 80; textField.multiline = true; textField.wordWrap = true; textField.type = "input"; textField.addEventListener(Event.RENDER, fixFocusRect); function fixFocusRect(event:Event):void { event.target.drawFocus(false); } addChild(textField); var manager:TransformManager = new TransformManager({targetObjects:[textField],hasSelectableText:true,forceSelectionToFront:true,allowDelete:true,autoDeselect:true,handleSize:22}); }
  9. Hi, I am using 'selectionScaleX' & 'selectionScaleY' property to scale selected image. _transformManager.selectionScaleX = 0.5 _transformManager.selectionScaleY = 0.5 However it change the image x and y position. Is is possible to scale selected image object without changing image position? Thank You Regards, Bharat
  10. Hi , Is there any way I can stop or correct the rotation of Selection Box Elements added? I have a button which rotates the object by 90 degrees but it also rotates the UI with it. Thanks David
  11. Hi, Just wondered if anyone had seen this error before... and can knows of a solution Transforming RichEditableText works great but at intermittent points moving the object is restricted to fixed vertical and horizontal directions and the the object scales sets itself to scale proportionally. I've recorded a video to illustrate this as its difficult to reproduce - i haven't managed to find a trigger http://youtu.be/ebPBcVhHoRM Thanks David
  12. Once again .. thanks for an awesome code, that really helps me out on a day to day basis Right now, I'm working on a project using the crop-functions, and I have a few questions, that I can't seem to find any answers to on the forums, or on Google. First off, when I add a item that use the crop-function, is it somehow possible to have the scaling default to constraining scale? I can't seem to call the constrainScale:Boolean -property, that I usually use in a transform item. - so I guess it's not there ... but if I hold down shift, I can see the functionality is there! Secondly, is there by chance a boolean to toggle the mouse-click that activates the cropping? Since I was planing to make cropping occur only when the user clicks on a button, while the item is selected, and not being able to activate it by double-clicking. Are there any way to do this without changes to the source? p.s. you guys rocks!
  13. Hi, I'm trying to change the source of a spark image in which has a flexcrop applied to it. Simply changing the content image source combusts the flexcrop applied. Here's my idea find flexcrop on page export transform xml for item destroy transform change image source update rawWidth and rawHeight in saved xml Apply transform and flexcrop to image using updated xml So i'm half way through coding this mammoth solution (I hope) and wondered if any one had any quicker ideas Thanks David
  14. Is it possible to turn on the handles and outline of an object without clicking on it? I'm adding objects to the stage dynamically, and I'd like to turn the cages on when they are added.
  15. Hello, I am working on a prototype in Flex using LoadMax to load an image into a loader FlexContentDisplay. The FlexContentDisplay is embed in a Canvas which is added to the TransformManager. I have to work on width, height, x and y of this image in the canvas. My question is : Is it better to work on the rawContent property of FlexContentDisplay or directly with the FlexContentDisplay ? I wonder this as the FlexContentDisplay extends UIComponent, I cannot really work on width and height but directly with scaleX and scaleY. Many thanks
  16. I am attempting to use "addSelectionBoxElement" to add an edit button to a selected object in my application. After working with it a bit, I've realized that it is a TransformManager method, so it adds that edit button to every single TransformItem associated with my TransformManager. What I am trying to do is only add the edit button to specific TransformItems (for example I have Shapes, TextField, images, etc). Is there any way to only add the edit button for specific objects, or to hide the edit button when certain objects are selected? Thanks for your help.
  • Create New...