i am having a problem with collisions

Participant ,
Mar 05, 2020

Copy link to clipboard

Copied

Hello, i am having problems with this script, when i target a movieclip I can do play(); or stop(); commans on it, but i cant do gotAndPlays or gotoAndStop() on it, with frame numbers or labels, here is the script thanks for help so much, raiz is my this variable

 

this.on("tick", update3.bind(this));
function update3(evt) {
var pt = this.mono1.left.machete.hit.localToLocal(this.mono1.left.machete.hit.dot1.x,
this.mono1.left.machete.hit.dot1.y, this.malo1.box);
if (this.malo1.hitTest(pt.x, pt.y)) {
alert("collision")
//console.log("collided");
raiz.malo1.play();
this.mono1.left.machete.stop(); //can
this.mono1.left.machete.gotoAndStop("malomuerto"); //cannot
//this.malo1.x += 2;

}
}

Views

36

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
cbunbury20 AUTHOR LATEST
Participant ,
Mar 05, 2020

Copy link to clipboard

Copied

solved thank you

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more