• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Controlling a loop html5

Explorer ,
Dec 12, 2020 Dec 12, 2020

Copy link to clipboard

Copied

Hello,
In Animate HTML5, I've been trying for hours to solve the following problem and I don't know what to do: I would like to be able to set the number of loops to 3: why doesn't the following code work?

 

createjs.Tween.get(myPoint,{loop: 3})

Thank you very much for all the answers.

Views

263

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Dec 12, 2020 Dec 12, 2020

Copy link to clipboard

Copied

You are not animating anything in the tween. Animate properties with the .to() method, you should see these properties animated in a 3x loop.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Dec 12, 2020 Dec 12, 2020

Copy link to clipboard

Copied

I didn't write all the code, just the line that doesn't work. Otherwise, I have :

function myFontion()
{
createjs.Tween.get(myPoint,{loop: 3})
.to({x:205, y: 180 }, 800,createjs.Ease.cubicInOut )
.to({x:205, y: 230}, 800,createjs.Ease.cubicInOut )
}

myFunction();

And it doesn't work. Do you have a solution?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Dec 12, 2020 Dec 12, 2020

Copy link to clipboard

Copied

There is the typo with 'myFontion' not matching 'myFunction'. I fixed the typo and tested the code and it was working for me.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Dec 13, 2020 Dec 13, 2020

Copy link to clipboard

Copied

LATEST

It's really amazing. At home it doesn't work. I even tried it with a clip:
app = this;
function myFontion()
{
createjs.Tween.get(app.myClip,{loop: 3})
.to({x:205, y: 180 }, 800,createjs.Ease.cubicInOut )
.to({x:205, y: 230}, 800,createjs.Ease.cubicInOut )
}

myFontion();


I don't understand and I'm very disappointed.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines