Jump to content
Search Community

Dynamic clips

kekekiko test
Moderator Tag

Recommended Posts

I am trying to create an app that allows multiple movieclips to have the ability to be transformed. On a button I have this code:

 

on (release) {

count++;

duplicateMovieClip ("sq", "sq"+count, count);

this["sq"+count]._x = 10;

this["sq"+count]._y = 10;

 

}

 

My question is how can I define the use of the Transform Manager for each new clip? I am using the AS2 free version and have got it working if I assign the transform manager class within each individual movieclip that is going to be copied but then the 'Bring to the front' part of teh code doesn't work.

 

Is there a way of doing something like this:

 

var manager_obj = new TransformManager({targetObjects:[sq+count], bounds:{xMin:0, xMax:550, yMin:0, yMax:365}, forceSelectionToFront:true, eventHandler:onAnyEvent});

manager_obj.addEventListener("move", onMove);

 

 

I have tried this and it doesn't work!

 

thanks

Link to comment
Share on other sites

I don't actively support the very old free AS2 version of TransformManager (it was completely rebuilt from the ground up to add a BUNCH of new features and work more consistently) but if I remember correctly, you should be able to just create on TransformManager instance and then whenever you want to add an item to it, just use the addItem() method. If you want the newer (much improved) version, you can get it at

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.
×
×
  • Create New...