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. No, TransformMatrixProxy doesn't bend the corners in like that - it's impossible with straight transform.matrix transformations. In order to accomplish it, you need to do BitmapData manipulation or use a special filter. I did create something that does pretty much exactly what you're looking for, called Simple3D but I never released it to the public. You can see a demo here: http://www.greensock.com/ActionScript/DistortedView/. Both classes are fully tweenable for animated effects. They're available to "Shockingly Green" Club GreenSock members because they're technically still in Beta. (see
  2. In AS3, it's as simple as: myManager.deleteSelection();
  3. TransformMatrixProxy can skew things, yes. TransformManager is meant for interactive scaling/rotating/moving, so I assume you meant TransformMatrixProxy. See the interactive demo at http://blog.greensock.com/transformmatrixproxy/
  4. I just tried your test and it worked perfectly for me. Could you post an FLA that demonstrates the problem? There's really no code inside TweenLite that I can think of that could possibly cause behavior like that. It would just tween the _alpha value from 0 to 100. Do you maybe have some other conflicting tween where you set overwrite:false that's also trying to tween the _alpha of the same TextField at the same time? That could explain the behavior.
  5. Nope, sorry Dan, but there isn't something that fades to one value and then another automatically. You'll have to use 2 lines of code (the horror!)
  6. I don't follow your question. Are you asking how to fade out and then back in using TweenLite/TweenMax? Are you asking if TransformManager has a built-in function for fading out and fading in over time?
  7. It should be relatively straightforward as long as you realize that rotateSelection() accepts RADIAN values, not degrees If you want to translate degrees to radians, you'd just do: var radians:Number = degrees * (Math.PI / 180); So if you want it to rotate 5 degrees, have your + button call a function like: function onClickPlus($e:MouseEvent):void { myManager.rotateSelection(5 * (Math.PI / 180)); } And your - button could call something like: function onClickMinus($e:MouseEvent):void { myManager.rotateSelection(-5 * (Math.PI / 180)); }
  8. Sorry, but I have no idea what you're trying to accomplish so I can't help with the Math. Please explain.
  9. Sure you could do that, but again, you'd need to handle saving and applying that data - it's not something TransformManager does automatically for you. I've done that very same thing in an application before too. TransformManager worked great with it.
  10. Glad to hear you have been enjoying TweenMax. Here are the answers to your questions: ANSWER: I’m not sure exactly what you mean by “level switch”, but it does automatically bring your selection to the top of the display list of its parent. Please keep in mind that the items that a particular TransformManager instance manages must share the same parent (although you can create multiple TransformManager instances if you want – one for each parent). You can also move the selection up or down in the display list level-wise with the moveSelectionDepthDown() and moveSelectionDepthUp() methods. ANSWER: Sure, but that has nothing to do with TransformManager. You’d just need to save either the matrix values or the x/y/scaleX/scaleY/rotation values and then re-apply them before you add them to the TransformManager the next time. ANSWER: You get minor updates anytime I release them. No limit. If I release a major update with vastly different/better features, you’d need to pay an update fee, but I have no plans to completely rework the class because it’s really solid as it is and I can’t think of any ways to change it so much that it would warrant an upgrade fee. If I release a major update within the next year, you’d get it for free anyway, but again, I do not plan on creating a major update. Everybody who has purchased the class has been very happy with it (from what I’ve heard). Here are a few recent reviews: http://evolve.reintroducing.com/2008/10 ... xperience/ http://blog.kevinhoyt.org/2008/08/13/gr ... nager-as3/ Let me know if you have any other questions.
  11. Yep, I JUST added that last night actually. I'll be sending out a notification to Club GreenSock members shortly. Basically, the new create() method prevents you from creating more than one proxy per DisplayObject/MovieClip. Some people were spawning new proxies every time a button was rolled over or off, and they had conflicts with multiple proxies trying to control the color of a single DisplayObject/MovieClip. When you use the new create() method, it checks to see if there's already a proxy for that particular object. If so, it returns that proxy, and if not, it creates a new one and returns it. I also added a "target" property that allows you to get/set the target of the ColorTransformProxy. OLD WAY: var ctp:ColorTransformProxy = new ColorTransformProxy(my_mc); NEW WAY: var ctp:ColorTransformProxy = ColorTransformProxy.create(my_mc); I'll send you a link shortly...
  12. Ah, as you can tell I'm not much of a Flex guy There are numerous bugs in the Flex framework. I have spoken directly to Adobe about this and they have confirmed it. When transform.matrix values are updated (which TransformManager does), the width, height, scaleX, and scaleY properties are NOT updated properly! VERY frustrating. I made not of that on the TransformManager blog page. Anyway, if you need to find out the accurate values, you should be able to use the gs.transform.utils.MatrixTools class that came with TransformManager in conjunction with getBounds() to figure it out, like this: var bounds:Rectangle = my_mc.getBounds(my_mc); //gets the unscaled dimensions of my_mc var trueWidth:Number = bounds.width * MatrixTools.getScaleX(my_mc.transform.matrix); var trueHeight:Number = bounds.height * MatrixTools.getScaleY(my_mc.transform.matrix); Does that work okay for you?
  13. Could you explain further? I don't understand your question. What's $width and $height?
  14. Sure, that should work. Or you could use a TweenGroup which could come in handy if you want to skip ahead or reverse or something... import fl.motion.easing.*; import flash.display.*; import gs.*; var line:Shape = new Shape(); line.graphics.lineStyle(10, 0xFFD700, 1, false, LineScaleMode.VERTICAL, CapsStyle.NONE, JointStyle.MITER, 10); this.addChild(line); line.x = 50; line.y = 50; var drawer:Sprite = new Sprite(); this.addChild(drawer); var sequence:TweenGroup = new TweenGroup([{target:drawer, time:0.1, x:200, ease:Quadratic.easeOut, onUpdate:drawLine}, {target:drawer, time:0.1, y:100, ease:Quadratic.easeOut, onUpdate:drawLine}, {target:drawer, time:0.1, x:0, ease:Quadratic.easeOut, onUpdate:drawLine}, {target:drawer, time:0.1, y:0, ease:Quadratic.easeOut, onUpdate:drawLine}], TweenLite, TweenGroup.ALIGN_SEQUENCE); function drawLine():void { line.graphics.lineTo(int(drawer.x), int(drawer.y)); } If you want your easing to apply to the whole group instead of each individual line, you could even set them up in a group each with an ease of Linear.easeNone and then tween the "progress" property of the group and use an ease in that tween. Lots of possibilities.
  15. Oh, I think I see the problem. Two things to keep in mind: 1) When you transform TextFields, TransformManager will change the size of the BOX, not the text. This is actually a feature. If you want the text to transform with the box/handles, just wrap your TextField in a Sprite/MovieClip. 2) You set your TextField to autoSize which explains why it won't allow TransformManager to go smaller than the text - Flash just resizes the TextField immediately to fit the contents. Does that help?
  16. So your TextField is being altered independently AFTER it was added to TransformManager? For example, maybe the size is 100, 100 when it gets added, but then later the user (or you through code) alter the size without going through TransformManager? You should either make all your transformations through TransoformManager OR just make sure you call update() on the TransformItem instance associated with your TextField between the time it was altered and the time it gets selected because TransformManager doesn't "watch" the object to see if you make any changes independently of TransformManager. If that doesn't help, could you post a super-simple FLA that demonstrates the problem? Please strip out all unnecessary code. I'm sure we can get it figured out
  17. It might just be a scope issue. Try this: import mx.utils.Delegate; Delete_btn.onPress = Delegate.create(this, onPressDelete); function onPressDelete():Void { manager_obj.selectedItem.deleteItem(); }
  18. Ah, are you using the AS2 version? Sorry - I thought you were using AS3. There's no deleteSelection() method in the AS2 version. You could, however, do something like: Delete_btn.onPress = function() { myManager.selectedItem.deleteItem(); }
  19. Sure, there's an undocumented deleteSelection() method you can call Does that help?
  20. I didn't see where/how you're handling reparenting (if at all). You problem may be related to that. Please keep in mind that there is a BUG in the Flex Framework (not TransformManager) that won't let you scale TextFields disproportionately (I mention this on the TransformManager page and documentation). You're using Flex, right? (you mentioned "Canvas", so I assume you're working in Flex).
  21. Oh, I believe you're talking about turning "smoothing" on for that image/graphic. There are a few ways to do it. If it's in your FLA's library, just right-click on the image (I'd recommend using PNGs), choose properties, and check the checkbox that says "smoothing" or "enable smoothing". If you're loading it dynamically, you have two choices: 1) Try wrapping it in a Bitmap() object and set the smoothing property to true. 2) Create a BitmapData and make sure its smoothing property is set to true via the constructor (see the Flash help docs for more info). Then draw() your image to that BitmapData and attach it to a Bitmap and work with it that way. Basically, make sure smoothing is true for your object and it'll scale much better.
  22. TransformManager defines its parent the first time you add an item to it. If you're going to reparent the item(s), I'd recommend just creating a new TransformManager instance for that new parent. Just destroy() the first TransformManager and create a new one and add your item(s) to it for the new parent. Does that answer your question?
  23. Could you describe what you mean by resampling vs. resizing with TransformManager?
  24. I have never personally saved something out as a JPEG, but I seem to remember seeing some articles about doing that online, so I think it is possible. Obviously TransformManager won't do that for you - you'd need to handle saving the stuff out as a JPEG on your own, but again, I'm pretty sure it's possible. I'm also 99% sure that you must involve a server-side script, and it tends to be pretty bandwidth-intensive, so you may not be happy with the performance. Good luck!