PDA

View Full Version : Remove movie clips


amcquade
10-24-2004, 09:58 PM
I trying to use the code by Ben Lowry on how to create a sequence of bubbles, which can be found at:

http://www.actionscript.org/showMovie.php?id=1078

I created a button for my users to place bubbles onto the stage:

on (release) {
part3.attachMovie("b4","Bubbles2", 1);
}

But I can't seem to create the opposite effect where they can take it off. I've tried many things including:

on (release) {
part3.Bubbles2.removeMovieClip();
}

//or

for(i=0; i< _root.bubbles.length; ++i) {
removeMovieClip(_root["Bubbles2"+i]);
}

----------

Am I barking up the wrong tree with the remove movie clip command?

Many thanks in advance.

Al

skjc
11-08-2004, 07:30 PM
Hi Alicia,

I have attached a solution which loads bubbles as an external swf, attatches it via a button to an empty clip and then unloads it via another button.

I have included the bubbles.fla as well as you have to include another line of script on the first frame on the main timeline as follows

this._lockroot = true;

I would give you an explanation but it will be easier to look it up (mail me if u get stuck). I have changed the colour of the bubbles so they are easier to see.


Steve

amcquade
11-09-2004, 06:14 PM
Hi Steve,

I guess these are MX2004, I'm on MX. Any chance...? Cheeky I know...

Many thanks in advance.

A

skjc
11-09-2004, 06:59 PM
no problem

amcquade
11-09-2004, 10:33 PM
Can't make it work! I put the line:

this._lockroot = true;

onto the main time line of the bubbles fla. I exported files to the same directory and checked the file names with the actionscript. I'm being thick aren't I?

Thanks for putting up with me!

Al

skjc
11-09-2004, 10:55 PM
Don't worry.

1. Ok the fla's I attach work ok for me did you run them and is it what you are after?
2. If so then send my your work (mail me) and I will have a look at it (unless it is top secret).

skjc
11-09-2004, 11:13 PM
here is an example - let me know if it is what u want

http://www.barkerfamily.plus.com/

amcquade
11-15-2004, 06:34 PM
Hi Steve,

still can't seem to get it to work but that's because I'm a complete spaz. Nothing top secret at all, please visit:

www.swimtrainers.com/mm/swimart/7.php

There's a refresh button that does the trick, hopefully the 5 and 6 year olds will not notice.

Thanks for your help!

Al

skjc
11-17-2004, 07:57 AM
Al that link does not work for me ?

skjc
11-17-2004, 08:01 AM
Ok got it now. Could you send me the fla and I will have a look at it? Either post it to me or drop it on here.

Steve