Skip to main content
Participant
June 30, 2020
Question

Please help Error # 2109: The null label frame was not found in the null scene.

  • June 30, 2020
  • 1 reply
  • 571 views

excuse me, I'm in the middle of confusion because of this :


ArgumentError: Error # 2109: The null label frame was not found in the null scene.
at flash.display :: MovieClip / gotoAndStop ()
at _2411417040_Melinda_fla :: MainTimeline / showSoal ()
at _2411417040_Melinda_fla :: MainTimeline / setup ()
at _2411417040_Melinda_fla :: MainTimeline / frame86 ()
at flash.display :: MovieClip / gotoAndStop ()
at _2411417040_Melinda_fla :: MainTimeline / check Transition ()

 

even though the code is just copy-paste from what my lecturer gave me and adjust the frame, but why doesn't it still work the way I want it?

 

The codes are like this :

import flash.events.MouseEvent;

stop();
var nilai:int = 0;
var nomorSoal:int = 0;
var soalMaks:int = 10;
var hasil:hasil_mc;

var soal:Array =[["Tebak", "D", "Q", "P","C"],
["Tebak", "G", "N", "Z", "S"],
["Tebak", "Q", "P", "J", "O"],
["Tebak", "Iga", "Iya", "Itu", "Dia"],
["Tebak", "Abu", "Aku", "Aji", "Aki"],
["Tebak", "Senin besok", "Senin lusa", "Selasa besok", "Selasa kemarin"],
["Tebak", "Kemarin Jum'at", "Kemarin Minggu", "Jum'at kemarin", "Jum'at Minggu"],
["Tebak", "2 minggu", "2000", "200", "2 hari"],
["Tebak", "Rakun", "Panda", "Semut", "Macan"],
["Tebak", "Pelangi", "Pejabat", "Pejalan", "Pelayan"]];

var tempSoal:Array;
var tempJawaban:Array;
var gameAktif:Boolean = true;
var fps:int = 30;

function acakSoal():void{

tempSoal = soal.slice(0, soal.length);
for (var i:int = 0; i < soal.length; i++){
var acak:int = Math.floor(Math.random()*soal.length);
var temp:Array = tempSoal[acak];
tempSoal[acak] = tempSoal[i];
tempSoal[i] = temp;
}
}

function tampilkanSoal():void{
gambarMc.gotoAndStop(tempSoal[nomorSoal][10]);
soalTxt.text = tempSoal[nomorSoal][0];
tempJawaban = tempSoal[nomorSoal].slice(1, 5);
for (var i:int = 0; i < tempJawaban.length; i++){
var acak:int = Math.floor(Math.random()*tempJawaban.length);
var temp:String = tempJawaban[acak];
tempJawaban[acak] = tempJawaban[i];
tempJawaban[i] = temp;
}
jawab1.jawabanTxt.text = tempJawaban[0];
jawab2.jawabanTxt.text = tempJawaban[1];
jawab3.jawabanTxt.text = tempJawaban[2];
jawab4.jawabanTxt.text = tempJawaban[3];
}

function setup():void{
acakSoal();
tampilkanSoal();

jawab1.stop();
jawab2.stop();
jawab3.stop();
jawab4.stop();
jawab1.addEventListener(MouseEvent.CLICK, cekJawaban);
jawab2.addEventListener(MouseEvent.CLICK, cekJawaban);
jawab3.addEventListener(MouseEvent.CLICK, cekJawaban);
jawab4.addEventListener(MouseEvent.CLICK, cekJawaban);

jawab1.addEventListener(MouseEvent.MOUSE_OVER, mouseOver);
jawab2.addEventListener(MouseEvent.MOUSE_OVER, mouseOver);
jawab3.addEventListener(MouseEvent.MOUSE_OVER, mouseOver);
jawab4.addEventListener(MouseEvent.MOUSE_OVER, mouseOver);

jawab1.addEventListener(MouseEvent.MOUSE_OUT, mouseOut);
jawab2.addEventListener(MouseEvent.MOUSE_OUT, mouseOut);
jawab3.addEventListener(MouseEvent.MOUSE_OUT, mouseOut);
jawab4.addEventListener(MouseEvent.MOUSE_OUT, mouseOut);
}

function mouseOver(e:MouseEvent):void{
e.currentTarget.gotoAndStop(2);
}

function mouseOut(e:MouseEvent):void{
e.currentTarget.gotoAndStop(1);
}

function cekJawaban(e:MouseEvent):void{
var nomorJawaban:int = int(e.currentTarget.name.substr(5))-1;
if (tempJawaban[nomorJawaban] == tempSoal[nomorSoal][1]){
//jawaban benar
tampilkanHasil(1);
nilai+=10;
}else{
//jawaban salah
tampilkanHasil(2);
}
}

function tampilkanHasil(tp:int):void{
hasil = new hasil_mc;
hasil.x = 400;
hasil.y = 240;
hasil.gotoAndStop(tp);
hasil.scaleX = 0.2;
hasil.scaleY = 0.2;
hasil.tp = tp;
hasil.addEventListener(Event.ENTER_FRAME, efekPopup);
addChild(hasil);
//reset timer
gameAktif = false;
}

function efekPopup(e:Event):void{
var ob:Object = e.currentTarget;
if (ob.scaleX < 1){
ob.scaleX+=0.1;
ob.scaleY+=0.1;
}
}


setup();

function setupScore():void{
score_txt.text = String(nilai);
restart_btn.addEventListener(MouseEvent.CLICK, halamanAwal);
}

function halamanAwal(e:MouseEvent):void{
restart_btn.removeEventListener(MouseEvent.CLICK, halamanAwal);
gotoAndStop(1);
}

setupScore();

 

That's all, hoping for some fast resp thank you

This topic has been closed for replies.

1 reply

kglad
Community Expert
Community Expert
June 30, 2020

the problematic line of code is in showSoal().

 

click file>publish settings and tick "permit debugging" so you can see the exact line of code with the error.

melinda14Author
Participant
June 30, 2020

I'll try, thanks for your response

kglad
Community Expert
Community Expert
June 30, 2020

you're welcome.

 

if you need more help, copy and paste the problematic line of code.