Actions

From KickApps Documentation

Jump to: navigation, search

Actions enable you to add behavior or change components' properties in response to events initiated by the user or issued by widget components.

Contents

Add an action via the Actions window

  1. Select a component.
  2. Open the Actions panel by clicking the Actions option under the Window menu.
    ActionsPanel.png
  3. Click the Add Action button.
    AddAction.png
File:RightClickAddAction.png
Tip: You can also add an action by right-clicking your mouse and selecting Add Action from the context menu.
  1. The add/edit action window will appear.
    AddActionWindow.png
  2. Select the Event that you'd like to trigger your desired action from the Event dropdown. (Tip: type into the dropdown; it auto-completes. Click enter when you see the event you're looking for.)
  3. Select the Action that you'd like to be executed when the event occurs.
  4. If the action you chose requires a value, enter the value directly or click Select to choose the value of a component property.
    ActionsPanelProperties.png
  5. Click Add.

Remove an action

  1. Select a component.
  2. Open the Actions panel.
  3. Click on the action that you'd like to remove.
  4. Click the garbage can icon.

Setting values for actions

There are 5 ways to set values for actions:

  1. Enter a number (you can use up to 2 decimal places).
  2. Use the value of any property on any component in your widget, including nested properties.
    Syntax:
    #{componentName.propertyName}
    Example:
    #{List1.height}
    Access properties of a component's parent using this syntax:
    #{Text Area 1.parent.height}
    The Advanced List component has a property called contentSource. contentSource returns the raw source of the Advanced List's content, e.g., its RSS, Atom, or XML feed. You can drill into nodes and properties of the contentSource by chaining their names onto contentSource, like so:
    #{Advanced List 1.contentSource.channel.item.0.link}
    The Advanced List also has a selectedItem property that represents its current item. This property can be chained with another property called xmlSource to retrieve and drill into the raw XML content of the selected item. In the example below, the Advanced List's content is an XML feed from Yes.com containing songs nodes that contain cover nodes containing URLs to cover art.
    #{Advanced List.selectedItem.xmlSource.cover}
  3. Use JavaScript to compute a value from the values of one or more component properties.
    Syntax:
    javascript:eval(#{componentName1.propertyName} + #{componentName2.propertyName})
    Example:
    javascript:eval(#{List1.height} + #{Button1.height})
    You can also abbreviate "javascript" like this:
    js:eval(#{List1.height} + #{Button1.height})
  4. Call a JavaScript function on the page that the widget is installed on.
    Syntax:
    javascript:functionName(optionalVariable)
    Example:
    javascript:incrementViewCount(#{VideoPlayer.selectedMedia.title})
  5. Use relative values to increment or decrement from the current value of a property.
    Syntax:
    A number preceded by a plus or minus sign
    Example:
    + 10

Events Reference

Standard Events

  • Click Html-icon.png
  • Component hidden Html-icon.png
  • Component loaded Html-icon.png
  • Component shown Html-icon.png
  • Double click Html-icon.png
  • Mouse down Html-icon.png
  • Mouse up Html-icon.png
  • Roll out Html-icon.png
  • Roll over Html-icon.png


3d Carousel Component


3d Gallery Component


AppContainer

  • Child components loaded Html-icon.png
  • Click Html-icon.png
  • Comment list failure
    • The request to retrieve comments from the API failed.
  • Comment list success
    • The request to retrieve comments from the API succeeded.
  • Comment post failure
    • Posting a new comment to the API failed.
  • Comment post failure - not logged in
    • The user submitting the comment is not logged in. Use this event to show a log in dialogue box.
  • Comment post success
    • Posting a new comment to the API succeeded.
  • Component loaded Html-icon.png
  • Double click Html-icon.png
  • Log in user failure Html-icon.png
  • Log in user success Html-icon.png
  • Log out user success Html-icon.png
  • Mouse down Html-icon.png
  • Mouse move Html-icon.png
  • Mouse up Html-icon.png
  • Roll out Html-icon.png
  • Roll over Html-icon.png
  • User login status logged in Html-icon.png
  • User login status not logged in Html-icon.png


Audio Component

  • #Standard Events
  • Media Paused Html-icon.png
  • Media Playing Html-icon.png
  • Media Start Html-icon.png
  • Media End Html-icon.png
  • Media Percent Complete Html-icon.png
    • Specify the percentage of playback at which this event should be fired
  • Media Time Elapsed Html-icon.png
    • Specify how many seconds of playback should occur before firing the event (whole seconds only; no decimals)
  • Media Change Html-icon.png


Auto List Component

  • #Standard Events
  • Media Change Html-icon.png
  • Media list failed to load Html-icon.png
    • The list component requested a feed, but either didn't receive a response, or received an error.
  • Media list is empty Html-icon.png
    • The list component requested a feed and received a response, but that response doesn't contain any content items.
  • Media list loaded Html-icon.png
    • Fires when the component's feed, playlist, or content URL has loaded
    • Useful when you need a component to fetch its content from a list component. Without this event there's no way for you to be sure that the list component's content has actually loaded, which could result in your component attempting to retrieve its content value from the list before the list's content has loaded, resulting in your component's property being set to null. By using the Media list loaded event you can ensure that the list's content has loaded and that your component will be able to access it.


Button Component

  • #Standard Events
  • Toggled On Html-icon.png
    • Issued whenever the button's "toggled" property changes from false to true. By default, this event is issued when the user clicks a button for the first, third, fifth, etc., time.
  • Toggled Off Html-icon.png
    • Issued whenever the button's "toggled" property changes from true to false. By default, this event is issued when the user clicks a button for the second, fourth, sixth, etc., time.


Button Bar Component


Container Component


Image/.swf Component


List Component

  • #Standard Events
  • Child components loaded Html-icon.png
  • Media change Html-icon.png
  • Media list failed to load Html-icon.png
    • The list component requested a feed, but either did not receive a response, or received an error.
  • Media list is empty Html-icon.png
    • The list component requested a feed, but the response it received doesn't contain any content items.
  • Media list loaded Html-icon.png
    • Fires when the component's feed, playlist, or content URL has loaded
    • Useful when you need a component to fetch its content from a list component. Without this event there's no way for you to be sure that the list component's content has actually loaded, which could result in your component attempting to retrieve its content value from the list before the list's content has loaded, resulting in your component's property being set to null. By using the Media list loaded event you can ensure that the list's content has loaded and that your component will be able to access it.


Pages Component


Rating Component


Rectangle Component


Scrubber Component


Slide Component


Text Component


Text Input Component


Timer Component

  • #Standard Events
  • Timer Html-icon.png
    • This event fires every time the Timer component finishes a cycle.
  • Timer Complete Html-icon.png
    • This event only fires when the timer has completed all of its cycles.


Video Component

  • #Standard Events
  • Connecting to video server
  • Connected to video server
  • Buffering start
  • Buffering complete
  • Media change Html-icon.png
  • Media end Html-icon.png
  • Media list loaded Html-icon.png
  • Media paused Html-icon.png
  • Media percent complete Html-icon.png
    • Specify the percentage of playback at which this event should be fired
  • Media playing Html-icon.png
  • Media start Html-icon.png
  • Media time elapsed Html-icon.png
    • Specify how many seconds of playback should occur before firing the event (whole seconds only; no decimals)
  • Mouse over Html-icon.png
  • Request failed georestriction policy
  • Request passed georestriction policy
  • Video ad end
  • Video ad start


Video Player (basic, all-in-one player)

  • #Standard Events
  • Connecting to video server
  • Connected to video server
  • Buffering start
  • Buffering complete
  • Media change Html-icon.png
  • Media end Html-icon.png
  • Media list loaded Html-icon.png
  • Media paused Html-icon.png
  • Media percent complete Html-icon.png
    • Specify the percentage of playback at which this event should be fired
  • Media playing Html-icon.png
  • Media start Html-icon.png
  • Media time elapsed Html-icon.png
    • Specify how many seconds of playback should occur before firing the event (whole seconds only; no decimals)
  • Mouse over Html-icon.png
  • Request failed georestriction policy
  • Request passed georestriction policy
  • Video ad end
  • Video ad start


Volume Control Component


Actions Reference

Standard Actions

  • Drag/Stop Drag
  • Set depth
  • Show/Hide Grey-apple-icon.png
  • Tween Blur
  • Tween Color
  • Tween Drop Shadow
  • Tween Glow
  • Tween Property
  • Update Property Grey-apple-icon.png


3d Carousel Component

  • #Standard Actions
  • Change Selection
  • Set Media URL
  • Toggle auto-rotate
    • Off/On/Toggle
    • Delay: specify number of seconds to wait between the event and executing this action


3d Gallery Component


App Container


Audio Component


Auto List Component

  • #Standard Actions
  • Change Selection
  • Scroll
    • Direction: Forward or Backward
    • Specify number of pixels to scroll
  • Page Items
    • Direction: Forward or Backward
    • Option to page by just one media item (default pages by the number of visible list items in the list)
  • Set Media URL
    • This action lets you set or update the URL from which a component pulls its content
    • Select a feed from the dropdown of saved feeds or enter a feed/media URL in the input box


Button Component


Button Bar Component


Container Component


Image/.swf Component


List Component

  • #Standard Actions
  • Change Selection
  • Scroll
    • Direction: Forward or Backward
    • Specify number of pixels to scroll
  • Page Items
    • Direction: Forward or Backward
    • Option to page by just one media item (default pages by the number of visible list items in the list)
  • Set Media URL
    • This action lets you set or update the URL from which a component pulls its content
    • Select a feed from the dropdown of saved feeds or enter a feed/media URL in the input box


Pages Component


Rating Component


Rectangle Component


Scrubber Component


Slide Component

  • #Standard Actions
  • Change Selection
  • Fullscreen
  • Play/Pause
  • Set Media URL
  • Set selected index


Text Component


Text Input Component


Timer Component

  • #Standard Actions
  • Toggle Timer
    • On/Off/Toggle
    • Delay: number of seconds to wait between the event and executing this action
  • Reset Timer
    • Makes the timer begin cycling as if it had just been loaded for the first time


Video Component

  • #Standard Actions
  • Change Selection
  • Fullscreen
  • Mute
  • Play/Pause
  • Set Media URL
  • Video ad end
  • Video ad start


Video Player (basic, all-in-one player)

  • #Standard Actions
  • Change Selection
  • Fullscreen
  • Mute
  • Play/Pause
  • Set Media URL
  • Video ad end
  • Video ad start


Volume Control Component