我正在尝试从 IF 语句运行一个函数,这就是该函数,它现在通过鼠标单击运行。
//Show the bus route
public function showRoute(Event:MouseEvent){
bg.addChildAt(route1, 2);
bg.addChildAt(dest1, 3);
bg.removeChild(stop1);
searchbar1.mouseEnabled = false;
bg.addChild(busInfo);
bg.removeChild(instructions);
bg.addChild(searchResult1);
busInfo.mouseEnabled = true;
route1.mouseEnabled = false;
dest1.mouseEnabled = false;
}
这是我要运行 showRoute 函数的下一个函数和 IF 语句
public function addMarker(e:TuioEvent):void {
var fid_id = (e.tuioContainer as TuioObject).classID;
if (fid_id == 0){
showRoute(event:Event);
}
}