Topic: Canvas trouble (Page 1 of 1) Pages that link to <a href="http://ozoneasylum.com/backlink?for=31003" title="Pages that link to Topic: Canvas trouble (Page 1 of 1)" rel="nofollow" >Topic: Canvas trouble <span class="small">(Page 1 of 1)</span>\

 
racerX
Nervous Wreck (II) Inmate

From: Portland Oregon
Insane since: Jun 2006

IP logged posted posted 05-12-2009 06:55 Edit Quote

I'm having trouble. I can make it work if I leave alerts each iteration. I'm not sure why it doesn't work without. I create an array with the new image.srcs then I loop through the array and assign the image.src to the current array position just before I have the canvas draw the image. I'm trying to avoid having 16 images when I can just swap the image src when i need to draw a new image. Is this bad practice? Should I use a timeout to give the image a chance to get the new src? I don't get it.
Here's a link to what I want the page to work like, except the alerts, of course. If the alerts are removed, it simply doesn't work.

http://h1.ripway.com/stirfry/javascript/tests/canvas/mapdraw/DrawonmapTest.html
this is adaptation of this script
http://ponderer.org/download/canvas_demo/

racerX
Nervous Wreck (II) Inmate

From: Portland Oregon
Insane since: Jun 2006

IP logged posted posted 05-12-2009 20:06 Edit Quote

Got it figured out.

coach
Nervous Wreck (II) Inmate

From:
Insane since: May 2011

IP logged posted posted 05-31-2011 11:08 Edit Quote
Edit TP: spam removed


Post Reply
 
Your User Name:
Your Password:
Login Options: Remember Me On This Computer
 
Your Text:
Loading...
Options: Show Signature
Enable Slimies
Enable Linkwords

« BackwardsOnwards »

Show Forum Drop Down Menu