# Movieclip flickering

**URL:** <https://forum.kirupa.com/t/movieclip-flickering/264861>\
**Category:** Uncategorized\
**Created:** [July 1, 2008, 10:43am UTC](https://forum.kirupa.com/t/movieclip-flickering/264861 "2008-07-01T10:43:03Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![00simone00](https://avatars.discourse-cdn.com/v4/letter/0/2bfe46/32.png) [@00simone00](https://forum.kirupa.com/u/00simone00)\
**Post date:** [July 1, 2008, 10:43am UTC](https://forum.kirupa.com/t/movieclip-flickering/264861/1 "2008-07-01T10:43:03Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![randomagain](https://avatars.discourse-cdn.com/v4/letter/r/35a633/32.png) [@randomagain](https://forum.kirupa.com/u/randomagain)\
**Post date:** [July 1, 2008, 11:04am UTC](https://forum.kirupa.com/t/movieclip-flickering/264861/2 "2008-07-01T11:04:28Z")

</div>

use tween class

google look at tuts on the main page of the website…

---

<div class="post-metadata">

**Author:** ![00simone00](https://avatars.discourse-cdn.com/v4/letter/0/2bfe46/32.png) [@00simone00](https://forum.kirupa.com/u/00simone00)\
**Post date:** [July 1, 2008, 11:15am UTC](https://forum.kirupa.com/t/movieclip-flickering/264861/3 "2008-07-01T11:15:33Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![randomagain](https://avatars.discourse-cdn.com/v4/letter/r/35a633/32.png) [@randomagain](https://forum.kirupa.com/u/randomagain)\
**Post date:** [July 1, 2008, 11:30am UTC](https://forum.kirupa.com/t/movieclip-flickering/264861/4 "2008-07-01T11:30:16Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![abrarshf](https://avatars.discourse-cdn.com/v4/letter/a/a698b9/32.png) [@abrarshf](https://forum.kirupa.com/u/abrarshf)\
**Post date:** [July 1, 2008, 11:46am UTC](https://forum.kirupa.com/t/movieclip-flickering/264861/5 "2008-07-01T11:46:17Z")

</div>

use updateafterevent method.

---

<div class="post-metadata">

**Author:** ![00simone00](https://avatars.discourse-cdn.com/v4/letter/0/2bfe46/32.png) [@00simone00](https://forum.kirupa.com/u/00simone00)\
**Post date:** [July 1, 2008, 11:47am UTC](https://forum.kirupa.com/t/movieclip-flickering/264861/6 "2008-07-01T11:47:29Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![abrarshf](https://avatars.discourse-cdn.com/v4/letter/a/a698b9/32.png) [@abrarshf](https://forum.kirupa.com/u/abrarshf)\
**Post date:** [July 1, 2008, 11:49am UTC](https://forum.kirupa.com/t/movieclip-flickering/264861/7 "2008-07-01T11:49:11Z")

</div>

use this,  
updateAfterEvent();

---

<div class="post-metadata">

**Author:** ![00simone00](https://avatars.discourse-cdn.com/v4/letter/0/2bfe46/32.png) [@00simone00](https://forum.kirupa.com/u/00simone00)\
**Post date:** [July 1, 2008, 11:50am UTC](https://forum.kirupa.com/t/movieclip-flickering/264861/8 "2008-07-01T11:50:54Z")

</div>

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. "

---

<div class="post-metadata">

**Author:** ![00simone00](https://avatars.discourse-cdn.com/v4/letter/0/2bfe46/32.png) [@00simone00](https://forum.kirupa.com/u/00simone00)\
**Post date:** [July 1, 2008, 11:53am UTC](https://forum.kirupa.com/t/movieclip-flickering/264861/9 "2008-07-01T11:53:30Z")

</div>

Can someone give me a link to an example file which surely works?

thx

---

<div class="post-metadata">

**Author:** ![randomagain](https://avatars.discourse-cdn.com/v4/letter/r/35a633/32.png) [@randomagain](https://forum.kirupa.com/u/randomagain)\
**Post date:** [July 1, 2008, 11:59am UTC](https://forum.kirupa.com/t/movieclip-flickering/264861/10 "2008-07-01T11:59:19Z")

</div>

post your fla and I will post mine

---

<div class="post-metadata">

**Author:** ![abrarshf](https://avatars.discourse-cdn.com/v4/letter/a/a698b9/32.png) [@abrarshf](https://forum.kirupa.com/u/abrarshf)\
**Post date:** [July 1, 2008, 12:03pm UTC](https://forum.kirupa.com/t/movieclip-flickering/264861/11 "2008-07-01T12:03:00Z")

</div>

You use the tween

---

<div class="post-metadata">

**Author:** ![00simone00](https://avatars.discourse-cdn.com/v4/letter/0/2bfe46/32.png) [@00simone00](https://forum.kirupa.com/u/00simone00)\
**Post date:** [July 1, 2008, 12:05pm UTC](https://forum.kirupa.com/t/movieclip-flickering/264861/12 "2008-07-01T12:05:51Z")

</div>

Here is the fla  
it uses mc\_tween2.as

S.

---

<div class="post-metadata">

**Author:** ![randomagain](https://avatars.discourse-cdn.com/v4/letter/r/35a633/32.png) [@randomagain](https://forum.kirupa.com/u/randomagain)\
**Post date:** [July 1, 2008, 12:10pm UTC](https://forum.kirupa.com/t/movieclip-flickering/264861/13 "2008-07-01T12:10:37Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![00simone00](https://avatars.discourse-cdn.com/v4/letter/0/2bfe46/32.png) [@00simone00](https://forum.kirupa.com/u/00simone00)\
**Post date:** [July 1, 2008, 12:14pm UTC](https://forum.kirupa.com/t/movieclip-flickering/264861/14 "2008-07-01T12:14:21Z")

</div>

I downloaded this  
[http://hosted.zeh.com.br/mctween/](http://hosted.zeh.com.br/mctween/)

and I use AS2 in Flash CS3…

What you mean with " your CS3 _screams and runs_ " ?

S.

---

<div class="post-metadata">

**Author:** ![randomagain](https://avatars.discourse-cdn.com/v4/letter/r/35a633/32.png) [@randomagain](https://forum.kirupa.com/u/randomagain)\
**Post date:** [July 1, 2008, 12:18pm UTC](https://forum.kirupa.com/t/movieclip-flickering/264861/15 "2008-07-01T12:18:25Z")

</div>

you will have to export it as flash 8 format

I don’t use mc tween but see what I can do to help

---

<div class="post-metadata">

**Author:** ![00simone00](https://avatars.discourse-cdn.com/v4/letter/0/2bfe46/32.png) [@00simone00](https://forum.kirupa.com/u/00simone00)\
**Post date:** [July 1, 2008, 12:25pm UTC](https://forum.kirupa.com/t/movieclip-flickering/264861/16 "2008-07-01T12:25:47Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![randomagain](https://avatars.discourse-cdn.com/v4/letter/r/35a633/32.png) [@randomagain](https://forum.kirupa.com/u/randomagain)\
**Post date:** [July 1, 2008, 12:32pm UTC](https://forum.kirupa.com/t/movieclip-flickering/264861/17 "2008-07-01T12:32:09Z")

</div>

**give me the flash 8 version,** because I don’t have cs3 I meant

---

<div class="post-metadata">

**Author:** ![00simone00](https://avatars.discourse-cdn.com/v4/letter/0/2bfe46/32.png) [@00simone00](https://forum.kirupa.com/u/00simone00)\
**Post date:** [July 1, 2008, 12:47pm UTC](https://forum.kirupa.com/t/movieclip-flickering/264861/18 "2008-07-01T12:47:29Z")

</div>

Here is the fla version flash 8 (it uses mc\_tween2.as)

Heeelpppppppp!

S.

---

<div class="post-metadata">

**Author:** ![randomagain](https://avatars.discourse-cdn.com/v4/letter/r/35a633/32.png) [@randomagain](https://forum.kirupa.com/u/randomagain)\
**Post date:** [July 1, 2008, 12:58pm UTC](https://forum.kirupa.com/t/movieclip-flickering/264861/19 "2008-07-01T12:58:07Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![00simone00](https://avatars.discourse-cdn.com/v4/letter/0/2bfe46/32.png) [@00simone00](https://forum.kirupa.com/u/00simone00)\
**Post date:** [July 1, 2008, 1:50pm UTC](https://forum.kirupa.com/t/movieclip-flickering/264861/20 "2008-07-01T13:50:38Z")

</div>

Ok last question!

look at this site  
[http://www.oman3d.com/tutorials/flash/tweenclasseasing/](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.

[Next page](https://forum.kirupa.com/t/movieclip-flickering/264861.md?page=2)
