removeEventListener and bind
Hi.
I have objects on an animation, they are clips, but are used as button with 4 steps in the timeline ( in, over, rollout and selected).
the principle of the script is this simple one
this.couverture.addEventListener("mouseover", rollover.bind(this,'couverture'));
this.couverture.addEventListener("mouseout", rollout.bind(this, 'couverture'));
this.couverture.addEventListener("click", obj_bon.bind(this,'couverture'));
function rollover(obj) {
this[obj].gotoAndPlay('over');
}
function rollout(obj) {
this[obj].gotoAndPlay('rollout');
}
function obj_bon(obj) {
this[obj].removeEventListener("mouseout",true);
this[obj].gotoAndPlay('selected');
}
the remove EventListener don't work, when i click on the object, the clip read the timeline correctly from the "selected" label, but as the rollover is still active, moving the mouse out of the object send back the timeline to the "rollout" label, as i want the object to become inactive. i have seen some solution involving the bounds, but did'nt find a way to adapt them to my script ( functions with parameters)
thanks
