...

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



Lleoun
04-28-2009, 11:45 AM
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;
container.loadMovie("teletipo.swf");

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

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

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

Lleoun
04-28-2009, 01: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)
www.vivocom.es/test/teletipo.rar

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

gnomeontherun
04-28-2009, 01: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);
teletipo.container.loadMovie("teletipo.swf");

Lleoun
04-28-2009, 03: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?

Lleoun
04-28-2009, 04: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);



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum