Topic: Trouble with canvas text |
|
---|---|
Author | Thread |
Nervous Wreck (II) Inmate From: Portland Oregon |
posted 02-27-2009 07:32
Hi, sorry to bug you guys with this, but I'm stumped. The script works, but only after you refresh the darn page. It never works the first time. The original script had the user click to begin the script but I want it to load right away. I thought I did it right. Am I doing something wrong? |
Obsessive-Compulsive (I) Inmate From: |
posted 03-01-2009 20:03
I think it's because of this. code: var img=new Image() img.src="br.png" ctx.drawImage(img,-20,-100)
|
Nervous Wreck (II) Inmate From: Portland Oregon |
posted 03-01-2009 20:30
Thanks so much. It works great now. I wasn't aware that I needed to keep the image declaration global. You learn something new every day...when you're learning backwards LOL. All I had to do was put it outside of the draw function. |
Nervous Wreck (II) Inmate From: |
posted 05-31-2011 11:08
Edit TP: spam removed
|