jivory

Bounds acting different from 1.952 to 1.9667 ?

Recommended Posts

I recently updated my Transformer files, and noticed a different behavior I don't see mentioned in the change log.

 

I have a parent object, with the size of 100% width and height, going to the size of the user's browser. So it's around 1000x800 roughly.

There are other objects (images) added within this parent, that the FlexTransformManager are added onto. We set the bounds to be (-2000,-2000,6000,6000). The reason for this is so the images can be scaled quite large, and parts of the image are allowed to be scaled and dragged 'off stage'.

 

With the recent update (or one since 1.952), the Transformer will no allow the images to be scaled beyond the bounds of the parent object, even though the bounds are set to a larger number.

 

Is this new intended functionality, or a way I can remove this new default feature? It seems the items are now ignoring the bounds I give them, and constraining to the size of the parent.

 

Thanks,

Share this post


Link to post
Share on other sites

Sorry about that - there was an adjustment that needed to be made to allow those bounds in FlexTransformManager. The fix has been applied in the latest version which you can download from your GreenSock account at https://www.greensock.com/account/

Share this post


Link to post
Share on other sites

I downloaded the latest version, but it still has the same behavior of constraining to the parent's size and not the bounds given.

 

I notice the FlexTransformManager.as has a modified date of 9/15 but the version still says VERSION: 1.9663 as well, so maybe it's not updated?

Share this post


Link to post
Share on other sites

That's the correct version. Hm. I tested it on my end and it seemed to work fine - can you post a very simple file (MXML or Flash Builder project) that I can publish on my end to see it not working?

Share this post


Link to post
Share on other sites

I couldn't see how to attach the project, but here's the MXML of a simple project I just made.

 

<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
  xmlns:s="library://ns.adobe.com/flex/spark"
  xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" creationComplete="complete()">
<fx:Declarations>
 <!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<fx:Script>
 <![CDATA[
  import com.greensock.transform.FlexTransformManager

  [Embed(source="blacky.png")]
  [bindable]
  private var img:Class;

  private var tm:FlexTransformManager;

  private function complete():void{
tm = new FlexTransformManager();
tm.width = 500;
tm.height = 500;
tm.bounds = new Rectangle(-2000,-2000,6000,6000);
tm.addItem(myImg);
addElement(tm);
  }
 ]]>
</fx:Script>
<s:Image id="myImg" width="100" height="100" source="{img}"/>
</s:Application>

 

As you can see, the FlexTransformManager is set to 500x500, but the bounds are way beyond that. Which would allow the TransformItems to be scaled and moved offscreen outside this 500x500 area, but it remains constrained within.

 

And just to confirm:

FlexTransformManager - VERSION: 1.9663

TransformItem - VERSION: 1.9667

TransformManager - VERSION: 1.9668

 

Just to make sure I'm using the most recent versions :P

 

Thanks!

Share this post


Link to post
Share on other sites

Ah yes - you're creating the instance differently than in my tests. Thanks for providing the code. It should be resolved in the latest version (1.96681). Please download it from your account at https://www.greensock.com/account/ and give it a shot. Sorry about the confusion.

Share this post


Link to post
Share on other sites

Perfect, just like it's intended!

Thanks again for an awesome product and great support on these issues!

Always appreciated.

  • Like 1

Share this post


Link to post
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.