Yes, that behaves really well!
Thats great. Thanks.
I’m having a problem with it on Android. It doesn’t stop. Any ideas?
thanks
Randy
I do not have an android so cannot see what going on… also " It dosen’t stop " is not very enlightening !.
Ok. The stepper keeps running. Numbers increase with no control. I’m finding out that another stepper I created also doesn’t work on Android. I’ll investigate.
thanks,
Randy
thanks…
While reviewing this for another post.
I add a slight update to allow for multiple symbols to use the yourFunctions()
This was simply done by using a global for the last symbol's stepper being used.
The symbols already work independently but the point is to be able to direct your function to relate to the stepper being used.
The symbols can be either duplicated of copied on scene.
The simple change is to add just below this block in the stepper()
//-- get symbol instance
var symbolInstance = null;
var parentSymbolElement = element.parentNode;
while (symbolInstance == null && parentSymbolElement != null) {
symbolInstance = hypeDocument.getSymbolInstanceById(parentSymbolElement.id);
parentSymbolElement = parentSymbolElement.parentNode;
}
This line
//--- set global for last clicked stepper symbol element.
clickedStepper = symbolInstance.element()
Then use it in the yourFunctions() function
Like so;
Note the txt boxes in the symbols would need to use a class name of txt
//-- clickedStepper is a global for the last clicked stepper symbol , see stepper()
var thisHypeStepperTxt = clickedStepper.querySelector('.tx') //--- the example text box has a class of txt
thisHypeStepperTxt.innerHTML = document.querySelector('#' + clickedStepper.id).querySelector('.hypeStepper').value
Stepper_MHv7.hypesymbol.zip (44.6 KB)