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

Controlling a loop html5

Explorer ,
Dec 12, 2020 Dec 12, 2020

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.

412
Translate
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

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

Translate
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

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?

Translate
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

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

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

Translate
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