Jump to content
GreenSock

ofirpicazo

Set initially selected item

Recommended Posts

Is there a way to tell the manager to initially select one of its targetObjects?

I need one the items inside the FlexTransformManager to be preselected when the application starts. Is this possible?

 

Thx

Link to comment
Share on other sites

Sure, just use the selectedTargetObjects property. It accepts an array, and it would look like this as an attribute of the FlexTransformManager MXML tag:

 

selectedTargetObjects="{[image1]}"

Link to comment
Share on other sites

Thanks for the quick reply, that solution seems to be working fine for Flex 3, but I'm using Flex 4 and it doesn't work.

 

Here's my code:

		   xmlns:s="library://ns.adobe.com/flex/spark" 
		   xmlns:mx="library://ns.adobe.com/flex/mx"
		   xmlns:transform="com.greensock.transform.*"
		   minWidth="955" minHeight="600">

								arrowKeysMove="true" 
								width="500" 
								height="500" 
								allowDelete="true" 
								selectedTargetObjects="{[image1]}" >
			  id="image1" 
			  autoLoad="true" 
			  x="70" 
			  y="100" 
			  rotation="-15" />


 

Is there any other way I can achieve the same effect in Flex 4?

Link to comment
Share on other sites

Yep, Flex 4 apparently changes the way in which child objects are instantiated but I just posted an update to FlexTransformManager that should work around it. The other way it so just use a creationComplete listener for your app that sets your manager's selectedTargetObjects. To get the update, just log into your GreenSock account at https://www.greensock.com/account/

Link to comment
Share on other sites

Thank you very much, I've downloaded the updated version and it works correctly on Flex 4.

 

Cheers

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.
×