Scripting File
_global.counter = function() {
if (!counterId) {
counterId = 0;
}
counterId++;
return (counterId);
};
_global.incValues = function() {
// Values
this.getValues = function(startValue, endValue) {
// Make New Array
incArray = new Array();
// arrange high to low loop
if (startValue>=endValue) {
for (i=startValue; i>=endValue; i--) {
incArray[Math.abs(i-startValue)] = i;
}
incArray.reverse();
}
// arrange low to high loop
if (startValue<=endValue) {
for (i=startValue; i<=endValue; i++) {
incArray[Math.abs(i-startValue)] = i;
}
incArray.reverse();
}
return (incArray);
};
// Interval Switch
this.intSwitch = function(incArray, intLength) {
incLength = incArray.length;
interval = function () {
incLength--;
if (incLength<=0) {
clearInterval(intSI);
}
finalValue = incArray[incLength]; // THIS VARIABLE <---------
};
intSI = setInterval(interval, intLength);
};
};
stop();
Main File
#include "scripting.as"
boxIncValues = new incValues();
arrayvalues = boxIncValues.getValues(0, 100);
boxIncValues.intSwitch(arrayvalues, "100");
stop();
Basically I would like to beable to pull that variable from the functions as a return or a non-assigned variable so I can use them seperately to apply alpha/position ect… to objects.