I’ve a trivial (not for me) question!
I try to move a movieclip via actionscript in the following way:
here is the “stupid” code in the main frame
_root.onEnterFrame=function()
{
ball._x-=5;
if (ball._x<0) ball._x=500;
}
where “ball” is the instance name of the movieclip
The problem is that the ball flickers too much during the animation, even if the frame rate is the highest and even if the movieclip is the simplest one (in this case a small ball)!
How can I reduce this horrible effect?
Thanks!
S.
use tween class
google look at tuts on the main page of the website…
I just tried the “MC TWEEN” class, the motion is very smooth but the movieclip still flickers.
My laptop is powerfull so it cannot be a ram or cpu problem…
What to do?
Thanks a lot,
Simone
you probably have more than one frame in your ball clip, which is causing it to flicker
ie, frame 1, ball
frame 2, nothing
played quickly it makes it flicker
either stick in a stop() command or get rid of the extra frame
use updateafterevent method.
No, my movielcip has a single frame, and also the stage has a single looping frame.
It seems that flash is too slow to refresh the screen, as it always happens (for example using openGL) in a “non double buffer” animation.
I’m getting crazy!!! This flickering occurs also in all the examples I downloaded.
Help!!!
S.
use this,
updateAfterEvent();
I tried to use updateAfterEvent() , but it seems to apply only on some event as explained in the help :
"This function works only with certain Mouse and MovieClip handlers: the mouseDown, mouseUp, mouseMove, keyDown and keyUp handlers for the Mouse class; the onMouseMove, onMouseDown, onMouseUp, onKeyDown, and onKeyUp handlers for the MovieClip class. It does not work with the Key class. "
Can someone give me a link to an example file which surely works?
thx
post your fla and I will post mine
Here is the fla
it uses mc_tween2.as
S.
your CS3 screams and runs
thats your answer, are you sure you have cs3 tween class version?
are you AS3 or AS2… some people post in the first forum they come across
I downloaded this
http://hosted.zeh.com.br/mctween/
and I use AS2 in Flash CS3…
What you mean with " your CS3 screams and runs " ?
S.
you will have to export it as flash 8 format
I don’t use mc tween but see what I can do to help
thank you
I exported in flash 8 format but the flickering is here again!!!
Can you post me your fla to try if it is a problem of my pc?
S.
give me the flash 8 version, because I don’t have cs3 I meant
Here is the fla version flash 8 (it uses mc_tween2.as)
Heeelpppppppp!
S.
your just the most insane noob… I might just like you
import mx.transitions.Tween;
import mx.transitions.easing.*;
var tw1:Tween = new Tween(ball, “_x”, Strong.easeIn, 100, 0, 5, true);
try the default tween class in flash
try putting in stop() in , I assumed you had
I don’t know that tween class… but no major problems my end, although onload part of the tween command seemed off to me
Ok last question!
look at this site
http://www.oman3d.com/tutorials/flash/tweenclasseasing/
In the middle of the page there is an example of the tween for 2 balls!
The motion is smooth but there is the “famous flickering” !
Can you tell me if you see it?!
thank for the attention!
S.