Copy link to clipboard
Copied
hello ... I am working on a canvas project .. the project consists of an interactive map WITH ZOOM .. I have the symbol "map", inside this symbol I have the map and 2 buttons
button 1: go to frame 15
button 2: return to frame 1
the problem is that the zoom is superimposed on me with the buttons. The buttons are hidden ... when I go to frame 15 it shows me some special routes
I would like to take out the buttons of the "map" symbol and place it in the main scene
the problem
being the button 1 in the main scene I do not know how to take me to frame 15 of the "map" symbol
this code works if the button is inside the map symbol, but it does not work if the buttons are in the main scene, outside the map symbol
this.btn_boton1.addEventListener ("click", fl_ClickToGoToAndStopAtFrame_2.bind (this));
function fl_ClickToGoToAndStopAtFrame_2 ()
{
this.gotoAndStop (15);
}
this.btn_boton2.addEventListener ("click", fl_ClickToGoToAndStopAtFrame_3.bind (this));
function fl_ClickToGoToAndStopAtFrame_3 ()
{
this.gotoAndStop (1);
}
Nice!
Set their visibility in the beginning and when the user clicks the buttons.
...this.btn_boton1.addEventListener ("click", fl_ClickToGoToAndStopAtFrame_2.bind(this));
function fl_ClickToGoToAndStopAtFrame_2()
{
this.map.gotoAndStop(15); // it is in fact the 16th frame
this.btn_boton1.visible = false;
this.btn_boton2.visible = true;
}
this.btn_boton2.addEventListener ("click", fl_ClickToGoToAndStopAtFrame_3.bind(this));
function fl_ClickToGoToAndStopAtFrame_3()
{
this.map.gotoAndStop(1)
Copy link to clipboard
Copied
Hi.
Please try this:
this.btn_boton1.addEventListener ("click", fl_ClickToGoToAndStopAtFrame_2.bind(this));
function fl_ClickToGoToAndStopAtFrame_2()
{
this.map.gotoAndStop(15); // it is in fact the 16th frame
}
this.btn_boton2.addEventListener ("click", fl_ClickToGoToAndStopAtFrame_3.bind(this));
function fl_ClickToGoToAndStopAtFrame_3()
{
this.map.gotoAndStop(1); // it is in fact the 2nd frame
}
Regards,
JC
Copy link to clipboard
Copied
thanks for answering and helping JoãoCésar
yes, it works .. but it created another problem
the "button2" is now always visible and before that button was hidden, it was shown only in frame 15
how can I do to hide the "button2" in the main scene and activate it only by clicking on the "button1"
and, when I click on the "button2" hide it to itself and go back to the frame 1
Copy link to clipboard
Copied
Nice!
Set their visibility in the beginning and when the user clicks the buttons.
this.btn_boton1.addEventListener ("click", fl_ClickToGoToAndStopAtFrame_2.bind(this));
function fl_ClickToGoToAndStopAtFrame_2()
{
this.map.gotoAndStop(15); // it is in fact the 16th frame
this.btn_boton1.visible = false;
this.btn_boton2.visible = true;
}
this.btn_boton2.addEventListener ("click", fl_ClickToGoToAndStopAtFrame_3.bind(this));
function fl_ClickToGoToAndStopAtFrame_3()
{
this.map.gotoAndStop(1); // it is in fact the 2nd frame
this.btn_boton1.visible = true;
this.btn_boton2.visible = false;
}
this.btn_boton1.visible = true;
this.btn_boton2.visible = false;
Copy link to clipboard
Copied
JoãoCésar .... works very well
... thank you very much ..
send a new query about this project .. maybe you can help me
Title: Help with pop-up window - canvas
Find more inspiration, events, and resources on the new Adobe Community
Explore Now