At 8/18/08 08:40 PM, hesselbom wrote:
Also, your logic doesn't make sense in your comment that you should always use enterFrame events over intervals. There are different uses of both and you should use what you see fits best for your purpose.
Yeah, but I was helping solve his problems, where my method was needed.
And Rammer, I know that setInterval isn't a bad function, and it's alot better for precise things, but I was just trying to get the point across that for a more 'dynamic' use of setInterval, it's better to just go w/ the method I came up w/.
At 8/18/08 08:40 PM, hesselbom wrote:
You don't really get how ActionScript works even at a basic level, right?
You know, I'm no retard at AS, but trying things isn't a bad idea, also don't be an asshole.
In ActionScript, numbers aren't pointers and there's no way to treat them as such. Thus, if you pass the value of a number variable to a function parameter (e.g. setInterval) it will be the value of the variable passed and not a reference to it.
Ok cool, I gave it a shot, and it didn't work, but flaming someone for trying out a method like that when they NEEDED to have the interval change its 'run time' (or w/e it's called) isn't neccesary, you could've just said,
"Set Interval can still be used for 'less dynamic' actionscript, and the reason why the setInterval doesn't cope well w/ variables is because the value of the variable used in the function parameter doesn't change because it's not a reference to the variable."
But still both methods work, I'm not arguing this, but there's nothing wrong w/ using my method either.