Ajax javascript problem with player going off the screen
Posted: Mon Apr 04, 2011 7:23 am
Hi i was hoping you could help me with this issue... basically in the interface while the player travels to the edge of the screen say the right hand side of the screen, the player transports to the left and same thing in the oppsite manner. Halls explains this well in the second vid i think but i dont believe ive changed much for it to happen ... if i can remember the sprite stopped at the edge of the screen...
If the sprite goes to the top of the screen it disapears, same with the bottom of the screen.
I goto the file from:
Ajax/Javascript Vid Tuts
http://www.mediafire.com/?lpdd5naxh6lo42o
for (i=0;i<=659;i++)
{
var divTag = document.createElement("div");
divTag.id = "div" + i;
//divTag.style.margin = "0px auto";
divTag.className ="dynamicDiv";
//divTag.innerHTML = "HE";
document.getElementById("maparea").appendChild(divTag);
}
document.getElementById("maparea").style.backgroundImage = "url(http://localhost/***********/images/grassback1.png)";
travel(map);
ALSO for some reason i have to insert url(http://localhost/***********/images/grassback1.png) to get the background image not sure why that is?? when originally it worked url(images/grassback1.png)
Any light on this would be extremely greatful
If the sprite goes to the top of the screen it disapears, same with the bottom of the screen.
I goto the file from:
Ajax/Javascript Vid Tuts
http://www.mediafire.com/?lpdd5naxh6lo42o
for (i=0;i<=659;i++)
{
var divTag = document.createElement("div");
divTag.id = "div" + i;
//divTag.style.margin = "0px auto";
divTag.className ="dynamicDiv";
//divTag.innerHTML = "HE";
document.getElementById("maparea").appendChild(divTag);
}
document.getElementById("maparea").style.backgroundImage = "url(http://localhost/***********/images/grassback1.png)";
travel(map);
ALSO for some reason i have to insert url(http://localhost/***********/images/grassback1.png) to get the background image not sure why that is?? when originally it worked url(images/grassback1.png)
Any light on this would be extremely greatful