Jump to content

connecting a class to easelJS html5 canvas animate cc


subtlefly
 Share

Recommended Posts

 

 

 

Hi team,

I am trying to set up a game.js class to hold the code for a html5 canvas project made in adobe animate cc.

So the instructions I have say..

go to the (project name).html file

line 28 add , game

var canvas, stage, exportRoot, anim_container, dom_overlay_container, fnStartAnimation, game;

then go to the handle tick event

function handleTick(event) {
            if (game === undefined) game = new Game(exportRoot, stage);

and add this if game line in

then back at the start 

<script src="game.js"></script>

but when I make any changes or re publish my file it no longer has the handleTick event as part of the .html file?  

Is there another (easier) way to make the connection between the class and the working file?  When I do manage to make it connected in source - then the link for the button doesn't work anymore (when it is coded into the game.js file) although it does at the start. 

This is obviously something simple- I am not used to using a web server to compile the project instead of just hitting cntrl+enter on the computer and getting a usable output.  Any help would be greatly appreciated.

sub

 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...