My flash actions layer contains the whole source code.
My question is: why does the actions layer get executed with a fresh start (new variables) more then once?
the following code snippet demonstrates what i mean:
var notyetexecuted:Boolean=true;
function addNetStream(counter) {
if (notyetexecuted = true) {
trace(notyetexecuted);
notyetexecuted=false;
}
}
this always returns true which implies that the actions layer is executed again.
coming from java this doesnt make sense for me.
/edit: i forgot to mention that i have an interval function (still boolean should be false and addNetStream should do nothing)
function User():Void {
trace("Aktuelle Anzahl User: " + counter);
if (counter > prevcounter) {
addNetStream(counter);
counter++;
} else if (counter < prevcounter) {
}
}
myInterval = setInterval(this, "User", 3000);
could any1 explain why this is the case and how Flash executes layer?
cheers.
It is because of your test on this line:
It is setting notyetexectuted to true it should be:
Note the double ==