Copy link to clipboard
Copied
Hey, Everyone
so im attempting to make a simple animation with interactive controls to play pause and stop the animation.
but i cant seem to get the code i have here to work effectively on my project?
Any help would be appreciated
this.stop()
console.log(this)
var isPlaying = false;
var stageHeight = stage.canvas.height;
var stageWidth = stage.canvas.width;
this.playBtn.addEventListener("click", playClicked.bind(this));
function playClicked(){
this.play();
isPlaying = true;
}
this.pauseBtn.addEventListener("click", pauseClicked.bind(this));
function pauseClicked() {
this.stop();
isPlaying = false;
}
this.stopBtn.addEventListener("click", stopClicked.bind(this));
function stopClicked() {
this.gotoAndStop("BeginPoint");
isPlaying = false;
}
Copy link to clipboard
Copied
Are not working***
Copy link to clipboard
Copied
Your script works in my FLA, which suggests your symbols or frame are not named like you have them in the script.