# Loading movies automaticaly

**URL:** <https://forum.kirupa.com/t/loading-movies-automaticaly/42869>\
**Category:** Uncategorized\
**Created:** [February 13, 2004, 9:39pm UTC](https://forum.kirupa.com/t/loading-movies-automaticaly/42869 "2004-02-13T21:39:03Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![UnblessedOmega](https://avatars.discourse-cdn.com/v4/letter/u/8edcca/32.png) [@UnblessedOmega](https://forum.kirupa.com/u/UnblessedOmega)\
**Post date:** [February 13, 2004, 9:39pm UTC](https://forum.kirupa.com/t/loading-movies-automaticaly/42869/1 "2004-02-13T21:39:03Z")

</div>

on one of the tutorials to load a movie it teaches you how to load with a button…

[COLOR=blue]but.onPress = function () {  
\_root.createEmptyMovieClip(“container”, 1);  
loadMovie(“loaded.swf”, “container”);  
container.\_x = 150 ;  
container.\_y = 20 ;  
}

[/COLOR]

does anyone know how to load it without a button?

---

<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:** [February 13, 2004, 9:45pm UTC](https://forum.kirupa.com/t/loading-movies-automaticaly/42869/2 "2004-02-13T21:45:16Z")

</div>

Yep. But somehow, I don’t think this is gonna answer your question. 🙂

```auto

 _root.createEmptyMovieClip("container", 1);
loadMovie("loaded.swf", "container");
container._x = 150 ;
container._y = 20 ;

```

---

<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:** [February 13, 2004, 9:48pm UTC](https://forum.kirupa.com/t/loading-movies-automaticaly/42869/3 "2004-02-13T21:48:31Z")

</div>

You could simply remove the event handler:

```auto
_root.createEmptyMovieClip("container", 1);
loadMovie("loaded.swf", container);
container._x = 150;
container._y = 20;

```

…Or you could call it if you don’t want to remove it:

```auto
but.onPress = function() {
_root.createEmptyMovieClip("container", 1);
loadMovie("loaded.swf", container);
container._x = 150;
container._y = 20;
};
but.onPress();

```

[edit]Bah! I’m late! :P[/edit]

---

<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:** [February 13, 2004, 10:02pm UTC](https://forum.kirupa.com/t/loading-movies-automaticaly/42869/4 "2004-02-13T22:02:57Z")

</div>

it gives me an error  
Symbol=manson, Layer=Layer 4, Frame=1: Line 5: Unexpected ‘}’ encountered  
}

---

<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:** [February 13, 2004, 10:18pm UTC](https://forum.kirupa.com/t/loading-movies-automaticaly/42869/5 "2004-02-13T22:18:07Z")

</div>

that just means you have an extra “}” tucked in there somewhere.
