PDA

View Full Version : Loading To The Right Place?


godonholiday
04-17-2003, 10:49 AM
This code loads the first swf file onto level 1, but it loads it in the wrong place?? (THE TOP LEFT HAND CORNER)

Is it possible to specify where on the main stage I want it to load????



stop();
preloaderGraphics._visible=false;
nextMovie="contentprofile.swf";
loadMovieNum(nextMovie,1);

_root.nav.button1.onRelease=function(){
if(nextMovie!="contentprofile.swf"){
nextMovie="contentprofile.swf";
_level1.gotoAndPlay("outro");
}
}

_root.nav.button2.onRelease=function(){
if(nextMovie!="contentservices.swf"){
nextMovie="contentservices.swf";
_level1.gotoAndPlay("outro");
}
}
_root.nav.button3.onRelease=function(){
if(nextMovie!="contentportfolio.swf"){
nextMovie="contentportfolio.swf";
_level1.gotoAndPlay("outro");
}
}

_root.nav.button4.onRelease=function(){
if(nextMovie!="contentcontact.swf"){
nextMovie="contentcontact.swf";
_level1.gotoAndPlay("outro");
}
}



THIS IS THE CODE ON IN THE CONTENT PAGE??

this.onEnterFrame = function(){
//is the content still loading?
if (this.getBytesLoaded()<this.getBytesTotal()){
_level0.preloaderGraphics._visible = true;
Total = this.getBytesTotal()/1000;
Received = this.getBytesLoaded()/1000;
Percentage = (Received/Total)*100;
_level0.preloaderGraphics.percent = int(Percentage) add "%";
_level0.preloaderGraphics.progressBar._xscale = Percentage;
}else{
this.gotoAndPlay("intro");
this.onEnterFrame = null;
_level0.preloaderGraphics._visible = false;
}
};
stop();

sralok
04-18-2003, 08:15 PM
I will give this a shot. I am usually the one asking guestion.

you would use the setProperty like this

setProperty("hhome",_x,0);
setProperty("hhome",_y,200);


which "home" is the name of the movie you are loading, x axis, and 0 is the pixel postion

the same with _y

texbala
04-19-2003, 02:20 AM
use an emptymovieclip and use


on(release) {
loadMovie("products.swf",_root.dropZone);
}
//dropZone is the name of the clip