View Full Version : Loading a movie in a x and y position

04-28-2009, 12:45 PM
Hi all,

I have a Flash movie with a movieclip inside called main (main has been dragged into the stage).
In main at certain frame I have:

loadMovie("teletipo.swf", 1);

Which loads teletipo.swf but in a x=0 and y=0 position. As I need it in a x=320 and y=165 position I've done:

this.createEmptyMovieClip("container", 1);
container._x =320;
container._y =165;

But this does not load the teletipo.swf ... what am I doing wrong? How should I fix it?
Thanks a ton in advance!

04-28-2009, 01:34 PM
this.createEmptyMovieClip("container", this.getNextHighestDepth());
container._x =320;
container._y =165;
this.createEmptyMovieClip("teletipo", 0);

Try this, because it actually replaces the movieClip with the swf, perhaps also destroying its settings.

04-28-2009, 02:09 PM
Thanks jeremywilken, it looked like the solution but .. nothing is loaded :(

I don't get it .. why
loadMovie("teletipo.swf", 1) works and not your code ??

Just in case something is bothering the main movie here's teletipo.fla (26kb)

Please help me with this, I'm going nuts!!
Thanks again!

04-28-2009, 02:35 PM
I'm trying to help, don't worry.

That code just has the basics, loads that swf to level 1.

I made a mistake in my code. I also arranged it to make more sense naming wise.

this.createEmptyMovieClip("teletipo", this.getNextHighestDepth());
teletipo._x =320;
teletipo._y =165;
teletipo.createEmptyMovieClip("container", 0);

04-28-2009, 04:14 PM
I'm afraid it is not working .. nothing loads :confused:
Should I create an empty movieclip? if so what should it have? keyframe?

04-28-2009, 05:38 PM
Just in case somebody needs it:

In the teletipo.fla on the first frame, add the following:

this._x = 320;
this._y = 165;

Then in your main movie, just use:

loadMovieNum("teletipo.swf", 1);