0
\$\begingroup\$

Using adobe animate cc - exporting to HTML5 and coding in JS (or at least trying to)

If I just hit cntrl+enter in adobe animate the button works as expected. If I run the app from a web server using the index.html file the button is there, and the down registers when you click it, but the cursor doesnt change and there is no roll over change in colour..... is there a mouseEnable or something I need to use from the class.js file?- there is no code in there at the mo, just an empty constructor

class Game
{
    constructor(root, lib)
    {
        this.root = root;
        this.stage = this.root.stage;
        this.lib = lib;
        this.init();
    }
    
    init()
    {
        
    }
}

Thanks all for your awesome efforts and have a great day

\$\endgroup\$

1 Answer 1

0
\$\begingroup\$

I don't really know why - maybe you can spot the code issue but I backtracked to an earlier version and this one works:

class Game{
    constructor(exportRoot, stage){
        this.root = exportRoot;
        this.stage = stage;
        this.init();
    }
    
    init(){
      
        this.root.play_btn.on('click', function(){
            this.root.tester.gotoAndStop(2);
        });
    }
}

It moves the targeted MC timeline and has the expected button behaviour - so happy days I guess! If you know why please still let me know!

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .