Jump to content


  • Posts

  • Joined

  • Last visited

rob.roberts's Achievements



  1. I've tried this using a movieClip as well, but to no avail. I can live without the flipping--I just have to create 4 times as many movieClip objects. One thing that I think is not working correctly is the scaling. When I have SCALE_WIDTH_AND_HEIGHT set to true, I would expect the embedded text object to increase its height and width property, but leave the font size the same as that which is set in TextFormat.size. It doesn't do that. Instead, it scales the text up at the same rate as the movieClip object (I would expect scaling using scale_x and scale_y.) Is this a bug or is there a setting I am missing? Object created as an oval, then converted to movieClip symbol. Oval exists on layer1, textField created on layer2 with a different font embedded (others are embedded in the application.)
  2. I am attempting to create speech balloons for an application that contain editable text. I understand that textfields are controlled differently by TransformManager if the flag hasSelectableText is set to true (basically the only way you can edit the text if TransformManager is used on an input or dynamic text field.) I have now embedded my text field into a movieClip (trying a sprite next) so that I can still flip the graphic, but have the text remain the same. Not working obviously or I wouldn't be posting here. The purpose of wrapping it is not only to allow the balloon to flip, but also to help with deleting the object (which hasSelectableText prevents as well.) Below is the creation of the object (basically the oval graphic with the speech tab/tic and a textField on the layer above it; created as a movieClip symbol called roundSpeech. Fonts are embedded in the application (thus the use of myComic for Comic Sans.) function addTextItem(evt:Event):void { var itemObj:Object = new Object; var tmpTextFormat:TextFormat = new TextFormat(); ++textNumber; textFieldNames[textNumber] = new roundSpeech(); tmpTextFormat.font = myComic.fontName; tmpTextFormat.color = 0x000000; tmpTextFormat.size = 48; textFieldNames[textNumber].txtSpeech.text = "edit this text"; textFieldNames[textNumber].width = 300; textFieldNames[textNumber].height = 200; textFieldNames[textNumber].x = 400; textFieldNames[textNumber].y = 300; textFieldNames[textNumber].txtSpeech.autoSize = TextFieldAutoSize.LEFT; textFieldNames[textNumber].txtSpeech.type = TextFieldType.INPUT; textFieldNames[textNumber].txtSpeech.wordWrap = true; textFieldNames[textNumber].txtSpeech.multiline= true; textFieldNames[textNumber].txtSpeech.embedFonts = true; picStage1.addChild(textFieldNames[textNumber]); manager.addItem(textFieldNames[textNumber],TransformManager.SCALE_WIDTH_AND_HEIGHT,true); textFieldNames[textNumber].txtSpeech.setTextFormat(tmpTextFormat); manager.selectItem(textFieldNames[textNumber]); } Any help appreciated. Others on the forum have posted about embedding a text object in a sprite or movieClip, which is what drove me down this avenue.
  3. That is actually what I wound up doing (and had it on my list to update this entry later today.) Now we're "cooking with gas". BTW, a tip for those who are doing a bitmap.draw of items managed by TransformManager: Issue a _manager.deselectAll(); before doing the draw or you may get the handles in your drawing (assuming that your TransformManager instance is called _manager)
  4. I am attempting to use LayerUp and LayerDown and flipV and flipH buttons in my application (see below). A TransformManager object item is selected, but will not respond to the button push. var manager:TransformManager = new TransformManager({targetObjects:[], bounds:new Rectangle(PICSTAGE_OFFSETX, PICSTAGE_OFFSETY, stageWidth, stageHeight), allowDelete:true}); manager.addItem(image); fliph_btn.addEventListener(MouseEvent.CLICK,manager.flipSelectionHorizontal); flipv_btn.addEventListener(MouseEvent.CLICK,manager.flipSelectionVertical); imgLayerUp_btn.addEventListener(MouseEvent.CLICK,manager.moveSelectionDepthUp); imgLayerDown_btn.addEventListener(MouseEvent.CLICK,manager.moveSelectionDepthDown); The buttons have been added to the manager as IgnoredObjects using manager.addIgnoredObject. I have also added another item to the stage and manager to test both the flip and moveup/movedown functions, but the action does nothing on either display object.
  5. Jed: So you're saying that I can still add my objects to the stage (or other display object) AND use TransformManager.addItem for these graphics to be managed by TM? I hadn't thought about it that way, as members of 2 different "collections." I honestly thought if I did it that way, the image would logically show up twice. I currently add my items to a movie clip that is masked and manage each object's rotation, scale, etc. through my own events. When the user saves, I dump the movieclip to a bitmap object and save as a jpg. It sounds like you are saying I can still do that, but add the items to the transform manager to handle the rotation, etc. That would be ideal.
  6. But since nothing is on the stage or a child of another DisplayObject, I was trying to figure out how to BitmapData.draw() my stack from the top view (basically I expect to have 15-20 objects stacked in my TransformManager instance, at various angles of rotation and placement.) I want to draw what I seen in my "masked" screen view without drawing my screen objects, which I currently do by using BitmapData.draw on my picStage1 object (a movieClip holding everything else.) I'll have to experiment with simpler examples first and re-code by process using TransformManager. Thanks. If anybody has an example, I'd love to see how you are doing it.
  7. No. I was talking about a drag flip, which constrained also reverses the Y values on a flipH and the X values on a flipV. Since I was trying to build a context menu for an object that is active with the flipH, flipV functionality now anyway, I'll try calling those methods (which should work on anything but text fields if I read the docs correctly.)
  8. I am currently replacing my own image rotate and scale functions with TransformManager. My application adds items to layers which are in turn children of a custom, masked stage. Since they must now be children of the TransformManager, how exactly would I convert the current view of the TransformManager to a bitmap since it's not a movieClip? I current perform an imageData.draw using the movieClip picStage to dump all its view data to a jpg image. Thanks. Rob Roberts
  9. From what I've seen, a true FlipH and FlipV with constraining is impossible without overriding the TransformManager code--is that correct? I'm already adding a separate function call to handle the layers--move to top, move up, move down, move to bottom--but was hoping to avoid the right-click menu for the flipping. Has anyone done this successfully without creating a new object that inherits TransformManager? Thanks. Rob Roberts