Jump to content
Search Community

simonlucas

Members
  • Posts

    13
  • Joined

  • Last visited

Posts posted by simonlucas

  1. 7 hours ago, GreenSock said:

    The AS3 docs are at http://greensock.com/asdocs/

     

    Please note, however, that we haven't actively supported or maintained the ActionScript version of the library for many, many years. You're welcome to use it, of course, but I'd strongly recommend switching to the JavaScript platform. Flash is largely a dead platform, at least on the web. I'm curious - what are you using it for these days? 

     

    Personally I still use it for museum work. All our touch-screen software is written in AS3 and published to AIR desktop.  I even prototype in AS3 when developing and testing complex ideas that may finally be implemented in Unity, because AS3 is such a fast language to test and develop with. 

    • Like 1
  2. 1 hour ago, Carl said:

    As we eliminate support for AS3 we are slowly weeding out references to it from the site. We removed Flash as a menu option from the main Docs page.

     

    You can get to the Flash docs here: https://greensock.com/asdocs/index.html?com/greensock/package-detail.html&com/greensock/class-list.html

     

    It does seem that some docs links on the Flash GSAP page are broken and only point to the HTML5/JS docs so we will look into getting those fixed.

    Sorry for the inconvenience.

     

     

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

    • Like 1
  4. 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.

  5. 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)
  6. 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

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

×
×
  • Create New...