Jump to content
GreenSock

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

When I select the mc, the mc appear in other x,y

Recommended Posts

Hi all,

I'm a newbie and love to use this class very much.and I used the code as the following:

 

 


my_mc.attachMovie("jonny", "blue"+count, 10000+count);

import gs.TransformManager;

var manager_obj = new TransformManager({targetObjects:[my_mc], bounds:{xMin:0, xMax:1024, yMin:1, yMax:768}, forceSelectionToFront:true, eventHandler:onAnyEvent , allowDelete:true});
manager_obj.addEventListener("move", onMove);


function onAnyEvent(event_obj:Object):Void
{
trace("Action: "+event_obj.action+", MovieClip or TextField: "+event_obj.targetObject+", transformed?: "+event_obj.transformed);
}

function onMove(event_obj:Object):Void 
{
trace("Moved mc: "+event_obj.targetObject);
}

 

 

The main problem is , When I select the mc , the selected mc appear at the near of the stage bottom.Is it because of the used with attachMovie? or is there any control code for _x and _y (I do try the bounds:{xMin:0, xMax:1024, yMin:1, yMax:768} but it doesn't work.)?Please kindly help me and I will wait any reply.thanks in advance. :)

Link to comment
Share on other sites

When you attachMovie() clips, they are always attached at _x:0 and _y:0 according to the registration point of their parent. In this case, if your my_mc MovieClip is offset from the origin of the stage, so will its child clip that you just attached. Make sense?

Link to comment
Share on other sites

Thanks a lot greensock admin.So could I need to physically place a mc on stage and then will attach in that one? I'm so dumb and if not like that please kindly advice me ,thank you so much for your precious time.and I will try now. thanks :)

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