Archive for April, 2008

Flash onIntervel

Tuesday, April 22nd, 2008

Many years have been using onIntervel and there always is a problem with it. So we have put together this post to help and make your life easier.

Please, note that flash onIntervel is only available from flash 6 player and actionscript 1.

Here is a code i have put together…
//
function funToRun() {
trace(”var1:”+var1);
var1++;
//
if (var1 == 3) {
//
trace(”if cond true”);
clearInterval(intervalItem);
//
}
//
}
//
function stopIntervalFun() {
trace(”stop called!”);
clearInterval(intervalItem);
var1 = 0;
}
//
function startIntervalFun() {
trace(”start called!”);
var1 = 0;
clearInterval(intervalItem);
intervalItem = setInterval(funToRun, 500);
}
//
butt1.onPress = function () {
//
startIntervalFun();
//
}
butt2.onPress = function () {
//
stopIntervalFun();
//
}
//
FLA of onIntervel code

This i have noticed is best way of using the onIntervel method. Be sure to always clearIntervel before moving on. Otherwise there are always problems, where it does not stop and different odd behaviors take place.

NDArts Blog Launched

Tuesday, April 8th, 2008

We are happy to announce that we are launching our company’s Blog at URL http://www.ndarts.ca/blog/. (more…)