[RESOLVED] How do we isolate the link name for attachmovie
For simplicity sake, I created a movie which has a attachmovie in it.
LinkName: SCK
Code:
#initclip
var s = new MovieClip();
s.init=function(){
this.v1;
}
Object.SCK = function(){}
Object.SCK.prototype = s;
Object.registerClass('cSCK',Object.SCK);
delete s;
#endinitclip
Now, if I create another move and add this swf movie to it and the attachment(symbols) are also loaded. If I try to use the attachmovie link name with script in the new movie it interfers with the first movie swf.
The only way to separate the two symbol library script logic is to change the object name as follows.
Linkname: mSCK
Code:
#initclip
var s = new MovieClip();
s.init=function(){
this.v1;
}
Object.mSCK = function(){}
Object.mSCK.prototype = s;
Object.registerClass('mSCK',Object.mSCK);
delete s;
#endinitclip
How do I setup the script so that I can use it in any movie clip so that it is independent, without having to change the object name. This would be just like the KC8 components. I can add as many buttons as I like to each movie, as long as I identify them different names.
Hopefully, this is not confusing. Any suggestions would be great.
If I create a new .fun file and choose 'Insert KoolMoves Movie' to insert your .fun file it is merged into the new file as expected. I also don't see any place where you have used attachMovie. You only dragged an instance to the stage.
Your correct. If I wanted to import the symbol library from another movie such as this one and use it in the current movie AND add the swf file that contains same coding then the problem occurs. I would need to show you alot more of the applications involved.
Basically, I am tring to build an xmlsocket mc which I can use in any movie clip. I would like to be able to drop it on any movie and supply the properties and allow it to make calls to the server.