Hi,
I am trying to create a reset button for movieclips I have cloned.
Here’s my code which is on frame 1
_root.green.onPress = function() {
_root.i++;
clone = _root.green.duplicateMovieClip("green"+_root.i, _root.i, _root.i, _root.i, _root.i);
clone.startDrag();
clone.onMouseUp = function() {
stopDrag();
};
};
On my movieclip I have the instance “green” and the following code on it:
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse, false)) {
this.startDrag();
}
}
onClipEvent (mouseUp) {
if (this.hitTest(_root._xmouse, _root._ymouse, false)) {
this.stopDrag();
}
}
On frame 1 where I have my main actionscript, I have created a reset button but don’t know how to code it so that all the cloned objects will disappear and reset to the original state.
I also wanted a save button. The purpose of the file is, am creating a chart where the user has the option to drap and drop the boxes from the side to create a chart. Once they created it, then should be able to reset and save- perhaps in an xml format.
I have been trying to create the clone function for flash player 8+ but it doesn’t work and this code only works for flash player 6.
Any suggestions or help?
Thanks in advance