Jump to content
Search Community

Selection Box does not update to actual size?

FlashRockStar test
Moderator Tag

Recommended Posts



first i would like t say that i am really happy with this great class! But right now i have a big problem to solve. Of course i use your Transformmanager for my project. I load an external SWF file with 2 Movieclips inside in my main SWF File. I can select the SWF that i loaded in my main SWF and i can Scale, Rotate and change the size, everything works fine until here ;)


But here comes the Problem, as i told you in the SWF that i transform are 2 different MovieClips with 2 different instance names. Now i must change the distance between these 2 MoVieclips, and that works fine with a scrollbar that i made for that. this works fine, but when i change the distance the selection box from your Transformmangager does not update, the size of the selection box stay the same. And even the Movieclips can go over the bounds that i have set.


It would be really nice if someone could help me to solve this problem!!! Maybe there is a way to update the selection box size even if i use my own slider?


Thank You!!!

Link to comment
Share on other sites



i found a way to update the selection box size :) When i insert this in my EnterFrame Method:




Than the selection box updates automaticaly, but there is one more problem! The Boundaries are getting still ignored. Is there a way to update the boundarys the same as the selection box size? I mentioned that when i unselect the item and select it again while the item in over the boundaries that the item goes back in the boundaries very fast, i think that everytime someone clicks the item that in the boundaries funktion the new size is set and that the funktion detects that the item is not inside the boundaries and jumps back inside, but i can be wrong ;)


I only need to find a solution that this can not be happen anymore, thank you!

Link to comment
Share on other sites

Glad you found updateSelection().


If you want to force a particular target object to fit into bounds and you're making changes manually to that target object, you could use the associated TransformItem's fitInsideBounds() method. Rememeber, every target object that a TransformManager is managing has an associated TransformItem which you can get using the getItem() method (or you can just store it when you addItem()). Like:


var item:TransformItem = myManager.getItem(myTargetObject);
...do stuff...


Does that help?

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