PDA

View Full Version : Efficient fadein/fadeout transitions?


giobongio
02-24-2011, 09:34 AM
Hello. I'm building a website with fadein/fadeout transitions between sections. On button click, a white rectangle on the very top layer (filling all the screen) is faded in. Once ended, the section changes and the rectangle fadeout is started.

It technically works, but I've noticed that the first transition is not fluid, while the next are fluid. Does exist an efficient tecnique to achieve the goal?

I'm using transition manager. I've tried to get the same effect with the alpha property on the rectangle, but I haven't got appreciable improvements. Any suggestions?

Thanks in advance.

ASWC
02-24-2011, 01:44 PM
transitionmanager is not the most efficient but it should get a simple fadein/out done properly. You might have some heavy stuff going on while the fadein takes place and that's why you don't get a smooth transition. I would:fadein first, then do the heavy stuff (calculation or whatever your code is doing), then fadeout.

giobongio
02-24-2011, 03:05 PM
Yes ASWC, you are right! This happens exactly when the website starts "playing" (on frame 2, just after the preloader). I've got the rectangle on the top layer and all the sections on lower layers.

But I thought that after preloading, every part of the website had been already loaded, and I didn't have to load any further things...

Thanks for the help.