How Can I Learn Javascript in Adobe Animate?

New Here ,
May 14, 2020 May 14, 2020

Copy link to clipboard




I've been writing codes for a year now, and many people have told me that I'm the worst programmer there is. I know the basics, but somehow I missed some of the fundamentals and the concepts, and now I'm stucked at my game development. I'm using Javascript in Adobe Animate to create a very very tiny game that only involves clicking with mouse.


I followed a tutorial posted in this is site (this one) . I didn't copy the whole thing tho, I just trying to learn the basics and methods he's using. Now, there's a part in that tutorial that explains a bit about prototype. I have no idea what that is, and I just used it ignorantly as a way to bridge one function to another.



I have three scripts thatis distributed in three layers:

function Main(){
	this.Litter = new Litter();
	this.Money = new Money();
	litterP = 0;
	moneyP = 0;
	createJS.Ticker._addEventListener("tick", this.update.bind(this));

Main.prototype.update = function(evt){





function Money(){
	this._moneyP = 0;

Money.prototype.update = function()
	return this._moneyP;

Money.prototype.getMoneyP = function(){

exportRoot.money_1.addEventListener("click", Money.prototype.getMoneyP.bind(this));




function Litter(){

	return this._litterP;


Litter.prototype.getLitterP = function(){
		exportRoot.lit_1.visible = false;

exportRoot.lit_1.addEventListener("click", Litter.prototype.getLitterP.bind(this));




Everytime the instance called "lit_1", the value of litter_1 should be added by 1, and then its value should be printed in a textbox called "litterP_text". When I tried to click, instead of displaying "1", it displays "NaN". It seems like the value of litter_1 is undefined. The same thing happens to the money_1.


How can I solve this?




  1. What is this prototype?
  2. How can I access the variables declared on the parent function and access it in the prototype function?
  3. As a beginner, where can I learn Javascript in Adobe Animate? (I'm not talking about the documentation that is extremely hard to comprehend. Besides, my first language is not English, so I can't understand those technical languages most of them are using)




I've frustrated many people with my code, so before you complain, I would to apologize. Thank you for reading.

Code, How to







Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
no replies

Have something to add?

Join the conversation