aussie01
04-12-2006, 05:23 PM
Hi
I'm trying to have an external jpeg load into a scrollpane called 'champscroll'. The jpeg loads fine but doesn't fit inside the scrollpane or have scrollbars on the side. Help!
I've put the code I'm using on the frame below.
//LOADS AN EXTERNAL JPEG INTO THE CHAMPSCROLL SCROLLPANE
champscroll.loadMovie = "http://www.sportstv.eu.com/ChampionshipList.jpg";
//PRELOADER FOR SCROLLPANE
loadingBar._xscale = 1;
loadingBar.onEnterFrame = function(){
kBytesLoaded = this._parent.champscroll.getBytesLoaded() / 1024;
kBytesTotal = this._parent.champscroll.getBytesTotal() / 1024;
percentage = Math.round(kBytesLoaded / kBytesTotal * 100);
this._xscale = percentage;
//MAKE THE PRELOAD BAR VISIBLE IF PERCENTAGE IS LESS THAN 100%
if (percentage < 99.9) {
loadingBar._alpha = 100;
bar2box._alpha = 100;
}
//MAKE THE PRELOAD BAR DISAPPEAR WHEN FINISHED
if (percentage == 100) {
delete this.onEnterFrame;
loadingBar._alpha = 0;
bar2box._alpha = 0;
}
}
Any help greatly appreciated.
I'm trying to have an external jpeg load into a scrollpane called 'champscroll'. The jpeg loads fine but doesn't fit inside the scrollpane or have scrollbars on the side. Help!
I've put the code I'm using on the frame below.
//LOADS AN EXTERNAL JPEG INTO THE CHAMPSCROLL SCROLLPANE
champscroll.loadMovie = "http://www.sportstv.eu.com/ChampionshipList.jpg";
//PRELOADER FOR SCROLLPANE
loadingBar._xscale = 1;
loadingBar.onEnterFrame = function(){
kBytesLoaded = this._parent.champscroll.getBytesLoaded() / 1024;
kBytesTotal = this._parent.champscroll.getBytesTotal() / 1024;
percentage = Math.round(kBytesLoaded / kBytesTotal * 100);
this._xscale = percentage;
//MAKE THE PRELOAD BAR VISIBLE IF PERCENTAGE IS LESS THAN 100%
if (percentage < 99.9) {
loadingBar._alpha = 100;
bar2box._alpha = 100;
}
//MAKE THE PRELOAD BAR DISAPPEAR WHEN FINISHED
if (percentage == 100) {
delete this.onEnterFrame;
loadingBar._alpha = 0;
bar2box._alpha = 0;
}
}
Any help greatly appreciated.