# Button Script

**URL:** <https://forum.kirupa.com/t/button-script/22755>\
**Category:** flash\
**Created:** [June 8, 2003, 3:52am UTC](https://forum.kirupa.com/t/button-script/22755 "2003-06-08T03:52:24Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![HALO](https://avatars.discourse-cdn.com/v4/letter/h/57b2e6/32.png) [@HALO](https://forum.kirupa.com/u/HALO)\
**Post date:** [June 8, 2003, 3:52am UTC](https://forum.kirupa.com/t/button-script/22755/1 "2003-06-08T03:52:24Z")

</div>

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

Im using this script on a button to load a movie clip into my web page.

Im using same script for other web pages loading. and they work.  
But on this one I gotta like double click the button to load it up or click on other buttons then back to the missions button. Testing it in test mode of course.

Iam such a noobie been working on this site for like a year just never have time to get it done or get help trying to fix it and stuff.

THanks for any help!

HALO

---

<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:** [June 8, 2003, 5:17am UTC](https://forum.kirupa.com/t/button-script/22755/2 "2003-06-08T05:17:29Z")

</div>

I’ve been dealing with this too, although there shouldn’t be any reason for it. The solution for me was cleaning out my code, get rid of any unneccesary bits, replace code by dot syntax (if not so), … That worked out 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:** [June 8, 2003, 11:04am UTC](https://forum.kirupa.com/t/button-script/22755/3 "2003-06-08T11:04:44Z")

</div>

Is that all the code you have?

---

<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:** [June 8, 2003, 1:02pm UTC](https://forum.kirupa.com/t/button-script/22755/4 "2003-06-08T13:02:20Z")

</div>

Ya thats it iam pretty sure. I had this problem like 7 mo. or so ago and someone told me to do something and it worked. But i can’t remember cause I took so much time off from messin with Flash. I got that code from this sites full flash tutorial?

THanks  
HALO

---

<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:** [June 8, 2003, 1:35pm UTC](https://forum.kirupa.com/t/button-script/22755/5 "2003-06-08T13:35:22Z")

</div>

Are you sure \_root.contents is there when you load the movie?? Did you try to trace 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:** [June 8, 2003, 9:02pm UTC](https://forum.kirupa.com/t/button-script/22755/6 "2003-06-08T21:02:59Z")

</div>

What do you mean by tracein it? I use exactly same code for other buttons?

thanks HALO

---

<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:** [June 9, 2003, 2:29am UTC](https://forum.kirupa.com/t/button-script/22755/7 "2003-06-09T02:29:42Z")

</div>

Any help Please? Im reallly lost at what to do.

Thanks

HALO

---

<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:** [June 10, 2003, 2:57pm UTC](https://forum.kirupa.com/t/button-script/22755/8 "2003-06-10T14:57:59Z")

</div>

```auto
on (release) {
trace (_root.contents);
_root.contents.loadMovie("mission.swf");
}

```

If this returns _undefined_, there’s a problem with your paths.

pom 🙂

---

<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:** [June 10, 2003, 6:35pm UTC](https://forum.kirupa.com/t/button-script/22755/9 "2003-06-10T18:35:31Z")

</div>

Ok thanks Alot

Ill give this a try when i get back from work

HALO
