SUPER FAST Flash
- Started
- Last post
- 10 Responses
- junetic
if you want blinks or animations to happen really fast, is there a way to control it with actionscript without changing the movie's frame rate??? high fps slows down some computers...
- swollenelbow0
the faster the better, i say...
- XC010
i say...
let the chips fall where they may...
- oates0
i'm partial to:
if you can't beat em, join em
- frankbb0
create a function - this function will change the alpha of something...
changeMc = function () {
}
then using the setInterval(changeMc, 10);
bingo..
all in the dictionary..
you can have a really slow frame rate and the set interval will happen evey 10milliseconds..
- gun0
yeah setinterval rules. even on a mac. not that they count though. and if they did, it would be really slow like.
- junetic0
thankS!!!!...i tried this...it works...
box.onEnterFrame = function(){
box._alpha = 10
}
change1 = function(){
box._alpha = 100
}setInterval(change1,6)
- lostnation0
Also...dont forget to include updateAfterEvent() in your setInterval routine or else it will conform to whatever FPS you're using.
- junetic0
can you show a simple example that uses updateAfterEvent?
- lostnation0
var i=0;
doIt = setInterval(function () {
i++;
i>50 ? clearInterval(doIt) : null;
updateAfterEvent();
}, 10);make sure the variable handler for your setInterval call is not temporary, i.e. defined with the 'var' keyword, otherwise you will never be able to clear it, and your performance will go to hell.
also, note that setInterval is global. you should be able to clear it from any timeline, and so you don't need to declare it with the 'this' keyword, i.e. this.doIt=setInteval.
make sense?
- junetic0
what is "i" for???? i understand the syntax; but not the logic?...i just wanted to make something occur really fast....this kinda worked:
change1 = function(){
box._alpha = 100
updateAfterEvent();}
change = function(){
box._alpha = 0}
setInterval(change1,50)
setInterval(change,2 )