Hello,
I have 2 scenes, 1 preloading and 1 main scene. When i remove the preloading, the main scene plays just fine but with the preloading, it bugs: the panorama won’t move…
I have a basic preloading:
bytes_loaded = Math.round(this.getBytesLoaded());
bytes_total = Math.round(this.getBytesTotal());
getPercent = bytes_loaded/bytes_total;
this.loadbar._width = getPercent*187;
this.loadtext = Math.round(getPercent*100)+"% Please WAit...";
if (bytes_loaded == bytes_total) {
this.gotoAndPlay(3);
//the scene 3 gotoAndStops the 1st frame of my main scene, the frame 2 loops that piece of code...
}
In my main scene now, i have an infinite loop for a panorama that interacts with a MC (speed and position). It works fine alone…
_root.onLoad = function() {
//Bunch of variables
xcenter = 400;
_global.speed = 1/30;
};
_root.onEnterFrame = function() {
speedratio = _root.scaled;
if(speedratio > 80){speedratio = 80};
_global.speed = 1/((100-speedratio)*0.8);
//Move panorama
var distance = _root.Para._x-xcenter;
_root.Panorama._x -= (distance*_global.speed);
if (_root.Panorama._x>0) {
_root.Panorama._x = -3019;
}
if (_root.Panorama._x<-3019) {
_root.Panorama._x = 0;
}
};
Can anyone tell me what’s wrong??
TiA