当我调用此函数时,我得到这个“致命错误”:
import flash.events.Event;
import flash.events.MouseEvent;
var puzzleArr:Array = new Array (piece1_mc, piece2_mc, piece3_mc, piece4_mc,
piece5_mc, piece6_mc, piece7_mc, piece8_mc,
piece9_mc, piece10_mc,
piece11_mc, piece12_mc, piece13_mc, piece14_mc, piece15_mc, piece16_mc);
for (var i:uint =0; i < puzzleArr.length; i++) {
puzzleArr[i].addEventListener(MouseEvent.MOUSE_DOWN, drag);
puzzleArr[i].addEventListener(MouseEvent.MOUSE_UP, drop);
}
function drag(event:MouseEvent):void {
event.currentTarget.startDrag();
}
function drop(event:MouseEvent):void {
event.currentTarget.stopDrag();
}
您能否告诉我哪些方面可以阅读此类错误?
答案 0 :(得分:0)
改变它(如果你使用MYSQLi):
#SELECT field1 FROM xyz where id = ?
$result = $statement->get_result();
$data = $result->fetch_row();
return $data['field1']?$data['field1']:'';
注意Fatal Error
功能有一个ReturnTypeHint string
所以你必须返回一个字符串。
请在此处阅读:http://php.net/manual/en/class.typeerror.php和此处:http://php.net/manual/de/functions.returning-values.php