This page was last modified 14:18, 23 March 2008.
Optimize flash lite
From Forum Nokia Wiki
Optimizing Flash Lite for the best user experience
Below are some tips for improving performance and quality of Flash Lite work.
In what context will the content be viewed? - This is key when designing. For example, if you’re creating a travel guide it may be viewed in high sunlight and subtle colours won't be seen.
Images aimed at mobiles - When exporting images from Photoshop ready for flash - use Image Ready or Photoshop CS3 “Save for web” feature – File > Save for web. This allows added control over PNG’s such as number of colours used. You can normally reduce the colours thus reducing the file size without affecting the final quality.
JPEG quality slider in Flash 8 - The “JPEG quality” slider in “Publish Settings” does NOT affect the quality of JPEGs used in your flash piece, it will only affect PNGs. Due to this it is best practice to keep the quality high and optimize your graphics before they are imported.
Vector vs Bitmap graphics in Flash - When creating assets to import into flash it is important to import according to their desired use. For example raster graphics such as PNGs have a larger file size but are best for animation as the player renders them much faster. For static graphics, vectors are best as their file size is a lot smaller than raster graphics but they require more processing.
Optimize vector shapes- In Flash use Modify > Shape > Optimize to optimize symbols before publishing. This will improve performance and reduce the file size.
Reduce quality during animations – In Flash Lite you can use the SetQuality fscomand2 (fscommand2("SetQuality" ,"medium")) during animations to reduce the quality during an animation to increase the animation's performance.
Avoid overlapping between regions - You can see the redraw region by quickly altering the publishing profile to Flash Player 8. File > Publish Settings > Version > Flash Player 8. Then if you test the movie, Control > Test Movie, you will now be able to use flash 8’s “Show redraw region” by selecting View > Show redraw region. When finished be sure to set the profile back to Flash lite.
Positioning assets - In Flash use the View > Snapping > Snap to pixels. When positioning objects, make sure that their positions are integers. This will prevent extra pixels being created by the player and mean the graphics are sharp and crisp when rendered on a handset.
Scaling - Make sure when you’re importing assets that they are the right size, as scaling them will require memory when run.
Frame rate - The Flash lite player will only run as fast as the handset will allow, regardless of the fps set when publishing. 12fps is ideal when working within Flash lite because it allows the player to play the content smoothly and by using fewer frames you are reducing the file size.
The timeline in Flash Lite - Use symbols such as Movie Clips to hold your artwork rather than the main timeline. As when using gotoAndPlay the Flash Player needs to initialize every frame between the current frame and the requested frame. Also try and avoid having all your content in the first few frames as this will mean the file loads slowly at the start.
Test on real devices – Device emulators such as Adobe Device Central are great but will never match testing on a real device, be it a phone, console or other.
Hiding Movie Clips - If you can’t see a Movie Clip delete it instead of just hiding it.
-- Chris Browne
| Related Discussions | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Video streaming in flash lite | vinaykk | Flash Lite on Nokia Devices | 3 | 2008-02-11 13:11 |
| How to make a Flash screensaver? | MobileVisuals | Flash Lite on Nokia Devices | 4 | 2008-01-03 13:35 |
| Is possible to insert Flash Lite content inside Symbian Container | fjorge_ht | Flash Lite on Nokia Devices | 5 | 2007-12-01 21:49 |
| What happened with animoi??? | Pepper_91 | Mobile Java Media (Graphics & Sounds) | 4 | 2006-10-09 09:48 |
| Browser tosses unknown mimetypes? | cypher181 | General Symbian C++ | 5 | 2006-11-30 19:52 |
