
450
ADOBE ILLUSTRATOR CS2
User Guide
2
Enter the corresponding JavaScript, and press Enter.
SVG events
onfocusin
Triggers the action when the element receives focus, such as selection by the pointer.
onfocusout
Triggers the action when the element loses focus (often when another element receives focus).
onactivate
Triggers the action with a mouse click or keypress, depending upon the SVG element.
onmousedown
Triggers the action when the mouse button is pressed down over an element.
onmouseup
Triggers the action when the mouse button is released over an element.
onclick
Triggers the action when the mouse is clicked over an element.
onmouseover
Triggers the action when the pointer is moved onto an element.
onmousemove
Triggers the action while the pointer is over an element.
onmouseout
Triggers the action when the pointer is moved away from an element.
onkeydown
Triggers the action when a key is pressed down.
onkeypress
Triggers the action while a key is pressed down.
onkeyup
Triggers the action when a key is released.
onload
Triggers the action after the SVG document has been completely parsed by the browser. Use this event to call
one-time-only initialization functions.
onerror
Triggers the action when an element does not load properly or another error occurs.
onabort
Triggers the action when the page loading is stopped before the element is completely loaded.
onunload
Triggers the action when the SVG document is removed from a window or frame.
onzoom
Triggers the action when the zoom level is changed for the document.
onresize
Triggers the action when the document view is resized.
onscroll
Triggers the action when the document view is scrolled or panned.
Creating animations
About Flash graphics
The Macromedia® Flash™ (SWF) file format is a vector-based graphics file format for the creation of scalable,
compact graphics for the web. Since the file format is vector-based, the artwork maintains its image quality at any
resolution and is ideal for the creation of animation frames. In Illustrator, you can create individual animation frames
on layers and then export the image layers into individual frames for use on a website. You can also define graphic
elements called
symbols
in your Illustrator file. When exported, each symbol is defined only once in the SWF file;
therefore, using symbols can greatly reduce the size of an animation.