Jump to content
Search Community

GreenSock last won the day on April 21

GreenSock had the most liked content!

GreenSock

Administrators
  • Posts

    23,151
  • Joined

  • Last visited

  • Days Won

    817

Everything posted by GreenSock

  1. 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!
  2. 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)
  3. 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.
  4. 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.
  5. 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?
  6. 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.
  7. 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?
  8. 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.
  9. 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!
  10. 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.
  11. var myManager = new TransformManager({targetObjects:[mc1, mc2]}); //then to disable... myManager.enabled = false;
  12. Did you still have a question? Did my answer address your concern? Again, you should be able to disable TransformManager stuff by setting the enabled property to false.
  13. You should be able to simply set the "enabled" property to false on the TransformManager instance (or any individual TransformItem). Is that what you were looking for?
  14. Actually, that's not entirely true. The speed difference can be very important even with one or two tweens. Imagine two buttons next to each other with Tween-based rollovers. If the user rolls back and forth between them, speed is very important to ensure there's no perceivable lag time in the rollovers/rollouts. I had the exact same thought for quite some time actually. But people kept asking for more advanced features, especially filter and bezier tweening. I brushed 'em off for a while, but eventually they wore me down and I created TweenMax Now it seems to be getting quite popular. I really want to minimize the trade offs developers face when "upgrading" to TweenMax. File size probably doesn't matter that much, but if the speed drops off significantly, it becomes very unattractive. It's a balancing act. I'm not opposed to using GoASAP. I certainly see some benefits, but I also see trade offs which may not be acceptable to the user base. That's why I started this poll in the first place - to see what the consensus was. It seems like speed is extremely important to folks and outweighs the convenience factor of building on top of GoASAP (so far). It may sound easy to just crank out another "GoTweenMax" class, but I've learned the hard way that it's a lot of work to maintain and support. Every time I add a feature to one, I'd need to add it to the other and work within two different frameworks. I'd also need to adjust things as Moses (and others) update the core GoASAP framework which takes even more time and increases the chances of bugs. I'd much prefer to pick a route and go with it as opposed to maintaining and supporting two TweenMax variants. I appreciate all the input guys. I'll keep the poll open for a while more, so encourage your friends to vote.
  15. If you prefer not to use the built-in delete functionality, you can manually do it by removing the DisplayObject (removeChild()) and then call the removeItem() method on the TransformManager for that particular item that you deleted.
  16. It's easy to disable TransformManager from handling DELETE/BACKSPACE stuff - just set the allowDelete property to false. Then you can handle all that stuff manually. I'm not sure you can disable the DELETE key inside TextFields - I've never tried that. Seems like it'd be really frustrating for users though. You sure you want to do that?
  17. Sure, you can add hew MovieClips dynamically. Just don't forget to add them to the TransformManager instance, not just the stage. Also, be SURE you wait until the new MovieClip has FULLY loaded and instantiated, otherwise TransformManager will not be able to measure it correctly. Maybe even wait a few milliseconds after the onLoadInit is called from your MovieClipLoader just to be sure. Use the addItem() to add it to TransformManager.
  18. Every time you call TweenMax.to() or TweenMax.from(), you're actually creating an object. You can keep track of it like this: var myTween:TweenMax = TweenMax.to(my_mc, 2, {x:"300"}); And it starts automatically, but you can always pause() it and resume() later. Or for even more control, use the progress property. For example, to make it skip to half-way through, you can set myTween.progress = 0.5. And if you want to set up a sequence, look into the sequence() and multiSequence() methods. Lots of options
  19. Glad to hear it's workin' for you. As far as deleting TextFields, that's a tricky situation because the user must be able to use their BACKSPACE/DELETE key to interact with the text, so how would you know, for example, if when they hit the DELETE key that they wanted to delete the entire TextField as opposed to just a character inside the TextField? In my opinion, you'd need to create a separate button that the user would click to remove the TextField altogether.
  20. So it's workin' for you now, right? (once you disabled keyboard shortcuts)
  21. Are you just testing it in the authoring environment? Or are you testing it in a browser? Keep in mind that if you want to test that kind of stuff in the authoring environment (test movie), you need to disable keyboard shortcuts. People make that mistake all the time. If you don't do that, Flash intercepts the special keys (like DELETE).
  22. I'm not quite clear on what the problem is. The Array you pass in to the constructor is just for the initial setup - TransformManager doesn't keep track of that Array and see if/when you add anything to it. Think of it as a convenient way to get around having to do a bunch of addItem() calls if you've already got a bunch of items on the stage that you want it to manage. Of course you could use addItems() too which is another convenience. If you're going to add items to the TransformManager after it's instantiated, you need to use the addItem() or addItems() methods. Is that a problem?
  23. Sure. I assume you're talking about the upcoming AS3 version of TransformManager, right? You can dynamically create Sprites and/or MovieClips and add them anytime. Either like this: var manager:TransformManager = new TransformManager({targetObjects:[square1, square2,text]}); or like this: var myTargets:Array = []; //create Sprite here and draw a rectangle with the drawing API, then... myTargets.push(myNewSprite); myTargets.push(myNewMovieClip); var manager:TransformManager = new TransformManager({targetObjects:myTargets}); or like this: var manager:TransformManager = new TransformManager(); manager.addItem(myCustomSprite); manager.addItem(myCustomMovieClip); or even var manager:TransformManager = new TransformManager(); manager.addItems([myCustomSprite, myCustomMovieClip]); Lots of options to choose from And you can remove them anytime with the removeItem() function too. Does that answer your question?
  24. Actually, that has nothing to do with TransformManager - it's just that Flash cannot rotate TextFields that use device fonts. You're using device fonts, right? (like _sans or _serif, etc.) As you can see in the demo, TextField with embedded fonts can rotate without a problem.
  25. That's actually one of the key features in the new AS3 version that I'll be releasing shortly. It was a lot of work to get it working just right. I had to rebuild the entire class from the ground up. You can see an interactive demo of the AS3 version at http://www.greensock.com/ActionScript/T ... nager/AS3/. But sadly, the AS2 version does not have that capability. It would be possible (though time consuming) to port the improved AS3 version back to AS2 as long as you could target Flash Player 8 (because it uses Matrices). If you'd like to hire me to do so, contact me off the forums. But if there's any way you can target AS3 in your project, I'd highly recommend it.
×
×
  • Create New...