HUMA system: Manual under Construction Cursors


Cursor in HUMA does not just refer to a position pointer, but stands for a piece of flash media and the Actionscripts inside it that is controlled from the HUMAruntime. To create a cursor use the 'ActionScript Cursor' command in the 'Media' menu.

Advanced Flash Cursors Scriptable Flash Cursors are the key to integrating your own code into a HUMA application and let you create your individual models of interactivity and causality by means of ActionScript. HUMA supports Actionscript Version 5, MX specific features will either not do anything or crash your application.
To integrate an actionscript layer we strongly recommend using the supplied template flash project. Of course you can roll your own, but before doing so take a minute and look at the template, which is investigated in the following:
Working with Actionscript necessarily means working in two programs parallely: HUMAtagger and Flash. You will import swf files into HUMAtagger, then change their scripts in Flash. Pity is: Flash will refuse to (re)export scenes or movies long as the swf is open in the Tagger. On top of that, references in the HUMAmovie may get confused when externally editing a once imported swf. We have therefore come to a solution that once imports a top layer swf, which then loads external swf-files at runtime by using Flash's 'loadMovie' command. You can thus work on your subscenes with no limit long as you don't change anything in the top level. The only disadvantage this has is, that all the loaded external swfs will have to be either right next to the project movie on your harddrive (no subfolders) or somewhere on an internet server.... One should therfore drop the .fla file to the project directory and start Flash from there, then dump out the subscenes by using "test scene"
The template project is made up like this. It has one scene, with three layers. One of these layers holds one or more instances of a symbol named HUMAtarget which serve as loadzones for external swfs at runtime.
All you need to do is adjust some values here and then import it as for instance "AStemplate_Scene1.swf" using the cursor import function mentioned before. Then design and script your flash in the "templateSub" symbol

Scene1, "targets" layer, frame 1

/*Adjust to the number of swfs you load and add/delete the appropriate target symbols and load commands.
the targets instance names MUST be t+indexNumber (t0, t1,*/

numTargets = 2;

loadMovie ("AStemplate_templateSub.swf", "_root.t0");
loadMovie ("AStemplate_templateSub.swf", "_root.t1");
loadMovie ("HUMAreceiver.swf", "_root.huma");
Here is the ActionScript from said frame. As the comments point out, all you have to do is set the number of targets you plan to load and adjust the filenames. When adding more targets make sure you name their instances on stage as described ("t0, Then position and scale the loadzones on stage to your needs. Of course you may also resize the movie and adjust its background, framerate etc.

Symbol "templateSub" , "logic" layer , frame 1

function sensorInput (x, y) {
/*your code here*/

function sceneChanged (link, scene) {
/*your code here*/

function initFinish (link, nextscene, finishingMode) {
/*your code here*/

function setFlag(flag, value) {
/* flags:
1 - HUMAHotspot, value : HotspotID 1 - 4, 0 means out of hotspot

your code here*/
This is the level you will do your work in. You're free to do whatever is possible in Flash5, complex scripting, tween- and keyframe animation, sound integration, whatever. Add as many movieclip symbols as you want to as many layers as you want and link them with the functions supplied in this frame:
sensorInput(x,y) : constant transmission of HUMA's xy coordinates, as generated by a user in a sensorfield, on a stiring wheel or whatever. Use this to position, scale or modify your symbols dynamically, fade sound etc.
sceneChanged(link, scene) : called when the runtime switches scenes. Parameters notify you of the link excecuted and the scene now playing. Link IDs are defined as follows:
1 - linka
2 - linkb
3 - linkc
4 - linkd
5 - click
6 - timeout
7 - exit

initFinish(link, nextscene, finishingMode) : called when a switch decision has been made and the runtime starts to finish the currently playing scene. As usually user input is turned off in that moment, you might want to react with something here. Parameters: link - link ID, see above; nextscene - the upcoming scene; finishing mode - one of the HUMA finishingModes.
setFlag(flag value) : This is used to notify you of certain events. Currently only one is defined: the HUMAhotspot. The flag will change to 1 and the flagvalue will indicate which hotspot is being passed(1 - 4). A value of 0, means that the hotspot is over.
A word on general understanding: These functions are called from the HumaReceiver swf in _root level. It's not you that calls them, you just react or you do not!

Please note that all incarnations of Flash Cursors can make use of all the callback functionality available for flash media. Refer to the Flash page for an introduction and a listing of the available actions and messages.