0

I don't know if I'm in the right section. I'm working on adobe animated (formerly flash) with output in html and js. I have a scene where I have 2 clips (clip1 and clip2) and within these I have 4 frames of 4 different colors each with an instance name (blue, green, red, gray) clip1 and clip2 are buttons when clicked it goes to frame " blue" if you click again green, red and gray and so on. Button code:

this.stop();

this.addEventListener("click", fl_ClickToGoToAndPlayFromFrame_3.bind(this));

function fl_ClickToGoToAndPlayFromFrame_3()

{

    this.gotoAndStop("verde");

}
 

this.addEventListener("click", fl_ClickToGoToAndPlayFromFrame_4.bind(this));


function fl_ClickToGoToAndPlayFromFrame_4()

{

    this.gotoAndStop("verde");

}

And on the other hand, in the main scene I have "clip5" with several frames, what I need and there is no way to achieve it is that when the other two clips are in the "red" frame, clip5 goes to frame 3, for example. I have asked chatgpt and it gives me the following code that does not work:

if (this.clip1.currentFrameLabel === "rojo" && this.clip2.currentFrameLabel === "rojo") {

  this.clip5.gotoAndStop(3);

}

Can someone help me please? I have attached a zip with the html the js and the adobe file. You will see that they are just colored squares without much sense but if I get it to work I will make it a puzzle and when all the pieces are the same "color" a congratulations button will appear!

Thank you!

Sergio
  • 1

0 Answers0