agarza Posted April 11, 2010 Share Posted April 11, 2010 Hello, I've been playing lately about with the new canvas features of html5. I did a method that draws a little 5 by 5 map in a canvas by inserting 25 images. The only problem is that when I call it manually it doesn't add the images; however, if I use <body onLoad="fucntion();"> it works. I realized that the script does run (when i call the method manually), but when it runs this line ctx.drawImage(mapTilesImage, (mapTiles[index][3]*32), (mapTiles[index][2]*32), 32, 32, xCount, yCount, 32, 32); the image is not drawn in the canvas. Also, if I make it send an alert() just before it runs that line it seems to draw the image after i close the alert window. I tried figuring it out, but I couldn't so I decided to ask. If you need the code let me know.. thanks in advance.. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.