PDA

View Full Version : _x with loadMovieNum (Flash MX Pro 2004)



DavidMLevine
September 20th, 2005, 10:15 PM
This should be easy, but of course nothing is as it seems.

loadMovieNum("/15x15002.swf",6);
_level6._x = 800;
_level6._y = 800;

It seems that I should be able to move the whole layer to position this .swf
Im going through hell getting the code and everything in this .swf to come in correctly any other way.
Is there a way to make this work? I cant seem to get a preloader or anything close to it. Ive moved the _x & _y to next frame and still nothing.
(I do spend a lot of time searching and experimenting before I post.. sorry if it seems otherwise)

Thanks,
David

DavidMLevine
September 21st, 2005, 04:37 PM
bump

stringy
September 21st, 2005, 05:22 PM
bump
you need to wait until it loads before you can position

something like this should work


stop();
assessLoad = function () {
var kbLoaded = Math.floor(_level6.getBytesLoaded()/1024);
var kbTotal = Math.floor(_level6.getBytesTotal()/1024);
trace(kbLoaded);
if ((kbLoaded>=kbTotal) && kbTotal>0) {
_level6._x = 800;
_level6._y = 800;
clearInterval(myInterval);
}
};
loadMovieNum("your.swf", 6);
myInterval = setInterval(assessload, 50);

If you decide to load into movieclips instead of _levels, then you can position before loading.

nsolcis
April 3rd, 2008, 02:50 PM
on the timeline of the swf thats being loaded, you can specify

this._x = whatever you want this x to be;
this._y = whatever you want this x to be;

nsolcis
April 3rd, 2008, 02:51 PM
how do you load a swf into a movie clip? i thought that was only an option for clips in your library already, hmmm