Jump to content


  • Posts

  • Joined

  • Last visited


4 Newbie
  1. Carrl – Brilliant. So useful. Thank-you. Retropunk – good idea asking for this.
  2. Carl. Oh thanks for the link! I understand the clean-up is necessary. Will you be keeping those as3 docs on your site, so we can still access via the direct link? Regards Simon
  3. Can't seem to find the old AS3 manual pages on the website anymore. Anyone know what happened to them, please? I can't remember the url to see if the pages are still there, but the links have certainly gone from what I can see. They are/were *so* useful.
  4. I found a way by rotating a dummy sprite with TweenLite, and then using those values to affect a standard AS3 matrix transform with arbitrary point. The object being transform-rotated was rotated back to a saved start matrix state each time before the new Transform rotation value was applied, so I could just use the rotation value of the dummy sprite explicitly.
  5. Can I rotate around a point using the TransformMatrixPlugin in the current version of greensock? Can't see any syntax for setting a transform point in the API. I found some earlier examples using different transform plugins but they do seem to be for the current library.
  6. If anyone else need to do this, I found a solution. https://blog.hiraash.org/2011/08/29/how-to-find-the-curve-length-in-as3/ The distance is not the same as the one reported by the BezierPlugin plugin when the tween is run, but it's a start.
  7. Ok, no worries – thank-you for your help so far! I'll look into it and see if there's another way without length. Simon
  8. I'm trying to call the _parseLengthData function like this (based on the example you showed me). At the same time as I draw the curve, I create a data objects with the structure of Segments (a,b,c,d). I had to edit on line in the BezierPlugin _addCubicLengths function to make it accept an Object, not a Segment class type (bez:Object) in the local variable. It runs without error but I get a NaN(s) for the returned length and lengths properties. var xArray=[] var yArray=[] g.moveTo(bx[0].a, by[0].a); for (var i:int = 0; i < bx.length; i++) { var xobj = {a: bx.a, b: bx.b, c: bx.c, d:bx.d} var yobj = {a: by.a, b: by.b, c: by.c, d:by.d} xArray.push(xobj) yArray.push(yobj) g.curveTo(bx.b, by.b, bx.c, by.c); } var bzData=BezierPlugin._parseLengthData({x:xArray, y:yArray}) trace("Boing", bzData.length, bzData.lengths)
  9. Clive thanks for the tip. That works great! Now, I wonder how to find the length of the curve? I see that when the tween is started inside the Plugin it creates a _length property. But this cannot be accessed at any other time - like when using bezierThrough method. Is there a way around this? I need to have consistent speeds whilst my sprite travels along different paths, straight or curved. I guess it would have been nice to have a bezier curve in the MotionPath library, so that it had the same functionality as straight lines - like the length. I presume all work has stopped on the Flash version of Greensock, now.... Regards Simon
  10. Carl, thank-you and thank-you for such a quick reply. I felt sorry to see the Flash forum was now in archive status. I found the private _parseBezierData function earlier. Odd that it's not actually marked as private, despite the leading _ in the method name. When I tried it, I realised that it requires a type argument and am not sure what are valid types. I figured "cubic" and "soft" from looking inside the function but wondered what the default was as I'm using default bezier in my test. Also what is the third argument - prepend - for? For some reason I failed to get it to work before I posted here, but I will try again tomorrow! My other option might be to switch to a greensock lib from 2010 (2.222), but not sure the rest of my project which uses MotionPath will still work at this point.
  11. I've been trying to work the method in this example: http://greensock.com/forums/topic/1282-bezier-tween-draw-curve-solved/ to draw the curves that my sprite follows. It seems the static method BezierPlugin.parseBeziers no longer exists in the current version of GS. What can I do instead?