maskedMan
05-12-2008, 06:45 PM
I'm aware that it is probably a good idea to use cacheAsBitmap when you are dealing with complex vector objects that seldom need to change shape/scale/color (in my case, I'm dealing with a map of the US where each state is its own vector object and they only ever change color when the user requests a new data set). But there are a few other instances where I might be able to use cacheAsBitmap but am not sure whether doing so will actually help me.
For example, I have a legend consisting of a fairly simple gradient bar and several bits of text. Now, the gradient box is of course only four vector points but the fill is a gradient. Would it make sense to turn on cacheAsBitmap for this gradient bar? Does the mathematical computation required to generate the gradient cost more processing power than storing the image as a bitmap?
But let's go a step further... what if the gradient bar legend is inside a movie clip that also contains a background and some text data that only changes in the event that the user selects a new data set? Would I then be able to turn on cache as bitmap for the whole clip?
For example, I have a legend consisting of a fairly simple gradient bar and several bits of text. Now, the gradient box is of course only four vector points but the fill is a gradient. Would it make sense to turn on cacheAsBitmap for this gradient bar? Does the mathematical computation required to generate the gradient cost more processing power than storing the image as a bitmap?
But let's go a step further... what if the gradient bar legend is inside a movie clip that also contains a background and some text data that only changes in the event that the user selects a new data set? Would I then be able to turn on cache as bitmap for the whole clip?