Jump to content

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

GreenSock last won the day on July 24 2019

GreenSock had the most liked content!


  • Posts

  • Joined

  • Last visited

  • Days Won


Everything posted by GreenSock

  1. It that situation, I'd recommend setting autoDeselect to false, and then put a Sprite below your objects (it could have an alpha of zero so it's essentially invisible) and use a CLICK or MOUSE_DOWN listener on that Sprite to call a function that calls deselectAll() on your TransformManager. That way, the only time things get deselected is when you click on the "background" (that Sprite). Make sense?
  2. Right. It looks like you're violating the _parent rule. Every time fAddEmoticon() gets called, you're creating a MovieClip within another MovieClip and adding that nested MovieClip to TransformManager, so every one of them will have a different parent. See what I mean? Maybe try adding __reg3 instead of __reg2.
  3. I'd need to see the rest of your code to know what the problem is for sure. Keep in mind that I believe the TransformItems must share the same _parent which is where the selection handles will be drawn, etc. So if you're nesting your MovieClips in ways that don't conform to that, you'll likely run into trouble.
  4. Yes, that's expected behavior - TransformManager dispatches SELECTION_CHANGE events whereas TransformItems dispatch SELECT events. If you want to listen for when theSprite gets selected, you can set up a listener on the corresponding TransformItem, like this: var myItem:TransformItem = manager.getItem(theSprite); myItem.addEventListener(TransformEvent.SELECT, onSelectClip1); Make sense?
  5. What exactly were you looking to accomplish? You should be able to use TweenMax with virtually any class.
  6. Yeah, sorry, but you'll need to do the math when you load the new image to figure out what the scale needs to be in order to fit the width/height you need. Something like newScaleX = oldWidth / newWidth and newScaleY = oldHeight / newHeight
  7. Great catch! Sorry about that. I just fixed it and released an update. You should have already received an e-mail about it by now. Jack
  8. Sorry, I'm absolutely SWAMPED with work right now. Stayed up 'til about 4am the last 5 nights working. I may have to stay up all night tonight too, so I just can't afford the time to write the code for you. But I can assure you, it's very possible to dynamically load images and use them with TransformManager. If anyone else wants to chime in and help out, great.
  9. I assume you're using the AS2 version, right? Here's an excerpt from the FAQ section of the blog: Does that help?
  10. Sip the coffee....let the caffeine kick in.... Feeling better? Okay, good question. addItem() returns a TransformItem, so you can just use that to add the min/max scale, like so: var myItem:TransformItem = myManager.addItem(myDisplayObject); myItem.setScaleConstraints(0.5, 1, 0.5, 1); //or set them directly if you don't want to use the setScaleConstraints(); myItem.minScaleX = 0.5; myItem.maxScaleX = 1; myItem.minScaleY = 0.5; myItem.maxScaleY = 1; You can also get the TransformItem associated with your DisplayObject anytime using the getItem() method, like: var myItem:TransformItem = myManager.getItem(myDisplayObject); (that assumes you've already used the addItem() at some point to add the DisplayObject to the TransformManager instance) Does that clear things up?
  11. 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?
  12. Yeah, sorry, but I'm absolutely swamped with work and have several deadlines I'm working against, so I don't have time to troubleshoot your FLA, especially since it sounds like the problem is unrelated to TransformManager. Maybe someone else on the forum can help out, though, so feel free to post your FLA. But do NOT post the TransformManager class files! (it would violate the EULA) Good luck!
  13. TransformManager doesn't interfere with text formatting at all. If you're not able to apply text formatting, it must have to do with something else in your code.
  14. You have several options for preventing the selected object from being deselected. You could have TransformManager ignore particular DisplayObjects (like your form elements) using the addIgnoredObject() method, or try this: 1. Set autoDeselect to false 2. Add a background Sprite (it could have a transparent fill so that it's invisible but still clickable) 3. Add an Event.CLICK listener to that background Sprite that calls your TransformManager’s deselectAll() function. Does that answer your question?
  15. Wish granted. I just added the ability to set minScaleX, maxScaleX, minScaleY, and maxScaleY properties to TransformItem instances in version 1.2. You should have received an e-mail about the update with instructions about how to get it this morning. Enjoy!
  16. What do you mean "purge"? You can removeAllItems() from a TransformManager instance, but that does NOT remove the DislayObjects from the stage - it just releases them from TransformManager's control. If you want to delete them all and remove them from TransformManager's control, you could do something like: myManager.selectItems(myManager.items); myManager.deleteSelection(); myManager.removeAllItems(); Note: You'll need at least version 1.2 of TransformManager to get access to the deleteSelection() function (released today)
  17. You're using the AS3 version of TransformManger, right? You mentioned the display list, so I assume so. As stated in the documentation and on the blog, all of the items that a particular TransformManager is managing must share the same parent. It's a long explanation as to why. But if you want to reparent things, you could create a new TransformManager instance to manage that reparented clip.
  18. You'll see a bigger and bigger difference as the value increases. So try skewing to 80 degrees or something. It should be very obvious at that point.
  19. No problem. There's an explanation at the top of the class file: I'd recommend trying 'em both and you should see the difference immediately. There's an interactive tool at http://blog.greensock.com/transformmatrixproxy/ Does that answer your question?
  20. 1) The __dummyBox_mc isn't necessarily always at depth 1. It just gets added to the top of the display list when TransformManager is instantiated. And it doesn't necessarily stay at the same depth either because if you have the forceSelectionToFront set to true, it'll adjust the depths as you select things. So if one of your items is below it, the depth will be changed when you select that item as it comes to the top of the display list. 2) The targetObjects Array isn't always re-sorted to reflect the display list z-sorting - that would degrade performance slightly and it's usually not required. If your application requires the Array to be sorted in a particular way, you'll need to do that sorting. If you have any trouble with it, let me know. It should be relatively easy to do.
  21. You're right - TransformManager actually adds 2 Sprites to the container. One is always invisible (I call it "_dummyBox" in the class and the sprite name is "__dummyBox_mc"), and the other is the actual selection handles/box. The depth of _dummyBox doesn't matter, but the selection Sprite ( named "__selection_mc") is always brought to the very top of the display list of that container when something is selected. That's pretty important actually - otherwise your selection handles might be behind other objects. Does that clear things up for you?
  22. Sounds like your overlay doesn't share the same parent as the image underneath. Is that right? TransformManager always makes sure the selection handles are on the top-most level in the display list of its container, but it cannot make itself jump outside that container into another one. Is there any way you can make sure both objects share the same container (FlexTransformManager in this case)? If you do that, it should work fine. And yes, just add that overlay as an ignoredObject.
  23. You're absolutely right. But I have good news. I just sent out an update a few minutes ago that adds a new "ignoredObjects" property and "addIgnoredObject()" and "removeIgnoredObject()" methods that allow you to simply tell TransformManager to ignore clicks on particular DisplayObjects (like buttons, form elements, etc.). That should make it pretty easy to accomplish what you're after. Enjoy!
  24. Yeah, Flash will allow you (in some cases) to load external images from another domain, but it will refuse to allow for any kind of BitmapData manipulation or filters or...I think...rotation of those images. And smoothing is always turned off. So the solution would be to make sure you've got a crossdomain.xml file installed on that server that's hosting your external images. And you may also need to set the checkPolicyFile property of your MovieClipLoader to true because of a security "enhancement" [cough] in Flash Player 9 (even if you're not targeting Flash Player 9 in your publish settings). Let us know if that helps.
  25. var myManager = new TransformManager({targetObjects:[mc1, mc2]}); //then to disable... myManager.enabled = false;