OZONE Asylum
Forums
DHTML/Javascript
2.5D side scrooling lanscape ain't running smooth..
This page's ID:
31166
Search
QuickChanges
Forums
FAQ
Archives
Register
Edit Post
Who can edit a post?
The poster and administrators may edit a post. The poster can only edit it for a short while after the initial post.
Your User Name:
Your Password:
Login Options:
Remember Me On This Computer
Your Text:
Insert Slimies »
Insert UBB Code »
Close
Last Tag
|
All Tags
UBB Help
By changing: [code]var bgpos1=0; var bgpos2=0; var bgpos3=0; document.onload function background() { document.getElementById('background1').style.backgroundPosition=bgpos1+"px 0px"; document.getElementById('background2').style.backgroundPosition=bgpos2+"px 0px"; document.getElementById('background3').style.backgroundPosition=bgpos3+"px 0px"; bgpos1-=0.7; if (bgpos1<=0) { bgpos1=1000 } bgpos2-=0.4; if (bgpos2<=0) { bgpos2=850 } bgpos3-=0.1; if (bgpos3<=0) { bgpos3=700 } }[/code] to: [code]var bgpos1=1000/0.7; var bgpos2=850/0.4; var bgpos3=700/0.2; document.onload function background() { document.getElementById('background1').style.backgroundPosition=bgpos1*0.7+"px 0px"; document.getElementById('background2').style.backgroundPosition=bgpos2*0.4+"px 0px"; document.getElementById('background3').style.backgroundPosition=bgpos3*0.2+"px 0px"; bgpos1--; if (bgpos1<=0) { bgpos1=1000/0.7; } bgpos2--; if (bgpos2<=0) { bgpos2=850/0.4; } bgpos3--; if (bgpos3<=0) { bgpos3=700/0.2; } }[/code] I have got a little bit better perfomance altough I still think it can be better..
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »