# Remove the previous swf file

**URL:** https://forum.kirupa.com/t/remove-the-previous-swf-file/55871
**Category:** Uncategorized
**Created:** [June 28, 2004, 6:00pm UTC](https://forum.kirupa.com/t/remove-the-previous-swf-file/55871 "2004-06-28T18:00:07Z")
**Posts on this page:** 18
**Page:** 1

<div class="post-metadata">

### Author: ![rekin\_ball](https://avatars.discourse-cdn.com/v4/letter/r/d2c977/32.png) [@rekin\_ball](https://forum.kirupa.com/u/rekin_ball)
#### Post date: [June 28, 2004, 6:00pm UTC](https://forum.kirupa.com/t/remove-the-previous-swf-file/55871/1 "2004-06-28T18:00:07Z")

</div>

Hello,  
I have created a series of about 7 swf files that make up the individual pages of my site.  
I am using the following code on buttons to load my swfs…

on (release) {  
contents.loadMovie(“mymovie.swf”);  
}

The problem is that all the buttons from the previous pages are still active and if you happen to mouse over the area where a button was on a previous page the hand appears and you can click on it.

Is there a way to remove the previous swf file when you load the next swf file.

I tried the following with no success…

on (release) {  
contents.loadMovie(“nextmovie.swf”);  
}

on (release) {unloadMovie(“currentmovie.swf”);

}

Any other suggestions?  
Heres a link to the site if it helps

[www.stephenlewisstudio.com](http://www.stephenlewisstudio.com)

Thanks!  
christina

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [July 6, 2004, 9:41pm UTC](https://forum.kirupa.com/t/remove-the-previous-swf-file/55871/2 "2004-07-06T21:41:36Z")

</div>

So here are the fla’s  
I hope that they are not to complicated. I am not the most advanced flash person.  
Thanks for giving this a try…

In this site each section has it’s own fla. (Kind of like an html site)  
And the actions are contained in the buttons.  
The index page might be a little confusing, but the rest of the files should be easy to understand. I hope!

So I have an index.fla (contains the splash intro), site.fla (contains just the navigation), bio.fla(the bio page) contact.fla (contact page) recent.fla (recent work), etc…

I hope this makes it a little easier to understand.

Just go to…  
[http://www.stephenlewisstudio.com/fla](http://www.stephenlewisstudio.com/fla)

Thank you so much!  
cr

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [July 6, 2004, 9:49pm UTC](https://forum.kirupa.com/t/remove-the-previous-swf-file/55871/3 "2004-07-06T21:49:32Z")

</div>

It’s kinda late now, I’ll have a look tomorrow:)

scotty(-:

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [July 6, 2004, 10:00pm UTC](https://forum.kirupa.com/t/remove-the-previous-swf-file/55871/4 "2004-07-06T22:00:02Z")

</div>

Thanks!

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [July 7, 2004, 12:46am UTC](https://forum.kirupa.com/t/remove-the-previous-swf-file/55871/5 "2004-07-07T00:46:45Z")

</div>

Hey, I’ve had a look over the .fla files, and I do have 1 suggestion, don’t have all the separate files. It’s a good idea to have the preloader on a separate one, but personally, I’ve found that it’s easier to have it all on one file, and that often involves making more movieclips, it just makes it easier not only to combine things, but to edit. I have started working on this, I will let you know when I finish, and see what you think of it.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [July 7, 2004, 1:05am UTC](https://forum.kirupa.com/t/remove-the-previous-swf-file/55871/6 "2004-07-07T01:05:10Z")

</div>

What are the fonts you have used? I’ve worked out that the title is Perpetua Titling MT, but i cant find the other one, if you could please upload the .ttf file, that would be good. Thanks…

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [July 7, 2004, 1:41am UTC](https://forum.kirupa.com/t/remove-the-previous-swf-file/55871/7 "2004-07-07T01:41:12Z")

</div>

It might not be unloading the clips because their references are getting lost when th other clips load over the top of them

try this:  
on (release) {  
contents.unloadMovie(“assignment.swf”);  
contents.loadMovie(“clients.swf”);  
}

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [July 7, 2004, 1:46am UTC](https://forum.kirupa.com/t/remove-the-previous-swf-file/55871/8 "2004-07-07T01:46:43Z")

</div>

argh… this is stupidity… I cannot do this for some reason, It isn’t letting me move things from one library into another, I can’t do this, sorry, I tried 🙂

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [July 7, 2004, 3:31am UTC](https://forum.kirupa.com/t/remove-the-previous-swf-file/55871/9 "2004-07-07T03:31:17Z")

</div>

ah! a flash of inspiration! (no pun intended)  
to get rid of those buttons that aren’t meant to be there, if you put a blank frame or duplicate frame with no buttons after it, with the command something like:  
gotoAndPlay(x);  
which would obviously do as it says, and should get rid of the phantom buttons…

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [July 7, 2004, 12:53pm UTC](https://forum.kirupa.com/t/remove-the-previous-swf-file/55871/10 "2004-07-07T12:53:10Z")

</div>

I had a look at your files, the problem with the bottom is due to the fact that you load eveything on top of each other. So the suggestions in previous post aren’t working, because the buttons aren’t in the content mc.  
I’ve made a litlle different setup (for index/site/portfolio and personal). All the buttons are now mc’s, he code you can find in the action layer(s).  
In this setup, only the necessary buttons are in the fla.  
Lean back, have a look and if you have questions, feel free to ask:)  
You can find the files here:  
[zip (4.7 MB)](http://home.wanadoo.nl/gertvinke/kirupa/Reckinball.zip)

scotty(-:

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [July 7, 2004, 1:34pm UTC](https://forum.kirupa.com/t/remove-the-previous-swf-file/55871/11 "2004-07-07T13:34:13Z")

</div>

Thanks for all your help everyone!  
I am trying some things out right now, hopefully it all works out.  
Thanks again,  
cr

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [July 7, 2004, 4:51pm UTC](https://forum.kirupa.com/t/remove-the-previous-swf-file/55871/12 "2004-07-07T16:51:47Z")

</div>

Scotty,  
It is working! Thank you so much!  
I understand most of what you did, I understand the theory and why it works, it’s too bad I could never write code like that myself.

I have added the rest of the pages and it is working really well.  
Thanks so much, I have been trying to figure this out forever!

I am probally going to take my fla’s off the server, but can I post the code you used in case someone else is having the same problem?

Thanks again!  
cr 🙂

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [July 7, 2004, 4:58pm UTC](https://forum.kirupa.com/t/remove-the-previous-swf-file/55871/13 "2004-07-07T16:58:50Z")

</div>

Glad that it worked out for you=)  
And off course, if you can help someone else with it, do it;)

scotty(-:

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 27, 2004, 6:11pm UTC](https://forum.kirupa.com/t/remove-the-previous-swf-file/55871/14 "2004-08-27T18:11:12Z")

</div>

Below is the code that Scotty wrote. I put in in the first frame of the swf that all my pages load into.  
Hope it helps!

stop();

subArray = new Array();  
subArray = [“portfolios”, “clients”, “bio”, “contact”];  
for (i=0; i\<4; i++) {  
btn = this[subArray\*];  
btn.i = i;  
btn.onRollOver = function() {  
this.gotoAndStop(2);  
};  
btn.onRollOut = function() {  
this.gotoAndStop(1);  
};  
btn.onRelease = function() {  
contents.loadMovie(subArray[this.i]+".swf");  
setButtons(this.i);  
};  
}  
function setButtons(k) {  
for (j=0; j\<4; j++) {  
if (j != k) {  
this[subArray[j]].enabled = 1;  
this[subArray[j]].gotoAndStop(1);  
} else {  
this[subArray[j]].enabled = 0;  
this[subArray[j]].gotoAndStop(2);  
}  
}  
}

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 27, 2004, 9:37pm UTC](https://forum.kirupa.com/t/remove-the-previous-swf-file/55871/15 "2004-08-27T21:37:57Z")

</div>

rekinball can i see the fla the scotty sent you. I can’t seem to download it

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 30, 2004, 6:20am UTC](https://forum.kirupa.com/t/remove-the-previous-swf-file/55871/16 "2004-08-30T06:20:36Z")

</div>

@Gupps, in a “cleaning” mood I removed the file from the server:stunned:  
I hope reckin’ball still gots it…

scotty(-:

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 30, 2004, 2:07pm UTC](https://forum.kirupa.com/t/remove-the-previous-swf-file/55871/17 "2004-08-30T14:07:23Z")

</div>

btw boys, safari and firefox in OSX both display the tags correctly 😉  
nice code scotty

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 30, 2004, 2:51pm UTC](https://forum.kirupa.com/t/remove-the-previous-swf-file/55871/18 "2004-08-30T14:51:08Z")

</div>

thank you=)

scotty(-:
