Motion Corporation
Developer Section
Motion Control Tutorial

Motion alone is not much fun. You should use it for some purpose. However, independent of purpose, it often makes sense to start by making a remote control for your motions. You will likely use this all the time as you are developing, debugging, testing, demoing and running your applications.

Fortunately, this is not very difficult, and also a great way to get familiar with the Motion API. You simply make a new web-page, say myremotecontrol.html, include motion, and start connecting some visual components (e.g., buttons, sliders, text-input) to the motion.

Different applications require different remote controls. Have fun making sensible controls for you applications. And be creative - a list of “bookmarked positions” may be an excellent remote control - immediately taking you to an interesting point in your story, by updating the motion.

To help you on your way, Motion Corporation offers a motion-enabled slider as part of its supplementary JavaScript library, TrueMagic (TM). Using this, we here show an example of how to make a simple, multi-purpose remote control.

Example Code

Multi-purpose Remote Control : View HTML

Code Snippets

Motion Corporation offers a motion-enabled slider based on the JQuery UI slider. Include JQuery and the following TrueMagic (TM) UI addons.

<!-- Import Motion Corporation UI Addons -->
<script type="text/javascript" src="http://www.mcorp.no/lib/addons/magic-ui-2.0.js"></script>

When document and motions are ready, initialise motion-enabled slider.

TM.JQSlider($("#slider"), motion);