Arrays 我可以玩一次我的水平,我可以';我不能做另一件事。排列
当我玩一级时,我的阵型构建是正常的,但是如果我想在之后再做其他关卡的话,什么都不构建。如果我想做另一个级别,即使我不做lvl1,也只构建数组的前5列。最后,当我完成计时器时,我有一个错误:Arrays 我可以玩一次我的水平,我可以';我不能做另一件事。排列,arrays,actionscript-3,Arrays,Actionscript 3,当我玩一级时,我的阵型构建是正常的,但是如果我想在之后再做其他关卡的话,什么都不构建。如果我想做另一个级别,即使我不做lvl1,也只构建数组的前5列。最后,当我完成计时器时,我有一个错误: TypeError: Error #2007: Parameter hitTestObject must be non-null. at flash.display::DisplayObject/_hitTest() at flash.display::DisplayObject/hitTes
TypeError: Error #2007: Parameter hitTestObject must be non-null.
at flash.display::DisplayObject/_hitTest()
at flash.display::DisplayObject/hitTestObject()
at projsolo_fla::MainTimeline/collisions()[projsolo_fla.MainTimeline::frame3:133]
这是我的第1帧代码:
import flash.events.MouseEvent;
//--- Variables: ---
var toucheA: Boolean = false;
var toucheZ: Boolean = false;
var toucheE: Boolean = false;
var toucheR: Boolean = false;
var toucheT: Boolean = false;
var map:Sprite=new Sprite();
//--- Ecouteurs: ---
stage.addEventListener (KeyboardEvent.KEY_DOWN, pressee);
stage.addEventListener (KeyboardEvent.KEY_UP, relachee);
btnLevel.addEventListener (MouseEvent.CLICK, menuLevel);
//--- autre: ---
stop();
stage.displayState=StageDisplayState.FULL_SCREEN;
stage.scaleMode=StageScaleMode.EXACT_FIT;
stage.addEventListener (Event.ENTER_FRAME, moove);
//--- Fonction: ---
function pressee (e:KeyboardEvent):void{
switch (e.keyCode){
case 65 :
toucheA=true;
Pac.y=55;
break;
case 90 :
toucheZ=true;
Pac.y=105;
break;
case 69 :
toucheE=true;
Pac.y=155;
break;
case 82 :
toucheR=true;
Pac.y=205;
break;
case 84 :
toucheT=true;
Pac.y=255;
break;
default :
break;
}
}
function relachee (e:KeyboardEvent):void{
switch (e.keyCode){
case 65 :
toucheA=false;
break;
case 90 :
toucheZ=false;
break;
case 69 :
toucheE=false;
break;
case 82 :
toucheR=false;
break;
case 84 :
toucheT=false;
break;
default :
break;
}
}
function moove (e:Event):void{
map.x-=5;
}
function menuLevel (e:MouseEvent):void{
gotoAndStop (2);
}
这是我的第2帧代码:
import flash.events.MouseEvent;
btnMusique1.addEventListener (MouseEvent.CLICK, playLVL1);
btnMusique2.addEventListener (MouseEvent.CLICK, playLVL2);
btnMusique3.addEventListener (MouseEvent.CLICK, playLVL3);
btnMusique4.addEventListener (MouseEvent.CLICK, playLVL4);
function playLVL1 (e:MouseEvent):void{
gotoAndStop (3);
lvl1 ();
}
function playLVL2 (e:MouseEvent):void{
gotoAndStop (3);
lvl2();
}
function playLVL3 (e:MouseEvent):void{
gotoAndStop (3);
lvl3();
}
function playLVL4 (e:MouseEvent):void{
gotoAndStop(3);
lvl4();
}
这是我的第3帧代码:
import flash.ui.Keyboard;
import flash.events.Event;
import flash.sampler.NewObjectSample;
import flash.utils.Timer;
import flash.events.TimerEvent;
import flash.media.SoundChannel;
import flashx.textLayout.formats.BlockProgression;
//--- Variables: ---
stop();
var timer1: Timer=new Timer (70000,1);
var points: Number = 0;
stage.addChild(map);
var tableau1: Array=[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,1,1,1,0,0,0,0,0,1,1,1,0,1,1,1,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,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,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,1],
[0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,1,0,1,1,1,0,0,0,0,0,1,0,1,0,0,0,0,1,1,0,0,0,0,0,1,1,0,1,0,1,0,1,0,0,0,0,0,1,0,1,0,1,0,1,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,1]];
var L:int=0;
var C:int=0;
// création du tableau.
function lvl1 () {
for (L=0; L<tableau1.length ;L++){
for(C=0; C<tableau1[1].length ;C++){
if (tableau1[L][C]==1){
var Block: block=new block();
map.addChild(Block);
Block.name="Block_"+L+"_"+C;
Block.x=1620+C*60;
Block.y=55+L*50;
Block.addEventListener (Event.ENTER_FRAME, collisions);
stage.removeEventListener (Event.ENTER_FRAME, lvl1);
}
}
}
}
function lvl2 () {
for (L=0; L<tableau2.length;L++){
for(C=0; C<tableau2.length;C++){
if (tableau2[L][C]==1){
var Block: block=new block();
map.addChild(Block);
Block.name="Block_"+L+"_"+C;
Block.x=1620+C*60;
Block.y=55+L*50;
Block.addEventListener (Event.ENTER_FRAME, collisions);
stage.removeEventListener (Event.ENTER_FRAME, lvl2);
}
}
}
}
function lvl3 () {
for (L=0; L<tableau3.length;L++){
for(C=0; C<tableau3.length;C++){
if (tableau3[L][C]==1){
var Block: block=new block();
map.addChild(Block);
Block.name="Block_"+L+"_"+C;
Block.x=1620+C*60;
Block.y=55+L*50;
Block.addEventListener (Event.ENTER_FRAME, collisions);
stage.removeEventListener (Event.ENTER_FRAME, lvl3);
}
}
}
}
function lvl4 () {
for (L=0; L<tableau4.length;L++){
for(C=0; C<tableau4.length;C++){
if (tableau4[L][C]==1){
var Block: block=new block();
map.addChild(Block);
Block.name="Block_"+L+"_"+C;
Block.x=1620+C*60;
Block.y=55+L*50;
Block.addEventListener (Event.ENTER_FRAME, collisions);
stage.removeEventListener (Event.ENTER_FRAME, lvl4);
}
}
}
}
//--- Ecouteurs: ---
timer1.addEventListener (TimerEvent.TIMER, stoplvl1);
timer1.start();
//--- Fonctions: ---
function stoplvl1 (e:TimerEvent) :void{
stage.removeEventListener(Event.ENTER_FRAME, moove);
for (L=0; L<tableau1.length ;L++){
for(C=0; C<tableau1[1].length ;C++){
if (tableau1[L][C]==1){
tableau1[L][C]=0;
}
}
}
stage.removeChild(map);
gotoAndStop(4);
}
function collisions (e:Event):void {
if(e.target.hitTestObject(Pac)){
for (L=0; L<tableau1.length ;L++){
for(C=0; C<tableau1[1].length ;C++){
if (tableau1[L][C]==1){
tableau1[L][C]=0;
}
}
}
e.target.nextFrame();
e.target.removeEventListener(Event.ENTER_FRAME, collisions);
points+=1000;
Scorelvl.text = points.toString();
}
}
编辑
根据OP的评论:
我的不同级别(LVL2
,LVL3
,LVL4
)在执行函数LVL2
,LVL3
,LVL4
时未正确初始化,循环范围从第3帧第64行到110行
不创建数组,而是只创建前五列,而不创建其余列。一:在创建级别以下的所有函数中,包括碰撞,您都使用了硬编码tableau1
第二:删除hittest事件中的tableau1
三:如果当前帧不是3,则Pac
对象是未定义的,因为布局是作为关键帧写入的,但您不会删除所有以Pac
为目标的侦听器,只删除附加到碰撞块的侦听器
第四:当您构建数组时,它的长度是5,但是您将行和列从0迭代到长度-1,这导致您的级别只有5列。相反,您需要运行内部循环,直到tableau1[0].length
,就像在碰撞中一样
您确实需要学会调试代码,并跟踪调用内容和从何处调用。大量代码,没有明显错误。这样,就不可能很快得到帮助。试着找出问题的根源,并提出具体问题。我的关键问题是我不能玩所有关卡,也不能在玩完一关后重放一个lvl。只有我的lvl1构建正确…重复问题中包含的内容是没有用的。问题是,level、lvl1、replaying
都是问题域中的单词。它们不是编程常用术语的一部分,我必须通读您的200行代码才能理解它们的含义。没有人会那样做。您必须“翻译”它们,以便不熟悉您的代码的程序员理解,例如:“当我在从到的循环中执行时,我有一个未正确初始化的循环。而不是这种情况:”好的,我尝试了,对不起。在从第64行到第110行的第3帧循环中执行函数LVL2、LVL3、LVL4时,我的差异级别(LVL2、LVL3、LVL4)没有正确初始化。不是创建我的数组,而是只创建前五列。我需要为每个数组创建一个函数“碰撞”?不,您需要一个额外的数组,其中的数据将填入lvl1()
和其他级别的生成函数,然后用于碰撞
和其他函数。谢谢,我不明白我必须在额外数组中放入什么:/I我必须如何处理这个额外数组。
import flash.events.MouseEvent;
ScoreFin.text = points.toString();
btnMenu.addEventListener (MouseEvent.CLICK, retourMenu);
function retourMenu (e:MouseEvent):void{
gotoAndStop(2);
}