Jump to content
GreenSock

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

Temporarily disable transformmanager (AS2) [SOLVED]

Recommended Posts

Hello,

I'm curious if there is a way to temporarily disable all of the Transform Manager event listeners with a button click. I am developing a tool that combines Transform Manager with pan and zoom ability. Everything is working great except when attempting to zoom over a "managed" item, the onPress is activating the item instead of calling my other function. I would like to be able to activate/deactivate on the fly.

 

Thanks for the great class!!!

Link to comment
Share on other sites

You should be able to simply set the "enabled" property to false on the TransformManager instance (or any individual TransformItem).

 

Is that what you were looking for?

Link to comment
Share on other sites

Right now, I have a button that activates a draggable magnifying glass which replaces the cursor.

 

When the magnifying glass is clicked (onPress), the clip containing all Transform Manager items zooms in. When released, the clip returns to its original size.

 

Ideally, when the magnifying glass is activated, Transform Manager would disable. TM would then reenable when the magnifying glass is deactivated.

 

Thanks again.

Link to comment
Share on other sites

Did you still have a question? Did my answer address your concern? Again, you should be able to disable TransformManager stuff by setting the enabled property to false.

Link to comment
Share on other sites

Wow, you're quick!!!

 

I guess my problem is that I do not know how to set enabled property to false for all items on stage. Do I need to loop through an array of instance names?

 

A snippet of "enabled = false" code would help greatly.

 

Once I go online, I'll shoot you the URL. I'm sure you'll think it's an interesting use of your class.

Link to comment
Share on other sites

var myManager = new TransformManager({targetObjects:[mc1, mc2]});

//then to disable...

myManager.enabled = false;

Link to comment
Share on other sites

Thanks a million for the simple solution. Must have been a bad day for me.

 

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