Horizontal scrolling and math

Hey,

I used the tutorial on this site:

http://www.kirupa.com/developer/flash5/slidingmenu.htm

to design an interface that scrolls horizontally when you press buttons. However, for some reason, when the mc’s scroll, things get very slow. I haven’t uploaded the site to the net yet and this only is happening when I preview. The movieclips that are scrolling are quite big compared to the tutorial (mine are about 600x600 as opposed to 100x100 as in the tutorial). My question is, is it the fact that my movieclips are so big that everything keeps slowing down, or does it have to do more with the math? I know the math calls for the movie clips to gradually stop at a designated place, if I modify the math to make it go directly to the designated spot, without using an equation to make it ease in, will that make the site run smoothly?

Thanks
chop.

Have you tried increasing your framerate ?

my framerate is at 30 fps by default

Well, if you take out the easing, there won’t be anything smooth anymore :slight_smile:

Anyway, it’s true that moving huge bitmaps is hard for Flash, especially if there are some _alpha manipulations on those images. It is also true that the code of this tutorial is obsolete, and that there are ways to stop the onEnterFrame when they’re not needed…

thanks for the tips.

Is there a modification to this code that will make this run smoothly?

And I understand that if I take out the easing it won’t be “smooth”, but there is a noticeable lag of the movement (not due to the math) that is slowing everything down. I simply want it to run properly, without the stuttering. The entire movie is only 8k!

Thanks.

chop.

I’d say if you’re moving images, compress them so they don’t take much size and processor power. Also, try making them a bit smaller if you can.

I’m not sure the actual size (in kb) is important. I guess it’s the size (in pixels) that is important. Well, maybe not after all… OK you got me, Voetsjoeba, I have a doubt now :bad:

Oh, and just an idea: you could try to check which clip is visible on the screen and which clip isn’t, and set the one’s that don’t appear invisible (with _visible=0). It might save some CPU power :-\

I’m attatching the file. Take a look and see what I’m doing wrong.

Thanks.

You have several movieclips which use masks and each movieclip has about 50 logos on them. And you have 4 of those all contained in movieclip called all which you ease using actionscript. Pretty obvious why it’s so laggy.

I just figured since the filesize was so small, that it wouldn’t matter. What would be a better way of organizing the media? Rather than using 50+ separate graphic files, should I make the arry of logos all one graphic?

That would be a better way, yes. Instead of placing 50 logo’s on screen with a background, rather make the background with the 50 logos an image on it’s own.