View Full Version : loading external movies in mx
somdow
February 17th, 2003, 04:13 PM
ok my ? is this. i want to load an external swf movie into the main swf movie. now ive been using the loadmovie script and it works fine but the loaded movie comes up in the top left of my site so my ? is, how can i specify the location of where my loaded movie ends up
eyezberg
February 17th, 2003, 06:54 PM
Depends where you load into, i tend to use an empty clip called "holder" (or whatever), and then change it's _x and _y..if you load into a level, it will always be aligned top left at x=0/y=0
somdow
February 17th, 2003, 08:38 PM
sorry but a container???? i know i know but hey um, if you dont feel like explainning then is there a link where i could learn???either or thanks
Lacuna
February 18th, 2003, 11:15 PM
Create a container 'change the name container in the code below' and then tell it what level and where to put it when it loads.
----------------------- code:
this.createEmptyMovieClip("yourContainer",0);
yourContainer.loadMovie("name_of_file.swf");
this.onEnterFrame=function(){
var l=yourContainer.getBytesLoaded();
var t=yourContainer.getBytesTotal();
if (l > 0 && l >=t){
yourContainer._x=400;
yourContainer._y=100;
}
}
------------------------ end code.
hope this helps.
:love:
~ Seretha
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.