Jump to content


  • Posts

  • Joined

  • Last visited

benb's Achievements



  1. Great. That works well. Thanks. The other thing I just noticed is that with one text field selected (but not focused) the delete key doesn't delete the TransformItem. This is even the case when I remove my new focusIn and focusOut handlers (i.e. allowDelete is always true). Is there a way to get that to work? I'm guessing this code in TransformItem would have to be overridden to delete the item if the text field is not focused. public function onPressDelete($e:Event = null, $allowSelectableTextDelete:Boolean = false):Boolean { if (_enabled && _allowDelete && (_hasSelectableText == false || $allowSelectableTextDelete)) { //_hasSelectableText typically means it's a TextField in which case users should be able to hit the DELETE key without deleting the whole TextField. deleteObject(); return true; } return false; }
  2. Thanks for the reply. I could set the allowDelete property to false but that would disable the delete key completely, right? I was just saying that TransformManager shouldn't delete the selected TransformItems if the user is editing a text field and presses the delete key. TransformManager handles this situation correctly when there is only one TransformItem selected (i.e. a character in the text field is deleted), but not when more than one TransformItem is selected. Or are you saying that I should set the allowDelete property to false on each text field's focusIn event and reset it to true on focusOut? Thanks. Ben
  3. I just noticed that if I select more than one text field, then click in one of the text fields to edit it, the text caret blinks as it should, but when I press the delete key, instead of deleting a character, both of the text fields are deleted. Is this a bug or am I missing something? Thanks. Ben
  4. To anyone else that runs into this, the workaround I've come to is to use an event listener for the text field's Event.CHANGE then in that handler add an event listener for Event.EXIT_FRAME. In the exit frame handler, the TransformManager selection controls can be updated (since by that time the text field has auto resized itself to its new text content). Although calling updateSelection on the TransformManager seems to work at first, when you click and drag a handle to resize the text field, the size jumps to a different size. So instead, I ask the TransformManager to deselect its selection and then re-select it. The Event.EXIT_FRAME handler then removes itself as a listener so that it is only called once. Not pretty, but it seems to work. Let me know if someone has a cleaner solution. Ben
  5. Thanks for the reply. Yes, I see both the operating system's default pointer cursor and TransformManager's cursor (see attached screenshot). Although I just noticed at some point the operating system's default cursor did disappear -- I think after I switched web browser tabs and then came back to the demo. If I reload the demo, both appear. Switch tabs and come back and only TransformManager's cursor appears. Strange. That's in Safari. In Firefox, I've only seen the demo with both cursors.
  6. I have a TLFTextField with autoSize set to TextFieldAutoSize.LEFT so when text is entered I need to have TransformManager update the selection rectangle and handles to the TLFTextField's new size. I tried adding an event listener to the TLFTextField for Event.CHANGE and then in the function calling updateSelection on the TransformManager. It seems to somewhat work in that the selection rectangle is sized for the TLFTextField's previous value. So for example, typing A, then B, then C, would cause the selection to be sized for "AB" instead of "ABC". So I'm guessing I need to adjust the order of when I call updateSelection to be later somehow, i.e. after the TLFTextField has resized itself (e.g. by perhaps listening for a different event). Has anyone figured out a solution for this? Thanks. Ben
  7. I noticed that when I use customizeMoveCursor to hide the mouse, the mouse does indeed hide when opening the SWF within Flash but if I view the SWF in a browser then the mouse is not hidden. I'm on a Mac. I've tried on Firefox and Safari. Both have the same result. I'm not sure if it matters but I'm embedding the SWF with SWFObject. TransformManager.customizeMoveCursor(null, true, 0, 0); Also, I just noticed that the same behavior occurs with the demo at http://www.greensock.com/transformmanageras3/ for me. Although, I'm not sure if the mouse is suppose to be hidden in the demo. Does anyone know a solution for this? Thanks. Ben