A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: [RESOLVED] How do we isolate the link name for attachmovie

  1. #1
    Senior Member
    Join Date
    Dec 2006
    Location
    Jax, FL
    Posts
    110

    resolved [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.

  2. #2
    Senior Member
    Join Date
    Dec 2002
    Location
    Netherlands
    Posts
    1,632
    It's a bit hard this way to tell what the problem is.
    Can you post the .fun file or a link to it ?

  3. #3
    Senior Member
    Join Date
    Dec 2006
    Location
    Jax, FL
    Posts
    110

    Link file for xmlsocket

    Here is the link file.
    Attached Files Attached Files

  4. #4
    Senior Member
    Join Date
    Dec 2002
    Location
    Netherlands
    Posts
    1,632
    I don't understand the problem.

    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.

  5. #5
    Senior Member
    Join Date
    Dec 2006
    Location
    Jax, FL
    Posts
    110
    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.

  6. #6
    Senior Member
    Join Date
    Dec 2006
    Location
    Jax, FL
    Posts
    110
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center