# Building site problem

**URL:** <https://forum.kirupa.com/t/building-site-problem/27735>\
**Category:** Uncategorized\
**Created:** [August 6, 2003, 3:06am UTC](https://forum.kirupa.com/t/building-site-problem/27735 "2003-08-06T03:06:32Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![crazysniper22](https://avatars.discourse-cdn.com/v4/letter/c/bc79bd/32.png) [@crazysniper22](https://forum.kirupa.com/u/crazysniper22)\
**Post date:** [August 6, 2003, 3:06am UTC](https://forum.kirupa.com/t/building-site-problem/27735/1 "2003-08-06T03:06:32Z")

</div>

hello flash gurus! I am following this [http://www.kirupa.com/developer/mx/full\_site2.htm](http://www.kirupa.com/developer/mx/full_site2.htm) tutorial, but I am having problem with the “Home” button.

When the page load. the home\_content doesnt display even though i click on it and give me this message Scene=Scene 1, Layer=menu, Frame=1: Line 1: Statement must appear within on handler \_root.contents.loadMovie(“home.swf”);

Help is always appreciated thank in advance!

---

<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 6, 2003, 4:01am UTC](https://forum.kirupa.com/t/building-site-problem/27735/2 "2003-08-06T04:01:55Z")

</div>

[http://www.macromedia.com/support/flash/action\_scripts/actionscript\_dictionary/actionscript\_dictionary615.html](http://www.macromedia.com/support/flash/action_scripts/actionscript_dictionary/actionscript_dictionary615.html)  
[AS]// example  
on (press) {  
\_root.contents.loadMovie(“home.swf”);  
}[/AS]

---

<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 6, 2003, 4:17am UTC](https://forum.kirupa.com/t/building-site-problem/27735/3 "2003-08-06T04:17:28Z")

</div>

thanks! I got that, but the thing is, isn’t that when the page loads, the “home” content should load automatically.  
The command you gave me, only works when the “home” button is click.  
Do you know any code that makes it load automatically? i did try to follow that tutorials right to the end where it says use this code to make the “Home” contents load automatically but still doesnt work for me.

thanks in advance to those who can help! cheers!

---

<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 6, 2003, 4:27am UTC](https://forum.kirupa.com/t/building-site-problem/27735/4 "2003-08-06T04:27:30Z")

</div>

… I see.

Then just put the code on the Frame actions instead of the Button actions. 😛

---

<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 6, 2003, 5:45pm UTC](https://forum.kirupa.com/t/building-site-problem/27735/5 "2003-08-06T17:45:29Z")

</div>

Thanks for replyin, but I forgot to mention I am FLASH Newbie, So how can i do that?

And also… is this possible?

main movie  
|  
gallery  
|\_\_\_\_\_ pic1  
|\_\_\_\_\_ pic2  
|\_\_\_\_\_ pic3 and so on… to pic36

the gallery .swf loads to main movie, the pic1 to pic 36.swf loads to gallery.swf.

If this possible how can i do this? Help is always appriciated!  
thanks in advance!

---

<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 6, 2003, 7:50pm UTC](https://forum.kirupa.com/t/building-site-problem/27735/6 "2003-08-06T19:50:10Z")

</div>

1. Highlight the Frame of the movie, open the Actions panel (F9), and paste this code:  
[AS]\_root.contents.loadMovie(“home.swf”);[/AS]
2. Ehmm… what!? 😛

---

<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 7, 2003, 2:33am UTC](https://forum.kirupa.com/t/building-site-problem/27735/7 "2003-08-07T02:33:03Z")

</div>

you may think that I am dumb, but to be honest, I dont know what frame your taking about? i know where to type the code, but i dont know where to attached it.  
I have 5 layers on my mainmovie. this is where the home, profile, gallery, news and links loads.

Im sorry, I am a very new to Flash

thanks for replying.

---

<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 7, 2003, 2:38am UTC](https://forum.kirupa.com/t/building-site-problem/27735/8 "2003-08-07T02:38:52Z")

</div>

Just select any Frame and paste the code…

Usually, people create a new layer in which all the code is written. [SIZE=1]\<-- I always do that[/SIZE]

---

<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 7, 2003, 5:00am UTC](https://forum.kirupa.com/t/building-site-problem/27735/9 "2003-08-07T05:00:59Z")

</div>

thanks kax, it works! thanks very much.

Since you guys helping me already, how about looking at my second problem.

I trying to this;

MainMovie.swf\<\<-------gallery.swf\<\<----- pic1.swf to pic38.swf

To make the sequence more clearer, those pic1.swf upto pic38.swf will load to “gallery.swf” then the gallery.swf, will load to the mainmovie, but it doesnt seems to work. Any idea?

to display those “pic.swf’s” to the gallery.swf, i used the following code

on (release) {  
\_root.content.loadMovie(“pic1.swf”);  
}

and also to load the “gallary.swf” to the empty movieclip on the main movie i used thesame code.

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

thanks in advance guys!

---

<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 7, 2003, 5:10am UTC](https://forum.kirupa.com/t/building-site-problem/27735/10 "2003-08-07T05:10:53Z")

</div>

Create a MovieClip in gallery.swf, and load pic#.swf into it. Otherwise, when pic#.swf is loaded, it will replace gallery.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:** [August 7, 2003, 1:34pm UTC](https://forum.kirupa.com/t/building-site-problem/27735/11 "2003-08-07T13:34:52Z")

</div>

Hmmm… i think i did that kax, on the gallery.swf, i have an empty movie clip on thr main timeline where the pic#.swf loads. but that doesn’t seems to work.

So trouble you man, but your the expert here.

Oh… by the way, thanks for your help on my previous post. Now when you open my site, the home loads automatically.

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:** [August 7, 2003, 5:34pm UTC](https://forum.kirupa.com/t/building-site-problem/27735/12 "2003-08-07T17:34:20Z")

</div>

Hey! I didn’t notice that those MovieClips are different instances, one is _content_ and the other one is _contents_. If that’s correct, then forget about my previous post. 😛

Which leaves me with two options, either the instance name assigned to the MovieClip is wrong, or the addressing is wrong.

Check the instance name and/or try removing \_root.  
[AS]content.loadMovie(“pic#.swf”);[/AS]  
Otherwise, I would like to take a look at your FLA. It would make things easier for me. :-\

---

<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 9, 2003, 12:54am UTC](https://forum.kirupa.com/t/building-site-problem/27735/13 "2003-08-09T00:54:30Z")

</div>

Kax,… I have three words for you! YOUR THE MAN! it really works! thanx man! I reaally appreciate your help!

once again 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:** [August 9, 2003, 12:57am UTC](https://forum.kirupa.com/t/building-site-problem/27735/14 "2003-08-09T00:57:03Z")

</div>

You’re welcome, glad I could 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:** [August 9, 2003, 2:58am UTC](https://forum.kirupa.com/t/building-site-problem/27735/15 "2003-08-09T02:58:38Z")

</div>

**kax** , how to attach files in here? theres i wanted to show you.

I wanted to add a preloader on the pic#.swf co’z i takes quite a while before the images loads.

I tried on adding each pic#.swf a preloader but, it will take me ages to that as i have 38 pic.swf.

And also… the one that made, when the pic#.swf loads to the gallery.swf, the preloader still there playing continuesly, so i decided to stop.

Man, your the expert here, is there a better way of doing this?

thanks in advance!

---

<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 9, 2003, 3:56am UTC](https://forum.kirupa.com/t/building-site-problem/27735/16 "2003-08-09T03:56:48Z")

</div>

This thread should get you on the right track: [http://www.kirupaforum.com/forums/showthread.php?s=&threadid=15472](http://www.kirupaforum.com/forums/showthread.php?s=&threadid=15472)

**PS.** I’m no expert!! 😛

---

<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 9, 2003, 10:55pm UTC](https://forum.kirupa.com/t/building-site-problem/27735/17 "2003-08-09T22:55:13Z")

</div>

thanx man! but at least you help me already, so for me, your an expert 🙂

The links you gave me are loading a .jpg files. my one’s are .swf co’z i made them individual pics in .swf format.

heres the site I made. its simple, because Im not that experienced on using Flash.

But i thank you because through your help everything is working. Except the gustbook, which I am struggling to find a tutorial on creating a guestbook in flash, although i find some readymade by some designers, i dont know how attached it to my main timeline.

anyway here it is www.metalgurl.tk

---

<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 9, 2003, 11:18pm UTC](https://forum.kirupa.com/t/building-site-problem/27735/18 "2003-08-09T23:18:00Z")

</div>

JPEG’s, SWF’s… it’s the same thing. 😉

[http://www.flash-db.com/GuestBookTut/GuestBookDoc.php](http://www.flash-db.com/GuestBookTut/GuestBookDoc.php)  
Hope your server supports PHP. :whistle:
