does anyone here knows how to convert this expression below to lingo:
for(var channel=1;channel<30;channel+=3)
there is already sample below on how to use for statement to repeat with, my problem is i dont know how to use channel+=3 in lingo statement since they only provided channel++.
//Lingo
on puppetize
repeat with channel = 1 to 30
_movie.puppetSprite(channel, TRUE)
end repeat
end puppetize
// Javascript
function puppetize()
{
for(var channel=1;channel<30;channel++)
{
_movie.puppetSprite(channel, true);
}
}
hope you could help me with this. thanks.
As the Lingo reference says about the repeat keyword having no incrementing syntax, you are indeed adding 1 to channel yourself. But did you try using a more basic syntax
c = c + 1instead ofc++orc += 1? Also, in Lingo, you would be adding only 2, because the repeat loop is already adding 1 on it's own. Please see below.