• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

1151: A conflict exists with definition count

New Here ,
May 27, 2024 May 27, 2024

Copy link to clipboard

Copied

I have this error on my action script how to solve it?

 1151: A conflict exists with definition count in namespace internal.

var count:Number=0;
stage.addEventListener (Event.ENTER_FRAME,PuzzleLoop);
function PuzzleForLoop(e:Event):void
{

Views

363

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
community guidelines

correct answers 1 Correct answer

Community Expert , Jun 01, 2024 Jun 01, 2024

good to hear (and time was supposed to be timeline)

 

for others, that just confirms there's code in a another main timeline frame with the duplicate declaration.

Votes

Translate

Translate
Community Expert ,
May 28, 2024 May 28, 2024

Copy link to clipboard

Copied

Hi.

 

I cannot say exactly what the issue is because this code is incomplete, but my best guess is that you have code declaring a variable called count in another frame of the same parent/timeline.

 

Please double check and let us know.

 

Regards,

JC

Votes

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
community guidelines
New Here ,
May 28, 2024 May 28, 2024

Copy link to clipboard

Copied

Okay later i will give full code. After i double checked

Votes

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
community guidelines
New Here ,
May 28, 2024 May 28, 2024

Copy link to clipboard

Copied

here is my full code

import flash.events.MouseEvent;
import flash.events.Event;
stop();
 
var count :Number=9; 
stage.addEventListener (Event.ENTER_FRAME,PuzzleForLoop);
function PuzzleForLoop(e:Event):void
{
 
if (count >=9)
{
stage.removeEventListener(Event.ENTER_FRAME, PuzzleForLoop);
item1p_mc.visible= false;
item2p_mc.visible= false;
item3p_mc.visible= false;
item4p_mc.visible= false;
item5p_mc.visible= false;
item6p_mc.visible= false;
item7p_mc.visible= false;
item8p_mc.visible= false;
item9p_mc.visible= false;
gotoAndStop(2);
}
 
}
var orig1A:Number=item1p_mc.x;  
var orig1B:Number=item1p_mc.y;
var orig2A:Number=item2p_mc.x;
var orig2B:Number=item2p_mc.y;
var orig3A:Number=item3p_mc.x;
var orig3B:Number=item3p_mc.y; 
var orig4A:Number=item4p_mc.x;
var orig4B:Number=item4p_mc.y; 
var orig5A:Number=item5p_mc.x;
var orig5B:Number=item5p_mc.y; 
var orig6A:Number=item6p_mc.x;
var orig6B:Number=item6p_mc.y; 
var orig7A:Number=item7p_mc.x;
var orig7B:Number=item7p_mc.y; 
var orig8A:Number=item8p_mc.x;
var orig8B:Number=item8p_mc.y; 
var orig9A:Number=item9p_mc.x;
var orig9B:Number=item9p_mc.y; 
item1p_mc.addEventListener(MouseEvent.MOUSE_DOWN, dragObject);
item1p_mc.addEventListener(MouseEvent.MOUSE_UP, item1p_mcRelease);
item2p_mc.addEventListener(MouseEvent.MOUSE_DOWN, dragObject);   
item2p_mc.addEventListener(MouseEvent.MOUSE_UP, item2p_mcRelease);   
item3p_mc.addEventListener(MouseEvent.MOUSE_DOWN, dragObject);    
item3p_mc.addEventListener(MouseEvent.MOUSE_UP, item3p_mcRelease);    
item4p_mc.addEventListener(MouseEvent.MOUSE_DOWN, dragObject);
item4p_mc.addEventListener(MouseEvent.MOUSE_UP, item4p_mcRelease); 
item5p_mc.addEventListener(MouseEvent.MOUSE_DOWN, dragObject);
item5p_mc.addEventListener(MouseEvent.MOUSE_UP, item5p_mcRelease); 
item6p_mc.addEventListener(MouseEvent.MOUSE_DOWN, dragObject);
item6p_mc.addEventListener(MouseEvent.MOUSE_UP, item6p_mcRelease);  
item7p_mc.addEventListener(MouseEvent.MOUSE_DOWN, dragObject);
item7p_mc.addEventListener(MouseEvent.MOUSE_UP, item7p_mcRelease); 
item8p_mc.addEventListener(MouseEvent.MOUSE_DOWN, dragObject);
item8p_mc.addEventListener(MouseEvent.MOUSE_UP, item8p_mcRelease);  
item9p_mc.addEventListener(MouseEvent.MOUSE_DOWN, dragObject);
item9p_mc.addEventListener(MouseEvent.MOUSE_UP, item9p_mcRelease);  
item1p_mc.buttonMode=true;    
item2p_mc.buttonMode=true;    
item3p_mc.buttonMode=true;
item4p_mc.buttonMode=true;
item5p_mc.buttonMode=true;
item6p_mc.buttonMode=true;
item7p_mc.buttonMode=true;
item8p_mc.buttonMode=true;
item9p_mc.buttonMode=true;
function dragObject(event:MouseEvent):void { 
var item:MovieClip=MovieClip(event.target); 
item.startDrag(); 
var topPos:uint=this.numChildren-1; 
this.setChildIndex(item, topPos);    
}  
 
function item1p_mcRelease(event:MouseEvent):void { 
var item:MovieClip=MovieClip(event.target); 
item.stopDrag();       
if (dropZone1p_mc.hitTestPoint(item.x,item.y)) { 
item.x=dropZone1p_mc.x; 
item.y=dropZone1p_mc.y; 
item1p_mc.buttonMode=false;
item1p_mc.removeEventListener( MouseEvent.MOUSE_DOWN, dragObject );
 
count++;
else { 
item.x=orig1A; 
item.y=orig1B; 
}}    
 
function item2p_mcRelease(event:MouseEvent):void { 
var item:MovieClip=MovieClip(event.target); 
item.stopDrag();   
if (dropZone2p_mc.hitTestPoint(item.x,item.y)) { 
item.x=dropZone2p_mc.x; 
item.y=dropZone2p_mc.y; 
item2p_mc.buttonMode=false;
item2p_mc.removeEventListener( MouseEvent.MOUSE_DOWN, dragObject );
count++;
else { 
item.x=orig2A; 
item.y=orig2B; 
}}    
 
function item3p_mcRelease(event:MouseEvent):void { 
var item:MovieClip=MovieClip(event.target);
item.stopDrag();
if (dropZone3p_mc.hitTestPoint(item.x,item.y)) {
item.x=dropZone3p_mc.x;
item.y=dropZone3p_mc.y;
item3p_mc.buttonMode=false;
item3p_mc.removeEventListener( MouseEvent.MOUSE_DOWN, dragObject );
count++;
} else {
item.x=orig3A;
item.y=orig3B;
}} 
 
function item4p_mcRelease(event:MouseEvent):void { 
var item:MovieClip=MovieClip(event.target); 
item.stopDrag();       
if (dropZone4p_mc.hitTestPoint(item.x,item.y)) { 
item.x=dropZone4p_mc.x; 
item.y=dropZone4p_mc.y;
item4p_mc.buttonMode=false;
item4p_mc.removeEventListener( MouseEvent.MOUSE_DOWN, dragObject );
count++;
else { 
item.x=orig4A; 
item.y=orig4B; 
}} 
 
function item5p_mcRelease(event:MouseEvent):void { 
var item:MovieClip=MovieClip(event.target);
item.stopDrag();
if (dropZone5p_mc.hitTestPoint(item.x,item.y)) {
item.x=dropZone5p_mc.x;
item.y=dropZone5p_mc.y;
item5p_mc.buttonMode=false;
item5p_mc.removeEventListener( MouseEvent.MOUSE_DOWN, dragObject );
count++;
} else {
item.x=orig5A;
item.y=orig5B;
}} 
 
function item6p_mcRelease(event:MouseEvent):void { 
var item:MovieClip=MovieClip(event.target);
item.stopDrag();
if (dropZone6p_mc.hitTestPoint(item.x,item.y)) {
item.x=dropZone6p_mc.x;
item.y=dropZone6p_mc.y;
item6p_mc.buttonMode=false;
item6p_mc.removeEventListener( MouseEvent.MOUSE_DOWN, dragObject );
count++;
} else {
item.x=orig6A;
item.y=orig6B;
}} 
 
function item7p_mcRelease(event:MouseEvent):void { 
var item:MovieClip=MovieClip(event.target);
item.stopDrag();
if (dropZone7p_mc.hitTestPoint(item.x,item.y)) {
item.x=dropZone7p_mc.x;
item.y=dropZone7p_mc.y;
item7p_mc.buttonMode=false;
item7p_mc.removeEventListener( MouseEvent.MOUSE_DOWN, dragObject );
count++;
} else {
item.x=orig7A;
item.y=orig7B;
}} 
 
function item8p_mcRelease(event:MouseEvent):void { 
var item:MovieClip=MovieClip(event.target);
item.stopDrag();
if (dropZone8p_mc.hitTestPoint(item.x,item.y)) {
item.x=dropZone8p_mc.x;
item.y=dropZone8p_mc.y;
item8p_mc.buttonMode=false;
item8p_mc.removeEventListener( MouseEvent.MOUSE_DOWN, dragObject );
count++;
} else {
item.x=orig8A;
item.y=orig8B;
}} 
 
function item9p_mcRelease(event:MouseEvent):void { 
var item:MovieClip=MovieClip(event.target);
item.stopDrag();
if (dropZone9p_mc.hitTestPoint(item.x,item.y)) {
item.x=dropZone9p_mc.x;
item.y=dropZone9p_mc.y;
item9p_mc.buttonMode=false;
item9p_mc.removeEventListener( MouseEvent.MOUSE_DOWN, dragObject );
count++;
} else {
item.x=orig9A;
item.y=orig9B;
}} 
 
 
function checkTheAnswers(event:MouseEvent):void {
if (dropZone1p_mc.hitTestPoint(item1p_mc.x,item1p_mc.y) &&
dropZone2p_mc.hitTestPoint(item2p_mc.x,item2p_mc.y) &&
dropZone3p_mc.hitTestPoint(item3p_mc.x,item3p_mc.y) &&
dropZone4p_mc.hitTestPoint(item4p_mc.x,item4p_mc.y) &&
dropZone5p_mc.hitTestPoint(item5p_mc.x,item5p_mc.y) &&
dropZone6p_mc.hitTestPoint(item6p_mc.x,item6p_mc.y) &&
dropZone7p_mc.hitTestPoint(item7p_mc.x,item7p_mc.y) &&
dropZone8p_mc.hitTestPoint(item8p_mc.x,item8p_mc.y) &&
dropZone9p_mc.hitTestPoint(item9p_mc.x,item9p_mc.y)) {
 
if (count >=8)
{
gotoAndStop(2);
}
} else {
 
}}
function Toreset(event:MouseEvent):void {
item1p_mc.x=orig1A;
item1p_mc.y=orig1B;
item2p_mc.x=orig2A;
item2p_mc.y=orig2B;
item3p_mc.x=orig3A;
item3p_mc.y=orig3B;
item4p_mc.x=orig4A;
item4p_mc.y=orig4B;
item5p_mc.x=orig5A;
item5p_mc.y=orig5B;
item6p_mc.x=orig6A;
item6p_mc.y=orig6B;
item7p_mc.x=orig7A;
item7p_mc.y=orig7B;
item8p_mc.x=orig8A;
item8p_mc.y=orig8B;
item9p_mc.x=orig9A;
item9p_mc.y=orig9B;
item1p_mc.addEventListener(MouseEvent.MOUSE_DOWN, dragObject);
item1p_mc.addEventListener(MouseEvent.MOUSE_UP, item1p_mcRelease);
item2p_mc.addEventListener(MouseEvent.MOUSE_DOWN, dragObject);   
item2p_mc.addEventListener(MouseEvent.MOUSE_UP, item2p_mcRelease);   
item3p_mc.addEventListener(MouseEvent.MOUSE_DOWN, dragObject);    
item3p_mc.addEventListener(MouseEvent.MOUSE_UP, item3p_mcRelease);    
item4p_mc.addEventListener(MouseEvent.MOUSE_DOWN, dragObject);
item4p_mc.addEventListener(MouseEvent.MOUSE_UP, item4p_mcRelease); 
item5p_mc.addEventListener(MouseEvent.MOUSE_DOWN, dragObject);
item5p_mc.addEventListener(MouseEvent.MOUSE_UP, item5p_mcRelease); 
item6p_mc.addEventListener(MouseEvent.MOUSE_DOWN, dragObject);
item6p_mc.addEventListener(MouseEvent.MOUSE_UP, item6p_mcRelease); 
item7p_mc.addEventListener(MouseEvent.MOUSE_DOWN, dragObject);
item7p_mc.addEventListener(MouseEvent.MOUSE_UP, item7p_mcRelease); 
item8p_mc.addEventListener(MouseEvent.MOUSE_DOWN, dragObject);
item8p_mc.addEventListener(MouseEvent.MOUSE_UP, item8p_mcRelease); 
item9p_mc.addEventListener(MouseEvent.MOUSE_DOWN, dragObject);
item9p_mc.addEventListener(MouseEvent.MOUSE_UP, item9p_mcRelease); 
count = 0;
}
 
function itemToRelease(event:MouseEvent):void {
var thisItem:MovieClip = MovieClip(event.target);
thisItem.stopDrag();
if (dropZone1p_mc.hitTestPoint(thisItem.x,thisItem.y)) {
thisItem.x = dropZone1p_mc.x;
thisItem.y = dropZone1p_mc.y;
else if (dropZone2p_mc.hitTestPoint(thisItem.x,thisItem.y)) {
thisItem.x = dropZone2p_mc.x;
thisItem.y = dropZone2p_mc.y;
else if (dropZone3p_mc.hitTestPoint(thisItem.x,thisItem.y)) {
thisItem.x = dropZone3p_mc.x;
thisItem.y = dropZone3p_mc.y;
}
else if (dropZone5p_mc.hitTestPoint(thisItem.x,thisItem.y)) {
thisItem.x = dropZone5p_mc.x;
thisItem.y = dropZone5p_mc.y;
}
else if (dropZone6p_mc.hitTestPoint(thisItem.x,thisItem.y)) {
thisItem.x = dropZone6p_mc.x;
thisItem.y = dropZone6p_mc.y;
}
else if (dropZone7p_mc.hitTestPoint(thisItem.x,thisItem.y)) {
thisItem.x = dropZone7p_mc.x;
thisItem.y = dropZone7p_mc.y;
}
else if (dropZone8p_mc.hitTestPoint(thisItem.x,thisItem.y)) {
thisItem.x = dropZone8p_mc.x;
thisItem.y = dropZone8p_mc.y;
}
else if (dropZone9p_mc.hitTestPoint(thisItem.x,thisItem.y)) {
thisItem.x = dropZone9p_mc.x;
thisItem.y = dropZone9p_mc.y;
}
else if (thisItem==item1p_mc) {
event.target.x = orig1A;
event.target.y = orig1B;
else if (thisItem==item2p_mc) {
event.target.x = orig2A;
event.target.y = orig2B;
else if (thisItem==item3p_mc) {
event.target.x = orig3A;
event.target.y = orig3B;
else if (thisItem==item4p_mc) {
event.target.x = orig4A;
event.target.y = orig4B;
else if (thisItem==item5p_mc) {
event.target.x = orig5A;
event.target.y = orig5B;
else if (thisItem==item6p_mc) {
event.target.x = orig6A;
event.target.y = orig6B;
else if (thisItem==item7p_mc) {
event.target.x = orig7A;
event.target.y = orig7B;
else if (thisItem==item8p_mc) {
event.target.x = orig8A;
event.target.y = orig8B;
else {
event.target.x = orig9A;
event.target.y = orig9B;
}}
 
 
 

Votes

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
community guidelines
Community Expert ,
May 28, 2024 May 28, 2024

Copy link to clipboard

Copied

are you sure all your code is in one frame and one layer?

Votes

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
community guidelines
New Here ,
May 28, 2024 May 28, 2024

Copy link to clipboard

Copied

Nurul30711656tmef_0-1716954489810.png

yes

 

Votes

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
community guidelines
Community Expert ,
May 28, 2024 May 28, 2024

Copy link to clipboard

Copied

take a screenshot (or more than one, if needed) of the entire timeline with your code showing every layer and frame.

Votes

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
community guidelines
New Here ,
May 31, 2024 May 31, 2024

Copy link to clipboard

Copied

Screenshot 2024-06-01 112113.pngScreenshot 2024-06-01 112125.pngScreenshot 2024-06-01 112133.pngScreenshot 2024-06-01 112142.pngScreenshot 2024-06-01 112159.pngScreenshot 2024-06-01 112207.pngScreenshot 2024-06-01 112215.pngScreenshot 2024-06-01 112221.pngScreenshot 2024-06-01 112227.png

Votes

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
community guidelines
Community Expert ,
May 31, 2024 May 31, 2024

Copy link to clipboard

Copied

your main time has one frame?

Votes

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
community guidelines
New Here ,
May 31, 2024 May 31, 2024

Copy link to clipboard

Copied

i dont understand the meaning of your question main time?

 

 

Votes

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
community guidelines
New Here ,
May 31, 2024 May 31, 2024

Copy link to clipboard

Copied

its okay thank you, the problem just fixed right now

 

Votes

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
community guidelines
New Here ,
May 31, 2024 May 31, 2024

Copy link to clipboard

Copied

i just change the variable name to 'totalCount'

Votes

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
community guidelines
Community Expert ,
Jun 01, 2024 Jun 01, 2024

Copy link to clipboard

Copied

LATEST

good to hear (and time was supposed to be timeline)

 

for others, that just confirms there's code in a another main timeline frame with the duplicate declaration.

Votes

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
community guidelines
Community Expert ,
May 28, 2024 May 28, 2024

Copy link to clipboard

Copied

or the same frame.

 

1151: A conflict exists with definition xxxx in namespace internal.

You have more than one of the following statements in the same scope:

var xxxx:SomeClass;

// and/or

var xxxx:SomeClass = new SomeClass();

To remedy, change all but the first  to:

xxxx = new SomeClass();

Votes

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
community guidelines
New Here ,
May 28, 2024 May 28, 2024

Copy link to clipboard

Copied

Okay thank you for the respond, i will changed it first.

Votes

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
community guidelines
Community Expert ,
May 28, 2024 May 28, 2024

Copy link to clipboard

Copied

you're welcome.

Votes

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
community guidelines