-
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
-
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.
-
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????????????
-
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....
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
|