What is 开发者_如何学JAVAthe best way to create a frame by frame animation composed of png files on windows phone 7 application (silverlight)
This can be easily done in Android using AnimationDrawable and in iOS using UIView animationImages.
You can use a storyboard to animate the source property of an Image control, you can find some example code Candle Tutorial
This article discusses 4 ways how to do animations:
- Storyboard-based animations created in a) Xaml, b) code
- Per-frame animations
- Timer-based animations
There is no "best way", i.e. the answer depends on your goal. Basically
- Storyboard animations are nicest (highest frame rate), take most CPU cycles (because they make use of a privileged thread), support only primitive property types. You also have to learn respective API that can be used either in Xaml or in the code.
- The other 2 types provide less fluent, but more CPU-effective approach. You have no limitations, but also no support - in other words you have to do everything yourself. (Which is often easier than using the Storyboard language.)
精彩评论