| Home | Tutorials | Forums | Articles | Blogs | Movies | Library | Employment | Press | Buy templates |
|
|
#1 |
|
Obfuscated Coder
Join Date: Apr 2008
Posts: 681
|
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? Last edited by maskedMan; 05-12-2008 at 06:49 PM.. |
|
|
|
|
|
#2 |
|
Registered User
Join Date: Jun 2008
Location: Arizona
Posts: 1
|
Yes, for complex vector data that *does not* scale or rotate it is good to cache it. Text is vector as well and is fairly slow to move or animate if not cached due to its complexity.
You will good to cache the entire container sprite. Even if it has text inside of it that is selectable it can help. Since you can't set cacheAsBitmap on a textField it is common to put it in a sprite and turn on caching. It does require memory though to process the vector into a bitmap and store it. But initial performance cost and memory is negible if your sprite is small. |
|
|
|
|
|
|
|
|
#3 |
|
L'eggo my Lego
Join Date: Aug 2006
Posts: 10
|
Does setting a MovieClip's cacheAsBitmap property to true and adjusting the MovieClips alpha values a detriment?
Are scale and rotation the only two characteristics that are detrimental to using cacheAsBitmap? |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Clicks don't work in loaded AS2 movie | tropicaltalent | ActionScript 3.0 | 3 | 05-02-2008 02:23 AM |
| FLV in external AS2 SWF not showing up when loaded to AS3 swf | pcmxa | ActionScript 3.0 | 0 | 04-10-2008 10:21 PM |
| Loading AS2 .swf files | Izend | ActionScript 3.0 | 0 | 02-26-2008 11:59 PM |
| AS2 email script:: SWF loader for AS3 file into AS2 container | Loksim | ActionScript 2.0 | 5 | 02-12-2008 05:45 PM |
| AS3 loads AS2 swf. AS2 swf not displayed | darbar | ActionScript 3.0 | 0 | 07-20-2007 10:12 PM |