HELP ME PLEASE
Hello everyone, I wanted to ask the whole community about a question I have, I am programming an educational game in as3 is about paths, the problem I have is that I put some lines as symbols that simulate "walls", something like a game of maze that when it hits the wall it goes to another frame to tell it to try again, and the problem is that when I rollover I move my mouse over these "walls" it goes to the other frame and I would like to know if there is some function that only when the click is pressed and dragging the mouse has the function of colliding and going to the other frame, that is to say that when the click is not pressed and passes over the "wall" it does not go to the other frame but if when pressed, will there be any function for that in As3? i need it for school is urgent please thanks. (I don't speak english sorry for the english traductor)
This is my code:
import flash.events.MouseEvent;
a1.addEventListener(MouseEvent.ROLL_OVER, onMouseOver);
function onMouseOver(e:MouseEvent):void {
mouseEnabled = true;
buttonMode = true;
gotoAndStop(103);
}
a3.addEventListener(MouseEvent.ROLL_OVER, onMouseOver);
a4.addEventListener(MouseEvent.ROLL_OVER, onMouseOver);
a6.addEventListener(MouseEvent.ROLL_OVER, onMouseOver);
a7.addEventListener(MouseEvent.ROLL_OVER, onMouseOver);
a9.addEventListener(MouseEvent.ROLL_OVER, onMouseOver);
a10.addEventListener(MouseEvent.ROLL_OVER, onMouseOver);
a12.addEventListener(MouseEvent.ROLL_OVER, onMouseOver);
a13.addEventListener(MouseEvent.ROLL_OVER, onMouseOver);
a15.addEventListener(MouseEvent.ROLL_OVER, onMouseOver);
a16.addEventListener(MouseEvent.ROLL_OVER, onMouseOver);
a18.addEventListener(MouseEvent.ROLL_OVER, onMouseOver);
a19.addEventListener(MouseEvent.ROLL_OVER, onMouseOver);
a21.addEventListener(MouseEvent.ROLL_OVER, onMouseOver);
