Topic: Trouble with canvas text (Page 1 of 1) |
|
---|---|
Nervous Wreck (II) Inmate From: Portland Oregon |
![]() 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: |
![]() 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 |
![]() 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: |
![]() Edit TP: spam removed
|