I have developed an application with 2 AxShockwaveFlash
and textBlock
.In AxShockwaveFlash
there is 2 different flash files with their own animation and in the bottom of the form a textblock scroll some text(Ticker).While loading of flash my ticker get stuck and when the flash has some transition then also my ticker get stuck.
I am not getting any clue why my application responds slow while playing or transitioning a flash file.How can I track exactly the problem is?
The simple answer to : Why AxShockwaveFlash take so much memory or process while transitions? is simply because that Someone out there doesn't know how to code a transition without killing the CPU.
To be fair your question didnt give enough helpful info (which led to the rambling answer below). Many people will call something "a Flash animation" when that something is anything from simple text fading in/out.. to a full blown 3D engine game demo to.. some intensive realtime video pixel effects. Just happens to be done in Flash so it's a Flash animation, right?.
A) If you can improve the C# code... Look into improving your WPF/Textblock code
Because if your Textblock is getting slowed down by the additional loading of some multimedia elements (photo, sound, Flash etc) then you simply have to improve that Textblock code.
B) If you can improve the AS3 code... Look for any CPU intense pixel activity. Use bitmapData.lock
and .unlock
if the transitions code uses bitmapData.
If the Flash is externally created by someone else then perhaps there is some ineffecient coding? Check CPU usage by loading just the SWF's (no Textblock). Also consider the nature of your Flash animations for example I've never known SWF's of advert banners & pop-up ads to NOT add CPU usage. I dont know what those people do with their "simple" adverts. Essentially if someone else made it, find an alternative. Else if you have the source code, improve upon the transitions function first amongst others.