A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: clearing duplicate movie clips . HELP!!!

  1. #1
    Junior Member
    Join Date
    Jan 2005
    Posts
    19

    clearing duplicate movie clips . HELP!!!

    ive got a file which involves dragging movie clips (which duplicate) onto other parts of the stage..

    how do i clear all duplicated moveiclips from the stage when a click my button (named 'ok')..

    please heeeeelppp!!!

    viktajatt

  2. #2
    Member
    Join Date
    Oct 2004
    Location
    New York
    Posts
    31
    how are you duplicating the movie clips post some codes
    There is only one way to tell the truth and that's to tell no one.

  3. #3
    Junior Member
    Join Date
    Jan 2005
    Posts
    19
    hey litter bug....


    well basically im duplicating movie clips (of coins) and dragging them onto a table (also a movie clip) - as im dragging these clips a variable (penceupdate) increments according to the value of the coins(clips)..

    now i have a button (called kill) and once i press it i want the coins which have been dragged to the table ( the duplicated coins) to clear and the variable pence update to reset to 0.

    heres the code on the coin movie clip...



    onClipEvent (load) {
    function drop(){
    stopDrag();
    if (this._droptarget == "/wood") {
    // add score
    _root.penceupdate = _root.penceupdate+50;
    //dont allow draggin
    table = true;
    _global.dragClips.push(this);
    } else {
    this.removeMovieClip();
    setProperty(this, _x, xloc);
    setProperty(this, _y, yloc);
    }
    //trace(this.duplicateMovieClip("50p"+clones,clones) );
    }
    }


    on (press) {
    if(!table){
    _global.clones++;
    this.duplicateMovieClip ("50p"+clones,clones);


    startDrag(this);

    xloc = this._x;
    yloc = this._y;
    }

    }
    on (release) {

    thisClip = duplicatedMovieClip("50p"+clones,clones);
    dragClips.push(thisClip);

    if(!table){ drop() };
    }
    on (releaseOutside) {
    if(!table){ drop() };
    }



    and here the current code on the kill button :-



    on(release){
    //trace(dragClips)
    for(i in dragClips){
    dragClips.removeMovieClip();
    }
    _global.dragClips = []; //clear the list

    if(a==penceupdate){right ++}
    penceupdate = 0;
    yo();

    }



    and on frame 1 i have the code :-



    _global.dragClips = new Array();



    the coins are dragging ok but the kill button is not cleaqring the duplicated clips from the stage....

    whats goin on????????????

  4. #4
    Member
    Join Date
    Jan 2005
    Posts
    35

    hey sup

    i was looking at your codes but am lost why did you increment penceUpdate to +50 i need to see what is it you doin can you post your flat, i have flash mx 2004 and flash so feel free to used either version....
    Post no bills

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