Highlighted

End Message at the end of countdown timer

New Here ,
Dec 05, 2019

Copy link to clipboard

Copied

Hi!

I'm making a game on animate for uni. I was wondering within HTML 5 canvas after my timer finishes the 90 seconds, show an end game frame that I have made already. 

 

var secondsLeft = 90;

this.countdown_txteasy.text = secondsLeft;

var timerId = setInterval(countdown.bind(this), 1000);

function countdown(){

if(secondsLeft == 0){

}

else{

secondsLeft--;

this.countdown_txteasy.text = secondsLeft;

}

}

 

That is what I have for my timer and would want a message after the 90 seconds. 

TOPICS
ActionScript, Code, How to

Views

121

Likes

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

End Message at the end of countdown timer

New Here ,
Dec 05, 2019

Copy link to clipboard

Copied

Hi!

I'm making a game on animate for uni. I was wondering within HTML 5 canvas after my timer finishes the 90 seconds, show an end game frame that I have made already. 

 

var secondsLeft = 90;

this.countdown_txteasy.text = secondsLeft;

var timerId = setInterval(countdown.bind(this), 1000);

function countdown(){

if(secondsLeft == 0){

}

else{

secondsLeft--;

this.countdown_txteasy.text = secondsLeft;

}

}

 

That is what I have for my timer and would want a message after the 90 seconds. 

TOPICS
ActionScript, Code, How to

Views

122

Likes

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
Dec 05, 2019 0
Adobe Community Professional ,
Dec 05, 2019

Copy link to clipboard

Copied

I don't know what it means to "overall" something, but if you just want to display some text in a textfield, you clearly already know how to do that. So what's the problem?

Likes

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
Reply
Loading...
Dec 05, 2019 0
New Here ,
Dec 05, 2019

Copy link to clipboard

Copied

My bad, I just realised how that didn't make sense.

I have an end game screen that is a layer in my timeline. I would like that layer to be shown after the 90 seconds has finished. I'm quite new to animate so discovering everything as I go. 

Likes

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
Reply
Loading...
Dec 05, 2019 0
Adobe Community Professional ,
Dec 05, 2019

Copy link to clipboard

Copied

Make the layer a movieclip. Give it an instance name. Set its .visible state to hide or show it.

 

Also, clear your timer when time runs out or it will keep counting down.

Likes

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
Reply
Loading...
Dec 05, 2019 1
New Here ,
Dec 05, 2019

Copy link to clipboard

Copied

Ideally I would like it to go to the frame where I have it as there's quite a few layers within the end game frame. I don't know how I would code the end of the timer code. 

Likes

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
Reply
Loading...
Dec 05, 2019 0
Cortoh LATEST
Community Beginner ,
Dec 08, 2019

Copy link to clipboard

Copied

Bonjour,

Tu peux importer ton clip vidéo depuis la bibliothèque addChild(my_video); elle se placera au dessus des autres calques.

Cordialement 

Likes

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
Reply
Loading...
Dec 08, 2019 0