Reputation: 2227
Hy, i have tried to search all around the internet to find a very basic solution to a simple question, in which i end up getting either lots of more details or even lesser, considering i am fairly new to AS3 and trying my best.
In the Library, i have created a movie clip, in which i loaded one single PNG image. No animations in the clip, no fancy stuff.
Since i have lots of movie clips created with the same concept, i am experiencing some sort of slow response from the game.
I have read that using GPU mode ( which i already do ) along with using sprites would increase the performance intensively.
Can someone please try to explain to me, a newb in as3, how can i load the image inside of a sprite instead of using movie clips.
Upvotes: 0
Views: 106
Reputation: 7316
Your mistake is that you are assuming you are fully utilizing GPU render with Hardware Acceleration option set to GPU. In fact, that greatly depends on your hardware as described here (search for GPU keyword): https://helpx.adobe.com/animate/using/publish-settings.html
To get the full advantage of GPU processing you need to use the Stage3D technique. Also, I doubt one could use it as is - Adobe have implemented it on a low level, so you need to use some GPU-enabled framework, like Gamua Starling. The next problem you will be facing is that Starling (as well as the other GPU frameworks) does not think in terms of timelines and MovieClips and all the other classic Flash objects, they think in terms of textures, atlases and - yes - sprites (probably you've been advised about them) and other GPU-related stuff.
I know this sounds pretty complicated, but as far as I know you cannot avoid Starling or such as long as you want to build a fast, responsive and graphically rich mobile application with Flash/AIR. The thing is that Flash uses a lot of CPU power to render things, while mobile devices do not come with CPU powers (but with decent GPUs at the same time), so classic Flash will be slow as soon as it needs to redraw the content each frame.
Upvotes: 1