-
[help][as2] - removeMovieClip
Hello , firstlly i would like to say my actionscript "skills" are low, but i do best i can, i read a lot of tutorials and threads but canot find the right solution to my problem. so here it is :
mc1 , mc2 , mc3 - when mc1 hit mc2 = mc3 appears on stage , but when mc1 doesnt hit mc2 anymore mc3 dissapears from stage.
this is the code i was working on :
PHP Code:
onClipEvent(enterFrame) {
if (this.hitTest(_root.mc1)) {
_root.attachMovie("mc3", "mc_3", 0, {_x:200, _y:130});
}
if(Key.isDown(Key.DOWN)) {
_root.removeMovieClip("mc3", "mc_3", 0, {_x:200, _y:130});
}
}
but this code dont work,bicus the mc3 not dissapers off the stage althought mc1 and mc2 are not in hittest area anymore.
i know the code i made is wrong but cant find how to make it work, so please
if you know how to make it work take a minut or two and help me out
thank you for time and efford you take !
-
Senior Member
removeMovieClip doesn't work this way. Your line should be
_root.mc_3.removeMovieClip();
-
thank you razorback ! it works now !
-
Senior Member
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
|