Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8962121
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T16:03:48+00:00 2026-06-15T16:03:48+00:00

I created a looping tween using Greensock javascript and I got it to loop

  • 0

I created a looping tween using Greensock javascript and I got it to loop using a function, maybe this is not the best way to loop, if you know a better way please advice, but basically when I try to kill the tween using this method, it doesn’t work.

My code:

var dvdTween;
function playDVD()
{
 dvdTween = TweenMax.to($("#bigDVD"), 4, {css:{rotation:+1440, transformOrigin:"150px 150px"},ease:Expo.easeNone, delay:7, onComplete:playDVD});
}

/// Later in a function I call

dvdTween.kill(); /// but this does nothing. 

Again, there may be a better way to loop a tween, and this may be my issue, but as of now this tween keeps on calling the function after I “kill” it.

Thanks for your tips and help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T16:03:49+00:00Added an answer on June 15, 2026 at 4:03 pm

    Your code should indeed work – I’d love to see an example set of files that shows it not working. I wonder if you’re running into a scope issue or something – are you sure “dvdTween” is referencing the tween in the context you’re calling it? Try adding onCompleteScope:this to your tween.

    Two other tips:

    1) You can loop a TweenMax infinitely by setting repeat:-1, like:

    TweenMax.to($("#bigDVD"), 4, {css:{rotation:1440}, repeat:-1}); 
    

    2) You can kill all the tweens of a particular object using TweenMax.killTweensOf() like:

    TweenMax.killTweensOf($("#bigDVD"));
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having trouble looping through a set of dynamically created UITextFields and storing those
I am looking to send an img file created using Qemu snapshot feature through
Basically, I am using Wireshark looking at captures that have been created previously. How
Possible Duplicate: Looping through rows in a DataView I have created a dataview from
I have created a for loop. I am trying to loop through lots of
Does anybody know how one would go about looping through all the elements in
I have created multiple checkboxes via applying looping. for(int l=0;l<len;l++) { chkBox = dynamicUiComponents.myCheckBox(context,
I'm wondering if there is a built-in way to do this... Take this simple
i created a loop up to 100 to insert any data in db. but
I am trying to unset function using be searching for all of them and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.