Skip to main content
Line
Inspiring
October 29, 2020
Question

HTML5 canvas game 4 questions

  • October 29, 2020
  • 1 reply
  • 218 views

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

 

This topic has been closed for replies.

1 reply

Line
LineAuthor
Inspiring
October 29, 2020

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!