My JavaScript book is out! Don't miss the opportunity to upgrade your beginner or average dev skills.

Saturday, July 28, 2007

JavaScript Blackboard

Does We really need only canvas element to draw something?

This is a basic blackboard example that uses my extend.js proposal and my setInterval and setTimeout with arguments fix for Internet Explorer.

Just draw something on Blackboard and have fun with JavaScript ;-)

6 comments:

Anonymous said...

why does it erase right after I write something?

There should be a separate erase feature.

Andrea Giammarchi said...

That's what onDraw callback does, You can change them as You want.

However, this is a test for setTimeout with extra arguments on Explorer too and my last extend prototype, not a full blackboard (but as You can see it's simple to create as You need) :-)

Anonymous said...

weird behaviour with click+drag outside the "board", requires extra click! anyway, your blog rocks :) congratulations

Andrea Giammarchi said...

thank You. I know that behaviour but if I add any other check inside onmousemove event responsiveness goes slow :D

I could try using a document event but I'm sure that checks for coords will be less responsiveness while onmouseout is called everytime a div is under the cursor.

Any suggest about this problem?
( ok, ok, with Flash it's perfect and more simple ;) )

Anonymous said...

Could not find a suitable section so I written here, how to become a moderator for your forum, that need for this?

Anonymous said...

Sup i am new to this, I came upon this board I find It vastly accessible and it has helped me alot. I should be able to give something back & aid other users like it has helped me.

Thanks, See You About.