SlickBoard | CSS/XML Timeline (new) | XML/SWF Charts | Timeline Eons

 < previousnext > 

 

Event

 

<action>

     <item type='string' event='string' ... />
     ...
   
</action>
             


Description

The event attribute can be added to any action item to determine which event triggers its execution. Any number of action items with the same event value are triggered together when this event occurs within the enclosing object.

Valid event values are:

  • click: Execute this action item when a hit area within the enclosing object is clicked. This is the default event value.

  • click_out: Execute this action item when anything outside of this object is clicked. This can be used to deactivate or hide an object when any another object or the board's background is clicked. This works only when the enclosing object is visible (excluding hidden objects, docked objects, and offscreen slides).

  • double_click: Execute this action item when a hit area is double clicked.

  • throw: Execute this action item when an object is dragged and thrown.

  • mouse_over: Execute this action item when the mouse moves over an object.

  • mouse_out: Execute this action item when the mouse moves off an object.

  • board_exit: Execute this action item when the mouse leaves the board.

  • board_enter: Execute this action item when the mouse enters the board.



  • check: Execute this action item when a checkbox is checked.

  • uncheck: Execute this action item when a checkbox is unchecked.



  • drawer_open: Execute this action item when a drawer opens.

  • drawer_close: Execute this action item when a drawer closes.



  • dock: Execute this action item when an object is docked.

  • undock: Execute this action item when an object is undocked.



  • wall_hit: Execute this action item when an object hits a constraining wall.

  • magnet: Execute this action item when an object connects with an attracting magnet.



  • drag_end: Execute this action item when a draggable object (or a slider) is released and it stops moving.

  • sound_end: Execute this action item when a sound played by the enclosing object finishes playing.



  • context_n: When event is set to context_1, then this action item is executed when the first context menu item is selected. When event is set to context_2, then this action item is executed when the second context menu item is selected, and so on.

  • char_n: Execute this action item when the key with the ASCII character code n is pressed. For example, if event is char_97, then this action item is executed when the ASCII character 'a' is pressed. See this page for the ASCII character codes.

  • key_n: Execute this action item when the key with the code n is pressed. Unlike char_n, the key_n code corresponds to the keyboard key, regardless of the keyboard language. For example, if event is key_27, then this action item is executed when the escape key is pressed. See this page for the key codes.



  • timer: Execute this action item after a time delay. See the timer event page.

  • slider: Execute this action item while a slider is getting dragged. See the slider event page.

 

Example

<slickboard>
   
  
   <!-- background rectangle -->
   <rect x='50' y='50' width='380' height='200' fill_color='555555' shadow='hole' />
   
   
   <object>
      <!-- draggable red circle constrained inside a rectangle -->
      <circle x='240' y='150' radius='35' fill_color='FF6600' shadow='default' state='hit' />   
      <constrain x='50' y='50' width='380' height='200' />
      
      <action>
         <!-- drag action triggerd by a click event (default event) -->
         <item type='drag' />
         
         <!-- sound_new action triggerd by a mouse throw -->
         <item type='sound_new' target='woosh' event='throw' />

         <!-- sound_new action triggerd by a hitting a constraining wall -->
         <item type='sound_new' target='hit' event='wall_hit' />
         
      </action>
      
   </object>   

   
   <sound>
      <clip id='woosh' url="sounds/woosh.mp3" />
      <clip id='hit' url="sounds/hit.mp3" />
   </sound>
   
   
   <filter>
      <shadow id='default' />
      <shadow id='hole' alpha='.5' blurX='10' blurY='10' inner='true' />
   </filter>
   
</slickboard>

 

 < previousnext > 


Copyright © 2010-2017, maani.us