Link to home
Create AccountLog in
Avatar of justkrissy
justkrissy

asked on

Remove clip and begin another clip by pressing button

At the end of a movie clip, I have a button.  The button has the following action script assigned to it:

on (release) {
      _root.unloadClip("BlueBall1hit");
      _root.attachMovie("PuttingValues", "PuttingValues_mc", 2);
}

I want to run the "PuttingValues" clip when the button is pressed.  This works for me by only using the second line of the script, however, I can still see the clip "BlueBall1hit" behind it.  So, I tried adding the first line of script to remove "BlueBall1hit".  This didn't work.

What script should I use so that only the "PuttingValues" clip is displayed?

Thanks in advance!
ASKER CERTIFIED SOLUTION
Avatar of Montoya
Montoya

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of justkrissy
justkrissy

ASKER

I tried both:

on (release) {
     _root.unloadMovieClip("BlueBall1hit");
     _root.attachMovie("PuttingValues", "PuttingValues_mc", 2);
}

and:

on (release) {
     _root.removeMovieClip("BlueBall1hit");
     _root.attachMovie("PuttingValues", "PuttingValues_mc", 2);
}

and got the same results.  I can still see the first movie in the background.

Any other suggestion?  Or is it maybe because I'm using _root?  

Thanks!!
SOLUTION
Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
SOLUTION
Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.