FLASH中TypeError: Error #1009: 无法访问空对象引用的属性或方法.
importflash.display.MovieClip;importflash.events.MouseEvent;importflash.display.Simpl...
import flash.display.MovieClip;
import flash.events.MouseEvent;
import flash.display.SimpleButton;
mc1.buttonMode = true;
mc2.buttonMode = true;
mc3.buttonMode = true;
var chk2 = false;
var myNum2 = 0;
var center2 = mc2.x;
//var bg:MovieClip;
//bg.gotoAndStop(1);
//bg.addEventListener(MouseEvent.CLICK, bgclick);
for (var j = 1; j < 4; j++) {
this["mc" + j].trgScale = 1.1;
this["mc" + j].addEventListener(MouseEvent.MOUSE_OUT, mouseout2);
}
mc1.addEventListener(MouseEvent.MOUSE_OVER, imouse1);
mc2.addEventListener(MouseEvent.MOUSE_OVER, imouse2);
mc3.addEventListener(MouseEvent.MOUSE_OVER, imouse3);
function imouse1(event: MouseEvent) {
mouseover2(1);
}
function imouse2(event: MouseEvent) {
mouseover2(2);
}
function imouse3(event: MouseEvent) {
mouseover2(3);
}
function mouseover2(j: Number) {
chk2 = true;
myNum2 = j;
}
function mouseout2(event: MouseEvent) {
chk2 = false;
reset2();
}
function reset2() {
for (j = 1; j < 4; j++) {
this["mc" + j].trgScale = 1.1; 错误出现处!!!!!!!!!!
}
myNum2 = 2;
错误为:
TypeError: Error #1009: 无法访问空对象引用的属性或方法。
at 首页_fla::导航_3/fangdacaidan()[首页_fla.导航_3::frame1:156] 展开
import flash.events.MouseEvent;
import flash.display.SimpleButton;
mc1.buttonMode = true;
mc2.buttonMode = true;
mc3.buttonMode = true;
var chk2 = false;
var myNum2 = 0;
var center2 = mc2.x;
//var bg:MovieClip;
//bg.gotoAndStop(1);
//bg.addEventListener(MouseEvent.CLICK, bgclick);
for (var j = 1; j < 4; j++) {
this["mc" + j].trgScale = 1.1;
this["mc" + j].addEventListener(MouseEvent.MOUSE_OUT, mouseout2);
}
mc1.addEventListener(MouseEvent.MOUSE_OVER, imouse1);
mc2.addEventListener(MouseEvent.MOUSE_OVER, imouse2);
mc3.addEventListener(MouseEvent.MOUSE_OVER, imouse3);
function imouse1(event: MouseEvent) {
mouseover2(1);
}
function imouse2(event: MouseEvent) {
mouseover2(2);
}
function imouse3(event: MouseEvent) {
mouseover2(3);
}
function mouseover2(j: Number) {
chk2 = true;
myNum2 = j;
}
function mouseout2(event: MouseEvent) {
chk2 = false;
reset2();
}
function reset2() {
for (j = 1; j < 4; j++) {
this["mc" + j].trgScale = 1.1; 错误出现处!!!!!!!!!!
}
myNum2 = 2;
错误为:
TypeError: Error #1009: 无法访问空对象引用的属性或方法。
at 首页_fla::导航_3/fangdacaidan()[首页_fla.导航_3::frame1:156] 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询