Quantcast
Channel: Adobe Community : All Content - Adobe Animate CC - General
Viewing all articles
Browse latest Browse all 13519

gotoAndPlay in Javascript?

$
0
0

I've been looking into turning my flash banners and buttons into html5 equivalents. Using the CreateJS option. Which turns my animations into javascript, I already experimented with (first time I'm doing this). Now for the interactivity like mouse clicks on my buttons or in banners. I've read that I then have to translate my actionscript code into javascript equivalents. I know a lot of languages, but haven't really worked with javascript much. As a tutorial I looked at this page:

http://blogs.adobe.com/flashpro/2013/12/18/actionscript-to-html5-flash pro-cc-2/

 

It says I should change this actionscript code:

 

var self = this;this.btnJump.onClick = function() {self.gotoAndPlay(“endWait”);}

 

Into this javascript code:

var self = this;this.stop();this.btnJump.addEventListener(‘click’, onClickJump);function onClickJump() {self.gotoAndPlay(“endWait”);

}

I glanced through my javascript books to brush up on my knowledge and I kind of can make sense of this. But things like 'gotoAndPlay', that's still actionscript and not javascript, right? That's the reason I can't find gotoAndPlay and gotoAndStop for example in my javascript books? Perhaps it has been recreated in CreateJS as a javascript function? So not really basic javascript, but a created javascript function called the same and working the same, but coded in basis javascript syntax so that it does the same thing? It that how it works?

 

Next to any javascript books to brush up on my knowledge (know any good ones), where can I find documentation on CreateJS so I can read and learn how to translate my actionscript into its javascript equivalents? Something like the actionscript language reference pages in Flash, but then in CreateJS/Javascript style?


Viewing all articles
Browse latest Browse all 13519

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>