Adobe Animate Query

Hello … please. do not know why the mouse mask does not work in Adobe Animate CC 2019 as this video?
Akcion Script I wrote the same, but my mouse does not move. I’m preparing it like HTML5 Canvas and there it does not work … is another script needed? Will somebody help solve it please? Thank you very much. Martin.

I don’t fully understand, what you are trying to do. You want to be able to get the mouse coordinates into a Flash template inside CasparCG? Getting mouse interactions is only supported using HTML templates and running on the screen consumer.

I think he’s trying to export the animate movie to a HTML5 canvas, not an actual flash template

But he is referring ActionScript, so it’s not very clear what he does :slight_smile:

Indeed. He must be confused about it as I was.
I just found out myself that Animate CC uses a whole different scripting language/framework for HTML5 documents: CreateJS.

It’s very simple actually, there’s some differences in how movie clips work.

I was able to make it work like this:
Layer 4: Actions
Layer 3: Mask sprite / movieclip (_mask);
Layer 2: Masked foreground (_foreground)
Layer 1: Background

The mask must be placed in 0,0 relative to the stage.
In the first frame of the actions layer:

this.addEventListener("tick", fl_CustomMouseCursor.bind(this));

function fl_CustomMouseCursor() {
	this._foreground.mask.x = stage.mouseX;
	this._foreground.mask.y = stage.mouseY;

It works correctly but the output window have some latency as usual so interactions are a bit laggy

1 Like

Yes, you understand exactly my problem and thank you for the answer and the demonstration. Unfortunately, I do something wrong with the instructions … and it does not work for me.

I would like to ask if he would go to send your fla. document to my email to make my own? Thank you, thank you very much!
Martin Karas.

I would like to thank you very much for helping with Adobe Animate. It works as it should. Martin.

1 Like