all groups > flash actionscript > may 2004 >
You're in the

flash actionscript

group:

components seem to be lagging behind and causing a flicker effect.


components seem to be lagging behind and causing a flicker effect. andles
5/1/2004 11:27:47 PM
flash actionscript:
I have a movie clip which has textfields attached to it and a few mx2004
components (button and checkbox), I attach this at runtime with using
Actionscript - the text fields displays instantly, however the components do
not kick in untill up to a second later. This problem is intensified as the
user navigates through my screens ( attached movie clips ) as it cause a
flicker effect each time i redraw the screen.

I even tried a dummy flash file in which I attached a standard clip and also
adttached a component at positions along the timeline - as the timeline
played my attached clips showed up as expected, yet the componnet very
clearly lagged behind, almost as though it faded in instead of just
appearing at the same time as the other content.

I have looked at alternate ways of attaching at runtime, tried to suss out
if invalidate or redraw can help, and god knows what else. Are the
components just slow, eben when they are already loaded into the player and
have been used on screen many times before???

Any help with this would be highly appreciated!!

Andles.

Re: components seem to be lagging behind and causing a flicker effect. Jan-Paul K.
5/2/2004 9:13:39 AM
Hi,

could you post your fla here or at least the AS used?

Regards,
Re: components seem to be lagging behind and causing a flicker effect. andles
5/2/2004 5:31:57 PM
Hi Paul,

Thanks for your response.

I have attached the AS used - but it is largely irellavant - I think - as I
have the same problem in FlashMX2004 as a whole - not just this section of
code. The only constant is that I use attachMovie and attach a component at
the same levell the previous compoennt was at. For example:


renderScreen( mcRef ){

.... blah blah blah ......

this.panel = mcRef.createEmptyMovieClip("nPanel",6);


// the 'Next' button.
if((this.index + 1) < total){
this.panel.attachMovie("Button","nextButton",46);
this.panel.nextButton.setLabel("Next >>");
this.panel.nextButton._x = 470;
this.panel.nextButton.addEventListener("click",screenManager);
}
.... blah blah blah ......

}

this renderScreen function is called each time I draw a new screen - what I
expect is the new component to immediately appear in place of the old one.
What does happen is that I get a flicker effect between the old one being
removed and the new one actually appearing.

When I do this this with a standard movie clip with a graphic in it, I get
the effect i was looking for - but not when I use a component. My app is a
series of screens that redraw thmselves each time the user clicks next or
previous - this flicker is quite noticable as the other elemnts that I load
at the same time (textfields etc) appear immediately, and then a split
second later the components decide to show up!

Andy.




[quoted text, click to view]

AddThis Social Bookmark Button