私はここが初めてで、AS3 も初めてです。だからここに私のクレイジーな質問があります:
TypeError: Error #1010: A term is undefined and has no properties. というエラーが発生するのはなぜですか。MethodInfo-1() で
私が取り組んでいるこの機能のために:
/* a universal function for all the movieclips */
function clickAndPlay(element):Function {
/* return the click event */
return function(e:Event):void {
/* stop the event from propagating */
e.stopPropagation();
/* get the labels from the clip */
var labels:Array = element.currentLabels;
var numFrm:Number = labels.length; /* count them */
/* if there are no labels for this clip, get the frame length instead */
if(numFrm == 0) {
/* get the number of frames */
numFrm = element.totalFrames;
trace(numFrm);
if(element.currentFrame < numFrm) {
element.nextFrame();
}else{
element.gotoAndStop(1);
}
}else{
/* get the current index of the labels array */
for(var i:Number = 0; i < numFrm; i++) {
if(labels[i].name == element.currentLabel) {
if(i < numFrm) {
/* get the next label's name */
var labelName:String = labels[(i+1)].name;
/* go to the next label */
trace(labelName);
element.gotoAndStop(labelName);
}else{
element.gotoAndStop(1);
}
}
}
}
};
}
関数が何を指しているのかわかりません。フレームのラベルが正確であることを確認しましたが、正確です。私はそれがばかげていると確信していますが、どんな助けもいただければ幸いです。前もって感謝します。
ショーン