• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Scripting SVG

The next step up from linking — and it’s a big step — is scripting. You can write a program in ECMA Script (the European Computer Manufacturer’s Association standard version of what is commonly called JavaScript) to interact with an SVG graphic. Interaction occurs when graphic objects respond to events.

Objects can respond to mouse events associated with clicking the mouse button: click, mousedown, and mouseup;[14] events associated with moving the mouse: mouseover (the mouse pointer is within the object), mouseout (the mouse pointer leaves the object), and mousemove; events associated with an object’s status: load (the object has been fully parsed and is ready to render); and the non-standardized events associated with pressing keys:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint