Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...

pwhite20

Members
  • Posts

    2
  • Joined

  • Last visited

pwhite20's Achievements

0

Reputation

  1. Never fails. Solve your own problems just after posting on the message boards. Anyway, decided to leave up and post the solution in case it's of use to anybody else. What I was missing was the fact that width and height properties don't get set in Flex until AFTER the the objects are written out to the canvas. The TransformItem has default width and height parameters (both set to 100), but nothing useful for performing the necessary calculations for scaling until they get overridden with the correct values later on. The solution was to add an eventListener to watch for the creation of the new object, THEN grab the original width and height to calculate the scaling that the new object needed to be set to. <?xml version="1.0" encoding="utf-8"?>
  2. I'm having a problem that maybe someone can help with. I have a text field which users can enter text into, and when hitting the "Add Text" button it gets dynamically added to the FlexTransformManager. This works great with short lines of text, but when a long line of text gets entered that extends the Text object's size beyond the bounds of the TransformManager I run into a problem. It allows it to be added, but once the user selects it, it scales itself down to a size that is about 80% of the TransformManager's width and jumps both the x and y coordinates to some random position down and to the right. Idealy I would like to avoid the scenario above altogether and scale the object down to be within the boundaries at the point that it's added to the TransformManager instead of waiting until the user selects the object. Any ideas on how to accomplish this? <?xml version="1.0" encoding="utf-8"?>
×