HTML5 canvas game 4 questions

Community Beginner ,
Oct 29, 2020 Oct 29, 2020

Copy link to clipboard

Copied

Hi everyone!

 

It's been a whilte since I made a game in Adobe (Flash sadface) now Animate.

 

I could have sworn back in the day the code to create a variable was

 

var varName = 1;

 

Question 1) I want to have var equal to a number would that be correct?

 

Question 2) If I had a button in a movieclip and I wanted that number to go up +1, would this be the code:

exportRoot.varName ++;

Question 3) If I wanted to do a if/then code if the variable got up to 3 or more.. would it be:

 

if varName >= 3 {

doSomething;

}

 

Question 4) Is there a list of Adobe Animate ActionScript codes for HTML5 canvas games somewhere that I can look at?

 

Thanks ahead,

 

Line

 

//Signature// I'm a creator. I love illustration, designing, animating , writing, voice overs, acting, making games .. Woo woo!
TOPICS
ActionScript

Views

42

Likes

translate

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
Community Beginner ,
Oct 29, 2020 Oct 29, 2020

Copy link to clipboard

Copied

Hi All!

I realize now that I should have put a 5th question, but back when I was making flash games, there was a way to output some text if vars were changing, but since this is published to a web page as it is a Canvas doc.

Question 5) is there a way to display a output in Google Chrome Inspector? So, if I were to click on the button to increase the var, that I could see the var number going up in the inspector?

Thanks again,

Line

//Signature// I'm a creator. I love illustration, designing, animating , writing, voice overs, acting, making games .. Woo woo!

Likes

translate

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