Jump to content
Search Community

Search the Community

Showing results for tags 'framebackwardplugin'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • GreenSock Forums
    • GSAP
    • Banner Animation
    • Jobs & Freelance
  • Flash / ActionScript Archive
    • GSAP (Flash)
    • Loading (Flash)
    • TransformManager (Flash)

Product Groups

  • Club GreenSock
  • TransformManager
  • Supercharge

Categories

There are no results to display.


Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Personal Website


Twitter


CodePen


Company Website


Location


Interests

Found 1 result

  1. Hello GreenSock, first of all, thank you for this wonderful suite you've created! Second, my problem. I have a clip which has 37 frames and i need to loop it forward or backward for 3 times, starting everytime from a different frame, and ending the triple loop on the same frame where i started. I will post you a super-simplified version of my code in which i try to set the final frame for both the forward and the backward animations, making a check to avoid passing non-existent frame 0 or frame 38 to the plugin (i obviously imported the greensock classes and activated both the FrameForwardPlugin and the FrameBackwardPlugin): var nRound:int = 0; var totRounds:int = 2; var completeRoundFrames:int; var clipRound:TweenLite; var direction:String = "forward"; //can be "forward" or "backward" if(direction == "forward") { completeRoundFrames = (clip.currentFrame - 1) == 0 ? 37 : (clip.currentFrame - 1); clipRound = TweenLite.to(clip, 6, { frameForward:completeRoundFrames, ease:Linear.easeNone, onComplete:loopRound } ); } else if (direction == "backward") { completeRoundFrames = (clip.currentFrame + 1) == 38 ? 1 : (clip.currentFrame + 1); clipRound = TweenLite.to(clip, 6, { frameBackward:completeRoundFrames, ease:Linear.easeNone, onComplete:loopRound } ); } function loopRound():void { if (nRound < totRounds) { trace("ROUND N." + nRound + " COMPLETED"); clipRound.restart(); nRound++; } } In this way the loop is working, but when it reaches the end of the animation and starts the following one, there's a little glitch because every animation ends one frame before (in case of forward) or one frame after (in case of backward) the original frame of the clip. Also the final animation (third phase of the loop) stops on a different frame (+1 or -1) than the original one. I've tried passing as the frame parameter for both the forward and backward animations the clip.currentFrame, but in this case the animation won't even start! I might have explained the problem not so well, but i hope you can give me some advice! Thank you very much!
×
×
  • Create New...