A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: duplicate movie clip loading twice

  1. #1
    Senior Member
    Join Date
    Jul 2003
    Posts
    156

    duplicate movie clip loading twice

    Does anyone know why my duplicate mcs are loading twice? I have a script that duplicates a set of mcs and then a script that runs some functions on those movie clips, however after everything is done the duplicated mcs are loading again negating the implementation of the functions.

    thanks

  2. #2
    Between Flash & Flashkit timothye's Avatar
    Join Date
    Dec 2003
    Location
    Sweden
    Posts
    1,666
    well whats the code ?
    I want to learn .
    wannabe flasher [ Actionscript 2.0 ]

  3. #3
    Between Flash & Flashkit timothye's Avatar
    Join Date
    Dec 2003
    Location
    Sweden
    Posts
    1,666
    whats the code ?
    then we can help you out !

    sorry for the double post
    I want to learn .
    wannabe flasher [ Actionscript 2.0 ]

  4. #4
    Senior Member
    Join Date
    Jul 2003
    Posts
    156
    i was hoping that someone would be able to tell me about some sort of bug with flash that causes the double duplication.

    this is on the frame where everything initializes...

    function createPocketClips(){
    if(view_array[m] == "0") {
    duplicateMovieClip(mcVests.mcVestFront.mcFrontPosi tions["mcPosition" + position_array[m]].mcFrontPockets, "mcFrontPockets" + m, depth);
    loadMovie(sku_array[m] + ".swf", mcVests.mcVestFront.mcFrontPositions["mcPosition" + position_array[m]]["mcFrontPockets" + m]);
    }else if(view_array[m] == "1"){
    duplicateMovieClip(mcVests.mcVestBack.mcBackPositi ons["mcPosition" + position_array[m]].mcBackPockets, "mcBackPockets" + m, depth);
    loadMovie(sku_array[m] + ".swf", mcVests.mcVestBack.mcBackPositions["mcPosition" + position_array[m]]["mcBackPockets" + m]);
    }
    depth++;
    setCords();
    }

    function setCords(){
    for(a = 0; a < act_pos_length; a++) {
    if(position_array[m] == act_pos_array[a]) {
    if(view_array[m] == "0") {
    mcVests.mcVestFront.mcFrontPositions["mcPosition" + act_pos_array[a]]["mcFrontPockets" + m]._x = x_cord_array[a];
    mcVests.mcVestFront.mcFrontPositions["mcPosition" + act_pos_array[a]]["mcFrontPockets" + m]._y = y_cord_array[a];
    }else if(view_array[m] == "1"){
    mcVests.mcVestBack.mcBackPositions["mcPosition" + act_pos_array[a]]["mcBackPockets" + m]._x = x_cord_array[a];
    mcVests.mcVestBack.mcBackPositions["mcPosition" + act_pos_array[a]]["mcBackPockets" + m]._y = y_cord_array[a];
    }
    }
    }
    }

    function makeButton(){
    duplicateMovieClip(mcButtons.mcButtons2.cow, "button" + m, depth);
    mcButtons.mcButtons2["button" + m]._y = yPosition;
    mcButtons.mcButtons2["button" + m].bName2 = name_array[m];
    mcButtons.mcButtons2["button" + m].bName = name_array[m];
    yPosition = yPosition + 15;
    depth++;
    setButtonVars();
    }

    function setButtonVars(){
    mcButtons.mcButtons2["button" + m].posClip = ["mcPosition" + position_array[m]];
    mcButtons.mcButtons2["button" + m].pos = position_array[m];
    mcButtons.mcButtons2["button" + m].id = m;
    mcButtons.mcButtons2["button" + m].bStatus = status_array[m];
    init_array_length = init_array.length;
    if(status_array[m] == "1"){
    init_array[init_array_length] = "button" + m;
    }
    }

    //create pocket movie clips
    for(m = 0; m < num_prods; m++){
    createPocketClips();
    makeButton();
    }

    in the next frame....

    for(i = 0; i < init_array.length; i++){
    mcButtons.mcButtons2[init_array[i]].init();
    }

    stop();


    the original pocket movie clip that is duplicated has...

    onClipEvent(load){
    this._visible = 0;
    }

    then the above init function turns certain pockets visible however after all of the above code has run the duplicated clips load again turning the visible pockets invisible again

    this is of course incomplete, i've left out all the creation of arrays and such.

  5. #5
    Senior Member
    Join Date
    Jul 2003
    Posts
    156
    Still looking for help on this if anyone has an insight.

    Thanks

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