# Using swf's like html pages

**URL:** https://forum.kirupa.com/t/using-swfs-like-html-pages/45377
**Category:** Uncategorized
**Created:** [March 13, 2004, 8:56pm UTC](https://forum.kirupa.com/t/using-swfs-like-html-pages/45377 "2004-03-13T20:56:11Z")
**Posts on this page:** 5
**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: [March 13, 2004, 8:56pm UTC](https://forum.kirupa.com/t/using-swfs-like-html-pages/45377/1 "2004-03-13T20:56:11Z")

</div>

I have been searching for this for awhile, but still can’t figure it out.

I have a webpage that consists of three swf’s. I want these swf’s to work like individual pages on an html site.  
So I want each page to cover the one before it so that none of the buttons underneath are clickable.  
Right now the swf’s are loading on top on each other but “invible” buttons appear on the top page where ever buttons were located on the previous swf’s.  
The curser turns into a hand where there should not be a button.  
The following is the code I am using for the contact button on the home page…

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

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

}

What am I doing wrong?  
Thanks for any help.  
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: [March 13, 2004, 9:00pm UTC](https://forum.kirupa.com/t/using-swfs-like-html-pages/45377/2 "2004-03-13T21:00:24Z")

</div>

…perhaps you could put them all in seperate frames? or scenes?

---

<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: [March 13, 2004, 9:10pm UTC](https://forum.kirupa.com/t/using-swfs-like-html-pages/45377/3 "2004-03-13T21:10:54Z")

</div>

Originaly that is how I had the site set up. Each page on a different scene. But the scenes got very large (because this is a photography site) and it was taking to long to load.  
But thanks for your reply.  
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: [March 13, 2004, 9:16pm UTC](https://forum.kirupa.com/t/using-swfs-like-html-pages/45377/4 "2004-03-13T21:16:20Z")

</div>

hmm… just make a holder mc that holdes everything loaded into the main movie.  
then just  
use mc.loadmovie();  
then use mc.unloadmovie(); to unload the movie.  
then after that use mc.removeMovieClip(); to stop all scripts that are running in that movie.  
then after that use createEmptyMovieClip(); of the mc you just deleted its works really well like with my site.  
[www.angelfire.com/art2/booyaka/](http://www.angelfire.com/art2/booyaka/)

---

<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: [March 13, 2004, 10:47pm UTC](https://forum.kirupa.com/t/using-swfs-like-html-pages/45377/5 "2004-03-13T22:47:02Z")

</div>

It seems like the actionsript Booyaka suggested is similar to what I am using (stop me if I am wrong, I am very new to all this)  
“contents” is my empty mc.

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

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

}

In my original actionscript I did not put the ’ mc. ’ in front of 'unloadMovie’  
as Booyaka suggests. I tried this but now ‘contact.swf’ does not load at all.  
This is probally because I am not sure what to do with the createEmptyMovieClip(); part of the code.

This is what my code now looks like…

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

on (release) {  
contents.unloadMovie(“home2.swf”);

}

on (release) {  
createEmptyMovieClip(“home.swf”);  
}

Thanks again for any help,  
Christina
