|
-
[F8] name conflict
I constantly get this error message:
The name of this class, 'bubbleClass', conflicts with the name of another class that was loaded, 'bubbleClass'.
class bubbleClass extends MovieClip {
I have a mc in my library that uses this class and i attach some copies of this mc in the first frame of the _root.
It has worked before, but now I had to rewrite the code a bit and then this error started popping up. Sometimes it works if I close the project and open it up again.
But I can't see what in my code that causes it. I add some code and the errors apear. I remove the added code again, but the error is still there...
What I need to do is to create a movieclip in the class bubblClass with create emptyMovieClip... What I've tried so far is this (I may have errors in the code, but it has been impossible for me to debug since I only get the error mentioned)
Code:
class bubbleClass extends MovieClip {
var xpos:Number;
var ypos:Number;
var country:String;
var city:String;
var syseTitle:String;
var phone:String;
var address:String;
var pointer:MovieClip = this.createEmptyMovieClip("arrow", this.getNextHighestDepth());
public function onLoad() {
//trace("hello?");
this.pointer.beginFill(0xFF0000);
this.pointer.lineTo(xpos,ypos);
this.pointer.lineTo(100,0);
this.pointer.lineTo(0,0);
this.pointer.endFill();
}
}
-
Registered User
hi bitcomplex,
Welcome to FlashKit.
The only problem I see is the case of the class, which should start with upper case: BubbleClass not bubbleClass (just like the .as file where you define it).
-
Hi and thanks for your welcome. I've been here a lot before, but of some unknown reason my emailadress got banned (I swear I've allways behaved ) when I tried to log in some months ago. Then I registered under a different name, but somehow I have no rights to post in the forums with this username . This time around it worked though...
Anyway I don't think that the classes need a uppercase first letter, but I changed it anyhow. Still doesn't work. I had one syntax error and that was creating the movieclip in the class definition and not in the onLoad() handler. But changing this donät work either.
The movie workes as supposed, but the onLoad() function is never called...
I donät know if there is anything wrong in the code where I attach the movieclip to the movie? :
Code:
var file = new XML();
file.ignoreWhite = true;
file.onLoad = function(success) {
for (var i = 0; i < file.firstChild.childNodes.length; i++) {
var theLocation:XMLNode = file.firstChild.childNodes[i];
_root.attachMovie("_location",
"loc"+i+"_mc",
_root.getNextHighestDepth(),
{
_x:(theLocation.attributes.xpos == undefined ? 0 : Number(theLocation.attributes.xpos)),
_y:(theLocation.attributes.ypos == undefined ? 0 : Number(theLocation.attributes.ypos)),
bubble:"bubble"+i+"_mc"
}
);
Bubble(_root.attachMovie("bubbleMC",
"bubble"+i+"_mc",
_root.getNextHighestDepth(),
{
_visible:false,
_x:0,
_y:300,
xpos:(theLocation.attributes.xpos == undefined ? 0 : Number(theLocation.attributes.xpos)),
ypos:(theLocation.attributes.ypos == undefined ? 0 : Number(theLocation.attributes.ypos)),
city:(theLocation.attributes.city == undefined ? "" : theLocation.attributes.city.toUpperCase()),
country:(theLocation.attributes.country == undefined ? "" : theLocation.attributes.country),
syseTitle:(theLocation.attributes.syseTitle == undefined ? "" : theLocation.attributes.syseTitle),
phone:(theLocation.attributes.phone == undefined ? "" : theLocation.attributes.phone),
address:(theLocation.attributes.address1 == undefined ? "" : theLocation.attributes.address1 + (theLocation.attributes.address2 == undefined ? "" : "\n" + theLocation.attributes.address2))
}
));
}
};
file.load("locations.xml");
-
now... all of a sudden, it works... i have no idea why since I havnät closed the project or anything sine I last tried it... my guess is that the class wasnät cleared from memory? Is that possible?
-
Registered User
I've read about problems with classes and different time zones and I've had problems with classes working over a network...
-
code: **Error** U:\flash\syse\Bubble.as: Line 1: The name of this class, 'Bubble', conflicts with the name of another class that was loaded, 'Bubble'.
class Bubble extends MovieClip {
Total ActionScript Errors: 1 Reported Errors: 1
I get this error message everytime I have an error (compile or runtime error) in the Bubble class. When I fix the error or revert the file to it's original, the error message won't dissapear.
The only thing I can think of is that the class is loaded in memory and is cached or something... Is there no way to fix this?
Btw, I use Flash 8 Basic if it got something to do with it...
This is really bugging me since I can't do anything while the error-message is there...
-
Registered User
This is what I mentioned, but there is a lot of people having the same problem.
-
Yes, that's what I'm experience. The only difference is that I'm on the same machine all the time... It takes approx 5 minutes and then I can work with the file again...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|