Jump to content
Search Community

Transform Manager Not Workding dynamically-loaded MC

balaganesh test
Moderator Tag

Recommended Posts



Transform manager is working fine when the Static MovieClip. If I am created dynamic movice and apply Transform Manager, I am phase issues. I will explain what i did,


1. I have one outer movieClip in the name of "outer"


2. Inside that i need to load multiple art and each art i need to apply transform manager


3. So, I created emptyMovieClip each time when user click the add Art button.


4. And I load the particular art to that movieClip.


5. After I apply the Transform manager using AddItem.


6. First Item loaded and applied the Transform Manager successfully. I move the art little bit and i click add art button. so, it loaded second art


7. Second art also have the Transform manager. But if i selected the first art the transform Manager not working.


Following code i used. "btn_mc" and "btn_mc1" are two button.


   import gs.TransformManager;
   import gs.TransformItem;
   import gs.TransformEvent;

   var TmanagerObj =  new TransformManager();

   var i = 120;

   function createArt(clpurl:String) {

      var mcNama = "itemHolder" + i;

      var adjustLoader = _root.outer.createEmptyMovieClip("itemHolder" + i, i);

      var empty_mc = adjustLoader.createEmptyMovieClip("front_art_mc" + i, i);      

      mcLoader = new MovieClipLoader();
      mcLoaderListener = new Object(); // Object initialization   

      mcLoaderListener.onLoadInit = function (targetMC:MovieClip) {   
         var wd:Number = (targetMC._width/2);
         var hg:Number = (targetMC._height/2);

         targetMC._width = wd;
         targetMC._height = hg;


      mcLoader.loadClip(clpurl, empty_mc);

   btn_mc.onRelease = function () {

   btn_mc1.onRelease = function () {


But if i create the emptyMovieClip in root is working perfectly. Just replace this two line it will working perfectly.


    Replace "var adjustLoader = _root.outer.createEmptyMovieClip("itemHolder" + i, i);"  To  "var adjustLoader = _root.createEmptyMovieClip("itemHolder" + i, i);"
    Replace "TmanagerObj.addItem(outer[mcNama]);"  To "TmanagerObj.addItem(_root[mcNama]);"


I not able to fine the where is the problem in my code.




Please Help Me.

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