Jump to content
GreenSock

vincent

Flex 4.5 and transforming textarea

Moderator Tag

Recommended Posts

Hi all,

 

I have a little problem with Flex 4.5 (4.5.0.19786) and the spark.components.TextArea.

 

Here is the simple code :

 




 

And the result output :

post-1919-133152002212_thumb.jpg

 

Do you have an idea ?

 

Thanks

Link to comment
Share on other sites

  • 2 weeks later...

I'm a little confused - according to Adobe, Flash Builder 4.5 isn't out yet. Maybe they've still got some bugs in the beta you're using?

 

I just tried this in Flash Builder 4 and it worked fine:

			   xmlns:s="library://ns.adobe.com/flex/spark" 
		   xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" creationComplete="init()">
<br>		import com.greensock.transform.*;<br><br>		private function init(event:Event=null):void {<br>			var tm:TransformManager = new TransformManager();<br>			tm.addItem(test2, TransformManager.SCALE_WIDTH_AND_HEIGHT);<br>		}<br>




 

Also keep in mind that Adobe has had bugs in their Flex framework that caused getBounds() problems if your container had a border on it (the thicker the border, the further off the getBounds() results were). Maybe you've got a thick border on your container?

Link to comment
Share on other sites

  • 3 weeks later...

Yep, that's yet another bug/inconsistency in the Flex framework. Unbelievable. Here's how you can verify it:

 

			   xmlns:s="library://ns.adobe.com/flex/spark"
		   xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" creationComplete="init()">
<br>		private function init(event:Event=null):void {<br>			var bounds:Rectangle = test2.getBounds(test2);<br>			trace(bounds); //reports (x=-18, y=-18, w=206, h=169)<br>		}<br>




 

The TextArea's bounds are reported as starting at local coordinates of -18,-18 instead of 0,0! I'll try to get in contact with Adobe to report this and I'd encourage you to do the same. Again, this isn't a problem with TransformManager - it's a Flex framework problem.

Link to comment
Share on other sites

  • 8 months later...

Hello is there a recommended workaround for this? I'm using Flex 4.6 and getting the same problem.

 

According to Adobe: "Use of the low-level getBounds is not recommended in UIComponents. It will factor in hidden display objects."

http://forums.adobe.com/message/4146856

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×