dcsimg
A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: [help][as2] - removeMovieClip

  1. #1
    Junior Member
    Join Date
    Aug 2009
    Posts
    5

    [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 !

  2. #2
    Senior Member fil_razorback's Avatar
    Join Date
    Jul 2005
    Location
    Paris, France
    Posts
    607
    removeMovieClip doesn't work this way. Your line should be
    _root.mc_3.removeMovieClip();

  3. #3
    Junior Member
    Join Date
    Aug 2009
    Posts
    5
    thank you razorback ! it works now !

  4. #4
    Senior Member fil_razorback's Avatar
    Join Date
    Jul 2005
    Location
    Paris, France
    Posts
    607
    'my pleasure =)

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