Jump to content
GreenSock

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

Help getting started [SOLVED - kinda]

Recommended Posts

So I just purchased the Transform Manager class and am having trouble getting it to work. What I am doing is loading images from xml and putting them in a MC. The MC I am putting the loaded images in is held in a loaded .swf from there the user can click left and right to load new images. When the user decides they want to use an Item they click on it. That click moves the item from the MC in the loaded swf to an MC in another loaded swf. I do this by the addChild method. Everything works great. The only problem I am having is once I move the image to its new location and apply the TransformManager it breaks. No error messages or anything. I just get the arrow cursor on the whole stage and can not transform the item. I have tried manager.addItem(mc); then I add the manager.selectedItem(mc); line. Now when the image moves to its new location I can see the bounding box and everything looks fine. Once I select the bounding box it just breaks and no transform happens.

 

That is the basics of the problem. What I am wondering is if I add the item to a loaded swf that has a mask over it will that break the transform manager? Can you even do this?

 

here is kinda what I am doing...

 

var manager:TransformManager = new TransformManager();

var mc:MovieClip;

 

// load the xml

// load the image and place in a loaded swf MC holder.

 

image1_mc.addEventListener(MouseEvent.CLICK, image1Click)

function image1Click(event:MouseEvent):void

{

loadedSWF.mc.removeChild(image1_mc);

newLoadedSWF.mc.addChild(image1_mc);

manager.addItem(image1_mc);

manager.selectedItem(image1_mc);

}

 

Like I said this will do what I want and show the bounding box, but when you click on the image1_mc movieclip it gives the arrow cursor on the whole screen and will not transform anything. no error messages or anything. I must be doing something wrong. Hope this makes sense. :)

Link to comment
Share on other sites

Hm, it's tough to say without seeing your file and being able to poke around a bit. You're not using the same TransformManager instance to manage clips in multiple containers, right? Keep in mind that items in a particular TransformManager instance must all share the same parent (although you're welcome to create as many TransformManager instances as you want). You should not be changing an object's parent while it's being managed by TransformManager either.

 

If you're still having trouble, please post an example that demonstrates the issue (don't post the GreenSock code - just your FLA and any supporting files). It doesn't need to be your production file - it can be something super simple as long as it demonstrates the problem.

Link to comment
Share on other sites

Thanks for the reply. I was able to get it to work by moving all the elements I needed from the loaded .swf to my main .swf. Did the same exact thing except for calling to the .swf I now call to the stage. Works Perfect, but kinda defeats the purpose of loading in .swf files.

 

Overall though I LOVE this class. Great Work :D

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