Jump to content

onComplete() doesnt work, only onFrameChange()


dazzafact
 Share

Recommended Posts

Can anyone explain to me why "onComplete" does not trigger? The only thing that works is "onFrameChange".
The animation works without any problems. Actually I wanted to add a loop to the animation, but "loop=true" doesn't work either, so I wanted to find another solution, with onComplete in combination with "gotoAndPlay()". But that just doesn't work. onLoop() also does not work

$sl[$allImgs]=new PIXI.AnimatedSprite(texture1);
$sl[$allImgs].loop = false;

$sl[$allImgs].onComplete = function() {
	console.log('animatedSprite complete123',$allImgs);
	$sl[$allImgs].gotoAndPlay(1);

};
$sl[$allImgs].onLoop = function() {
	console.log('animatedSprite onLoop',$allImgs);


};
$sl[$allImgs].onFrameChange = function() {
	console.log('animatedSprite onFrameChange');

};

PixjS V6.5

PS: ChatGpt PRO could not solve it either...☺

Edited by dazzafact
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...