Search the Community
Showing results for tags 'sprites'.
-
Good day, I have the following HTML code ... <body> <div id="navButtonContainer"> <img id="navButton" src="images/transparent.png" class="frame1"/> </div></body> and the following CSS code ... .frame1 { width: 200px; height: 100px; background: url(images/imageSS.png) 0px 0px;}.frame2 { width: 200px; height: 100px; background: url(images/imageSS.png) 200px 0px;}.frame3 { width: 200px; height: 100px; background: url(images/imageSS.png) 400px 0px;} I have some JS that modifies the <img/> class from "frame1" to "frame2" to "fra
-
I seem to have gotten in over my head with this project. I spent most of the day just typing out code, without the ability to debug it due to slow browser speed. When I got off work I started correcting my syntax errors, which didn't take very long. Unfortunately, I have spent many hours trying to resolve some sort of logic error in the game which is apparently a very serious one, as it prevents any of my sprites from appearing. The fillRect() function is showing up perfectly, but the drawImage() function is not. I will go ahead and post the whole game code, as it is pretty concise by my own
- 5 replies
-
- logic error
- canvas
-
(and 4 more)
Tagged with:
-
I've been using CSS sprites for a while now, mainly using it for icons, but I want to sprite up my backgrounds too. All the backgrounds I want to sprite I want to repeat Horizontally (left to right) but I can't get it too work. I know you can repeat in one direction only with CSS sprites, but it still wont work. #header {width: 100%; height: 215px;background:transparent url('files/site/spritebg.png') repeat top left; background-position: 0;} .sitemenu {float:left; width:690px; height:35px; color:#FFF; font-size:13pt; background-image:url(files/site/spritebg.png); background-repeat: repeat-