|
-
[RESOLVED] [help] attach and remove mc
i got a problem in my game. i want to check if a ball is below a line and if it does, it should attach a ball to another mc and reomve itself. the porblem is that it seems to remove both. here is the code:
code:
_x += Math.round(Math.random()*4)-2;
_y += 2;
if (_y>300) {
_root.snow.i++;
_root.snow.attachMovie("snow2", "s"+_root.snow.i, _root.snow.i);
_root.snow["s"+_root.snow.i]._x = _x;
trace(_root.snow["s"+_root.snow.i]._x);
_root.snow["s"+_root.snow.i]._y = _y;
_root.snow["s"+_root.snow.i].gotoAndStop(2);
removeMovieClip(this);
}
this is in hte first frame (because it is attached). any help please
-
Senior Member
Cant see anything wrong with your code.
-
if i create an mc and let the movie play to the end (so it goes back to the begining), is the created mc destroyed?
*edit* fixed. seems like if u give the attached mc a depth of less than 0 it will be removed at the end of the frame.
-
Senior Member
Originally posted by Ihoss
if i create an mc and let the movie play to the end (so it goes back to the begining), is the created mc destroyed?
No. You have to remove it by code.
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
|