I am working in Adobe Edge. I have 3 buttons on the stage: v1, v2, v3. When buttons are clicked they move on the timeline.
When button 1 is clicked, it moves on the timeline and shows button 2 enabled, button 1 and 3 disabled.
when button 2 is clicked, it moves on the timeline and shows button 3 enabled, buttons 1 and 2 disabled.
when button 3 is clicked, it moves on the timeline and shows button 1 enabled, buttons 2 and 3 disabled.
I tried to use bind() and unbind() and it works for the first button. However since it unbinds the third button, when I get to the place on the timeline where button 3 should be enabled, it is disabled. I tried to bind the button again in the click event of button 2 but is does not work. How should I handle this?
sym.$("v1").click(function() {
sym.play("p1");
sym.$("v1").unbind("click");
sym.$("v3").unbind("click");
});
sym.$("v2").click(function() {
sym.play("p2");
sym.$("v1").unbind("click");
sym.$("v2").unbind("click");
sym.$("v3").bind("click");
});
sym.$("v3").click(function() {
sym.play("p3");
sym.$("v1").bind("click");
sym.$("v2").unbind("click");
sym.$("v3").unbind("click");
});