PDA

View Full Version : Radio button performance


fgf
05-16-2003, 04:45 PM
I just stuck 7 (largely cosmetic, no scripting) radio button components into a movie.

All it is is one timeline some text graphics and some nextFrame prevFrame buttons.

When the movie is first loaded there is a noticeable pause entering the frame with the radios. After flicking back and forward for a while the lag is now up to 7 seconds.

What are these components doing? And why does it get worse each time they run?

oooh got the lag up to 11 secs now. (600mhz 256meg win2k)

fgf

RVK
05-16-2003, 11:37 PM
You know, I have noticed that exact same problem using Flash UI components. I have a e-commerce site which I used them, and DAMN! it's soooooo slow. So I was forced to create my own, now it's fine.

I didn't find a solution other than to make custom radio buttons. But that requires a bit of scripting. I'd be interested in hearing more!

-R

CyanBlue
05-17-2003, 03:18 AM
I once had 40 something components(radioButton and checkBox) on the stage... It was for the form stuff... WoW... That nearly killed me and my computer... :D

What I did was to use attachMovie() function with the proper coordinates, and that kinda solved the initial lag problem... It wasn't great or perfect, but it solved the problem, at least for me... ;)

Custom component sounds good, RVK... ;)

Mortimer Jazz
05-17-2003, 03:52 AM
As you switch between the frames the radiobutton instances keep being reinitialised. Flash must be retaining some or all of the data each time, so it's building up and choking the processor.

I'm not really up on OOP, so I'd be interested to hear what part of the code may be causing this, from somebody who is. The only thing I could spot is that mc's are being attached, but they are not deleted in the initialisation. Surely Classes and prototypes aren't the cause of this(?!)

Anyhow, to prevent it from happening, the easiest way is to place all of your radiobuttons/form in a movieclip and simply move the clip offstage (rather than delete it), and back onstage when you next need it.

Just tested it and it works perfectly (too big to attach to thread though.)

fgf
05-19-2003, 11:55 AM
Thanks for thinking of way to to deal with MM components ...

But I think i'll code my own in future.

I always had a misstrust of MM's ability to script (Mainly from some sucky javascript. How can you write so much code for something that still doesn't work). Seems I was right to be sceptical.

fgf

CyanBlue
05-19-2003, 11:30 PM
How can you write so much code for something that still doesn't workThat sounds exactly like my codes... :D