• Content count

  • Joined

  • Last visited

Community Reputation

3 Newbie

About BernalCarlos

  • Rank
    Advanced Member
  • Birthday 12/29/1986

Profile Information

  • Gender
  • Location
    Bogotá, Colombia.
  1. Great, it works. Sorry for the dumb question and thank you very much for your help.
  2. ooo I see, sorry for sugesting that it could be bug. But, can is use minWidth and minScale at the same time?, I cant try it rigth now. Thank you Jack.
  3. Hello, i have already asked this question in the following thread: The solution was to set the minScaleX and minScaleY to 0 and that worked, but now I need to constrain the width and height of a transformItem, not the scale. So, i used the minWidth and minHeight properties of the item. At the beginning its seemed to work, however if I keep scaling beyond the min values, the item will eventually jump to negative scale values. I think its a bug but i don't know, any help will be greatly appreciated. Here a .fla that shows the problem: Thank you.
  4. BernalCarlos

    Remove TransformManager Custom Cursor

    Just exactly what i need. Thank you jack.
  5. Hi, I have a Sprite with a button in the center. The sprite can be transformed, but when the mouse is over the button the cursor stays in its default TransformManager move cursor. So, to keep the default "button" cursor (the one with the hand and the finger) when the mouse is over the button., i did the following: _uploadPhotoHereMessageMc.addPhoto_btn.addEventListener(MouseEvent.MOUSE_OVER, showButtonCursor, false, 0, true); private function showButtonCursor(evt: Event): void { if(_transManager.isShowingCustomCursor) TransformManager.customizeMoveCursor(new Shape(), false, 0, 0); } However, i'm getting a null pointer exception from the TransforManager: StackTrace: TypeError: Error #1009: No se puede acceder a una propiedad o a un método de una referencia a un objeto nulo. at com.greensock.transform::TransformManager/snapCursor()[D:\datos\CarlosB\Documentos\Dropbox\PlasticoLab\Pixote2\PhotobookMaker\com\greensock\transform\] "No se puede acceder a una propiedad o a un método de una referencia a un objeto nulo" -> means null pointer in Spanish. Is there a better way to do this?
  6. BernalCarlos

    Colorpicker Component and TransformManager

    Hi, Here's what i did in code: //First, create the backgorund sprite for the color picker _colorPickerBackground = new Sprite(); var g:Graphics =; g.beginFill(0x000000, 0.3); g.drawRect(0, 0, 217, 177); //I found the dimensions by trial and error g.endFill(); //Second, add the event listener to the color picker //My color picker is inside the _textEditor movieclip, but this is not necessary. _textEditor.colorPicker_cp.addEventListener(Event.OPEN, onColorPickerEnter, false, 0, true); _textEditor.colorPicker_cp.addEventListener(Event.CLOSE, onColorPickerClose, false, 0, true); //Third, create the listener functions private function onColorPickerEnter(evt: Event): void{ //Set the background x and y position _colorPickerBackground.x = _textEditor.x + _textEditor.colorPicker_cp.x + _textEditor.colorPicker_cp.width; _colorPickerBackground.y = _textEditor.y + _textEditor.colorPicker_cp.y; //Add the background to the ignore list _transManager.addIgnoredObject(_colorPickerBackground); //Finally, add the background behind the color picker. In my case, behind the _textEditor _mainStage.addChildAt(_colorPickerBackground, _mainStage.getChildIndex(_textEditor)); } private function onColorPickerClose(evt: Event): void{ //Remove the backgorund _mainStage.removeChild(_colorPickerBackground); _transManager.removeIgnoredObject(_colorPickerBackground); _colorPickerBackground = null } Hope it helps you.
  7. BernalCarlos

    Colorpicker Component and TransformManager

    Hi, sorry for the late answer i've been buysy. I'll try to post the snipet tomorrow.
  8. BernalCarlos

    Colorpicker Component and TransformManager

    Found a not so tricky Solution! For some reason if you set a sprite behind the color picker, and add that background to the ignore objects, everything will work fine. So all you have to do is to listen for OPEN and CLOSE events on the Colorpicker, and when the Colorpicker is opened just dynamically create a background sprite for it, add it to the stage, add it to the ignore Objects, and finally on close just remove the background. Hope it help somebody. Thanks Jack.
  9. Hello, Once again here i am asking for help. I'm trying to add the Colorpicker component to the list of ignored objects in the TransfromManager. I read some post on the forum, and Jack suggest to set the autoDeselect property to false, and add a background sprite that handles the deselect click. However, in the current state of my project doing that would involve a LOT of changes and i'm actually tacking advantage of the autoDeselect property. Is there another way i can add the color picker to the ignore objects? Thank you very much.
  10. When i encountered that problem i was working with pure AS3 not Flex, but looking at you your code i think i know whats your problem. This is the code i use to created the textfield: var font: Font = new FuturaStdBold(); _textFormat = new TextFormat(); _textFormat.size = DEFAULT_TEXT_SIZE; _textFormat.align = DEFAULT_TEXT_ALIGN; _textFormat.font = font.fontName; _textField = new TextField(); _textField.width = DEFAULT_TEXT_WIDTH; _textField.height = DEFAULT_TEXT_HEIGHT; _textField.x = (_container.width - _textField.width) / 2; _textField.y = (_container.height - _textField.height) / 2; _textField.type = "input"; _textField.multiline = true; _textField.embedFonts = true; Pay special attention to the part: _textField.embedFonts = true; the 'embedFonts' property had to be true. Hope it helps you.
  11. BernalCarlos

    Transforming Dynamic Text Fields

    Problem solved with the update! Thank you very much Jack.
  12. BernalCarlos

    Transforming Dynamic Text Fields

    In the following link you can find a simple .fla that reproduces the problem. [link removed because it contains TransformManager, a $299 product] Hope it can be of help. Oops, that was stupid lol. here is the .fla without the TransformManager: https://www.dropbox....xtTransform.fla
  13. BernalCarlos

    Transforming Dynamic Text Fields

    I see, but doing some tests, even if i remove the autoSize property, leaving the hasSelectableText to true causes the same problem. Any idea of what may be happening?
  14. Hello, I'm trying to transform a text input field that should resize the text font size when scaling the transform item, and that should resize itself when the user writes text in it. To resize the text field i set the "autoSize" property to true, and to increase the font size i wrapped the text field with a movieclip and then add that to the TransformManager. Here is my code: //create the font format var font: Font = new FuturaStdBold(); _textFormat = new TextFormat(); _textFormat.size = 18; _textFormat.align = "center"; _textFormat.font = font.fontName; //Create the text field _textField = new TextField(); _textField.width = 200; _textField.height = 40; _textField.x = 100; _textField.y = 100; _textField.type = "input"; _textField.multiline = true; _textField.embedFonts = true; _textField.autoSize = TextFieldAutoSize.CENTER; _textField.defaultTextFormat = _textFormat; _textField.text = "Ingresa tu texto aquí..."; _textField.addEventListener(Event.CHANGE, keyStroked, false, 0, true);[/font] [font=arial, helvetica, sans-serif]//[/font][font=arial, helvetica, sans-serif]_mcConte is the wrapper for the text field[/font] [font=arial, helvetica, sans-serif]_mcConte.addChild(_textField); //add the item to the stage _container.addChild(_mcConte); //add the item to the transformManager _transItem = _transManager.addItem(_mcConte); _transItem.hasSelectableText = true;[/font] The resize of the text field works fine, however the scaling does not. When i try to scale the item and it has some rotation, the text field gets out of the transformManager Box, but if i set "hasSelectableText" to false, then the scaling works but i cant input text. Any help would be greatly appreciated. I attached some screenshots of the problem.
  15. BernalCarlos

    Text Disappears

    Just solve it, forgot to add textField.embedFonts = true; . Thank you for your help.