Loading movies automaticaly

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?

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


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

You could simply remove the event handler:

_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:

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]

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

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