# Making button change scene instead of file...?

**URL:** https://forum.kirupa.com/t/making-button-change-scene-instead-of-file/8573
**Category:** Uncategorized
**Created:** [November 24, 2002, 1:48am UTC](https://forum.kirupa.com/t/making-button-change-scene-instead-of-file/8573 "2002-11-24T01:48:55Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![blah\_de\_blah](https://avatars.discourse-cdn.com/v4/letter/b/a8b319/32.png) [@blah\_de\_blah](https://forum.kirupa.com/u/blah_de_blah)
#### Post date: [November 24, 2002, 1:48am UTC](https://forum.kirupa.com/t/making-button-change-scene-instead-of-file/8573/1 "2002-11-24T01:48:55Z")

</div>

i was using this tutorial [http://www.kirupa.com/developer/mx/full\_site2.asp](http://www.kirupa.com/developer/mx/full_site2.asp)  
to create a site and i was wondering if it would be better to change between scenes instead of files, because in the tutorial above, it only teaches how to change between files. The AS it uses in that is

on (release) {  
\_root.contents.loadMovie (“whateverhere.swf”);  
}

but what would it be for changing scenes? thx

---

<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: [November 24, 2002, 2:25am UTC](https://forum.kirupa.com/t/making-button-change-scene-instead-of-file/8573/2 "2002-11-24T02:25:04Z")

</div>

For using scenes, you button will have to be on the main timeline with this code…

```auto
on (release){
gotoAndPlay("SceneName",1);
}

```

It is highly recommend you use loadMovie like the tutorial says, because with loadMovie, all unviewed content stays unviewed and unloaded, where if you use scenes you have to load everything at once, giving your full site a high file size and long load time (especially for dial ups).

---

<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: [November 24, 2002, 2:28am UTC](https://forum.kirupa.com/t/making-button-change-scene-instead-of-file/8573/3 "2002-11-24T02:28:17Z")

</div>

if it is loadMovie will it take longer to change from pages? if it won’t then i guess that’d be a better idea…

---

<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: [November 24, 2002, 2:30am UTC](https://forum.kirupa.com/t/making-button-change-scene-instead-of-file/8573/4 "2002-11-24T02:30:15Z")

</div>

Depends on the sections.

I recommend using a preloader on each section, that way dial up users don’t see empty space until that area loads.

---

<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: [November 24, 2002, 2:32am UTC](https://forum.kirupa.com/t/making-button-change-scene-instead-of-file/8573/5 "2002-11-24T02:32:54Z")

</div>

ah ok thx,  
i jsut tried the AS you gave me above but some reason when i click publish\>html, scene 1 and scene 2 keep switching.  
So like for half a second it stay on scene 1 then changes to scnee 2 then back to scene 1 etc.  
Do you know why this is happening?

---

<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: [November 24, 2002, 2:35am UTC](https://forum.kirupa.com/t/making-button-change-scene-instead-of-file/8573/6 "2002-11-24T02:35:26Z")

</div>

You never added a stop() action to the last frame in the scene so it is looping over and over.

---

<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: [November 24, 2002, 2:38am UTC](https://forum.kirupa.com/t/making-button-change-scene-instead-of-file/8573/7 "2002-11-24T02:38:27Z")

</div>

cool it works thx for the help

---

<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: [November 24, 2002, 2:39am UTC](https://forum.kirupa.com/t/making-button-change-scene-instead-of-file/8573/8 "2002-11-24T02:39:32Z")

</div>

No problem.
