Adobe illustrator 10 用户手册

下载
页码 431
 | 
Back
303  
Adobe Illustrator Help
Preparing Graphics for the Web 
 | 
Back
303  
To add SVG interactivity features to your artwork, select an object using a selection tool, 
and then add the event and corresponding JavaScript to that object in the SVG Interac-
tivity palette. For example, you could select an object in your artwork and specify that the 
object will move on a Web page when a user clicks on the object in a Web browser.
Object with normal appearance and with glow activated by mouse rollover
To add a JavaScript event to an object:
Select an object on the artboard, or target an item in the Layers palette. (See 
.)
Choose Window > SVG Interactivity. 
In the SVG Interactivity palette, choose an event in the Event pop-up menu:
onfocusin to trigger the action when the element receives focus, such as selection by 
the pointer.
onfocusout to trigger the action when the element loses focus, often when another 
element receives focus.
onactivate to trigger the action with a mouse click or keypress, depending upon the 
SVG element.
onmousedown to trigger the action when the mouse button is pressed down over an 
element.
onmouseup to trigger the action when the mouse button is released over an element.
onclick to trigger the action when the mouse is clicked over an element.
onmouseover to trigger the action when the pointer is moved onto an element. 
onmousemove to trigger the action while the pointer is over an element.
onmouseout to trigger the action when the pointer is moved away from an element.
onkeydown to trigger the action when a key is pressed down.
onkeypress to trigger the action while a key is pressed down.
onkeyup to trigger the action when a key is released.
onload to trigger the action after the SVG document has been completely read and 
parsed. Use this event to call one-time only initialization functions.
onerror to trigger the action when an element does not load properly or other error 
occurs.
onabort to trigger the action when the page loading is stopped before the element is 
completely loaded.