View Full Version : Flashing
beanboy
05-30-2003, 01:36 PM
Hi,
How do you get graphics to flash really fast (ie. one frame full one empty) without increasing the FPS of the movie???
Thanks
pixelwit
05-31-2003, 09:31 PM
Open a new file and set the frame rate to 1 frame per second.
Create a movieclip on the _root timeline and name the instance "SomeClip".
Put this code on the _root timeline:flicker = function(){
SomeClip._visible = SomeClip._visible ? false : true;
updateAfterEvent();
}
setInterval(flicker, 1);That should do the trick.
-PiXELWiT
http://www.pixelwit.com
farafiro
06-05-2003, 12:30 PM
forgive me PIX
but I laughed to death when I saw this, even it's the perfect way to do it
why, donno, maybe I became a fool lately
pixelwit
06-05-2003, 03:19 PM
Just maybe??? :)
Any reason you found it so funny?
-PiXELWiT
http://www.pixelwit.com
JHallam
06-05-2003, 06:35 PM
Maybe cus it was a damn smart way to do it and he couldn't understand?! heh :p
farafiro
06-08-2003, 08:27 AM
I didn't say it's funny, but hmmmmm donno
maybe it's too easy for: "what, why didn't I think of that before"??
anyway, very cool, smart brain here ;)
Skinner
11-08-2003, 03:45 AM
...but how can i stop it after let say a few second ?
pixelwit
11-08-2003, 06:27 AM
flicker = function(){
SomeClip._visible = SomeClip._visible ? false : true;
updateAfterEvent();
}
StopFlicker = function(){
clearInterval(flicker_I);
clearInterval(stopFlicker_I);
}
flicker_I = setInterval(flicker, 1);
stopFlicker_I = setInterval(stopFlicker, 3000);-PiXELWiT
http://www.pixelwit.com
Skinner
11-08-2003, 06:42 AM
Hi pixel thank you for replying :D
... i tested it, looks cool but when i tried refresh it, it happens that SomeClip disappear and sometimes not....@_@ why :confused:
pixelwit
11-08-2003, 06:50 AM
Try changing your stopFlicker function to this:StopFlicker = function () {
clearInterval(flicker_I);
clearInterval(stopFlicker_I);
SomeClip._visible = true;
};-PiXELWiT
http://www.pixelwit.com
Skinner
11-08-2003, 07:41 AM
yo pixel, ok as i thought hehehe :p ... a million thanks to you.
pixelwit
11-08-2003, 08:23 AM
Welcome.
-PiXELWiT
http://www.pixelwit.com
|
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.