Hi there,
This is an old question I posted when the list was down. Does anyone have any suggestions as to how I can minimise cpu usage when using a storyboard/animation(s) that repeat constantly. To explain the scenario, I have a screen that has a background that sort of looks like a night sky. There are say 100 little stars (the same png scattered around with various sizes). I animate the opacity / ScaleX / ScaleY of a random png every 1 second to create a twinkling effect that keeps running the whole time you view the screen. The effect is very nice, however I notice it hogs the cpu. I have tried 2 implementations. In the first implementation I created a storyboard with 3 animations. I created a timer that fired every 1 second, and on the fly set the animations to target one of the pngs randomly (stopping and starting the storyboard each time). This was consuming on average 80% of my CPU. I created a second implementation to see if I could improve the situation. In the second implementation I decided to build up the storyboard in code up front. I create 40 animations up front targeting random pngs, each with a begintime 1 second later than the previous and add them all to the one master storyboard. I then just run that storyboard over and over. However, this approach made no difference to the cpu being consumed. Cheers.
_______________________________________________ ozsilverlight mailing list [email protected] http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight
