Loading dynamic swfs

To load a swf, I tried using the following code

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

I noticed that the loading doesn’t work when amovie.swf contained this actionscript:

_root.createEmptyMovieClip("test", 1);
_root.test.lineStyle(2, 0xff0000, 100);
_root.test.moveTo(0,0);
_root.test.lineTo(100,350);

No errors were given but nothing appears. Any ideas?