Highlighted

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

New Here ,
Jun 30, 2020

Copy link to clipboard

Copied

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

TOPICS
ActionScript, Code

Views

62

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

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

New Here ,
Jun 30, 2020

Copy link to clipboard

Copied

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

TOPICS
ActionScript, Code

Views

63

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Jun 30, 2020 0
Adobe Community Professional ,
Jun 30, 2020

Copy link to clipboard

Copied

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.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jun 30, 2020 0
New Here ,
Jun 30, 2020

Copy link to clipboard

Copied

I'll try, thanks for your response

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jun 30, 2020 0
Adobe Community Professional ,
Jun 30, 2020

Copy link to clipboard

Copied

you're welcome.

 

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

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jun 30, 2020 0
New Here ,
Jun 30, 2020

Copy link to clipboard

Copied

thanks for the offer,

and this time I've done what you said,
There are no compile errors and problems in the output,

apparently previously caused by:

 

setup ();

 

at the end of the script, but the movie clip game that I made still can't work, what should I do?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jun 30, 2020 0
kglad LATEST
Adobe Community Professional ,
Jul 02, 2020

Copy link to clipboard

Copied

this is an excerpt from Flash Game Development: In a Social, Mobile and 3D World

 

Most ActionScript programming errors trigger a Flash error message, either a compile-time error or a run-time error. However, some errors do not trigger a Flash message.


These errors are the result of some combination of faulty logic and a failure to understand how Flash/ActionScript works. I discuss the more common of these errors in Appendix B.


But whether you encounter a common error or an uncommon one, they can still be debugged using the trace() function. Generally, your code will work up until a certain point and then fail. That failure point is the place to start using the trace() function to debug your error.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 02, 2020 0