1

Firstly, I create Canvas Project with Adobe Animate CC. But I have a problem with action code.

I have 2 symbols on stage. How can I get access the symbol on main movie clip?

var _this = this;

_this.Text.on('click', function(){

_this.gotoAndPlay('sym2');
});

I need to edit this code to access symbol on main movie clip:

https://www.dropbox.com/s/9em62bbifwaxqv4/test2.fla?dl=0

mmvsbg
  • 3,570
  • 17
  • 52
  • 73

1 Answers1

0

This seems to be a scoping issue. In test2.fla, your object named Text is contained with an object named TradeMarks.

The code in your clip read:

_this.Text.on('click', function(){
    _this.parent.sym2.gotoAndPlay(3);
});

Whereas that would look for an object named "sym2" on TradeMarks, not at the root timeline.

I think you will get what you want by changing it to read:

_this.Text.on('click', function(){
    _this.parent.parent.sym2.gotoAndPlay(3);
});
Dre G
  • 56
  • 6