Managing bitmap compositions in Flash.

Imagine you have a Flash website that makes use of hundreds of images that need to be regularly updated. Picture a virtual shop with a range of garments that need to updated seasonally. There are essentially three ways to help us manage these updates. That may be combined, extended and varied according to the needs of the specific project.

  1. Content management system that allows administrators to select a garment from a list of thumbnails and upload another image to replace it,
  2. Manually enter the Flash movie and import each new image and swap the old bitmaps for the new ones.
  3. Externally loaded images that can be switched by swapping the old images with the new in a central image repository directory.

At first glance most developers would rule out option 2 but when combined with bitmap fills, a very powerful means of organising, exactly positioned, multiple bitmaps is revealed.

Take the following PNGs

Test1
Test2a
Test2b
Test2c

So we can load one image into Flash that contains all the data of any number of separate bitmaps. Select the bitmap on the stage in Flash and Modify>Break Apart. You may now use the lasso tool to select regions of the bitmap and save them off as individual symbols. Positioning them within your “virtual shop” as required.

So what? Well the clever bit comes when you need to update the images. All you need to do is open the main bitmap .psd in photoshop and edit away, hundred of images may be swapped out and replaced etc. If you’re sensible and set up your original document with crop marks and guides, you can maintain absolute control over each symbol in Flash when you come to update the bitmap in the Library.

Once you’ve saved off your new image, select your bitmap in the Flash Library > right click >select Properties>Update. Flash with automatically replace the main image with the new one (if saved with the exact name and in the same location as the original) or allow you to navigate to another location to select the new bitmap.

Once this is done, not only will the main bitmap be updated, but so too with all the 100s of symbols you created with the lasso tool earlier. Magic!

ADDITIONAL NOTES:

There is a variation of this idea which may be a possible combination of options 2 and 3, using the beginBitmapFill function. The idea being, you import your original image lasso it into multiple symbols, position itcorrectly on your stage, then import the latest version of the bitmap via actionscript to replace the bitmapFill dymanically, meaning you don’t even need to open Flash anymore.

Note to self – when you have a moment check this out.

Random News Flash Module in Joomla

Do you want a module to display the first sentence of a random news article every time you refresh your Joomla based website? Fear not help is on the way.

1) Write your news article and note the Read More button located at the very bottom of the text edit panel. Basically you write a brief intro at the beginning of your article and hit the Read More button to separate it from the main content of your website.

readmore1

2) In the paramenters panel on the right of your screen find Intro Text and select Hide from the drop down list.

readmore2

3) Go to the Newsflash module in the Module Manager, copy it and rename the copy with a suitably logical name. eg: myNewsFlashModule

4) Edit myNewsFlashModule and add the following settings to the Advanced Parameters Panel

5) Note the option to Randomly Change one at a time and the blank No of Articles field.

newsFlashModule

Flash Video from After Effects

Noticed something rather odd, the other day. If I export an flv from After Effects, then embed it on the timeline, the quality is rubbish as compared to exporting a Quicktime movie first and converting that to .flv as you embed it in Flash. It appears that the Flash authoring tool has a better at .flv conversion than After Effects.

XMLmind

I’m fairly new to XML in Flash and certainly have a lot to learn about best practices. I’ve recently been hand editing some pretty massive XML files in various languages. These XML files are single line documents with no line breaks – this makes editing them a real headache.

I thought wouldn’t it be great if I could open the XML up in an editor and have it rendered on screen in a more visually pleasing way ? similar to the way Firefox renders a single line XML document with collapsable nodes. Well I finally managed to download the perfect tool.

XMLmind! Hurray.

Simply download the Freeware editor and set the Preferrences. Preferrences>Save> uncheck all the radio buttons relating to indenting and formatting. Open your document, edit and save off.

Also note if you didn’t know already that line breaks in the middle of node names do not show up as new nodes (especially important in Flash).

For example, instead of :

<menu1>menu1</menu1> <menu2> menu2</menu2>

how about..

<menu1

>menu1</menu1

><menu2

>menu2</menu2

> etc…

Much easier to read but still only one line as far as Flash is concerned.

Download XMLmind here:

http://www.xmlmind.com/xmleditor/

Masking dynamic text in Flash

Ever wanted to apply animations, alpha and masks to a dynamic text field without having to embed the entire font?

Easy!

Simply add a filter like alter color to the text field and it get’s rendered as a bitmap at runtime. Wow!

Flash Effect Shortcut

Here’s a nice design tip for those of you working on animations for CDROM or broadband projects. You can achieve a wealth of amazing effects very quickly by capturing areas of the screen as video when manipulating images using Photoshop or other graphics packages. All those sliders to alter blurs or outer glows etc can be used to serious effect and those transitions can be captured using tools like Snapz Pro or Camtasia and the video file imported back into Flash and integrated into your animations. Obviously it’s not a great solution for websites that require heavy optimisation but for multimedia stuff it can come in very handy.

Next stop those excellent wet media brushes in Corel Painter.

ZINC – bitmap mask problem solution

When using bitmaps to mask projectors in Zinc on OSX – bitmaps created on a Mac don’t load into the Zinc application – Zinc grays them out so making it impossible to export a masked projector.

Solution
Save a 24 bit .bmp file from Photoshop
Transfer the file to Windows
Open it.
Save it.
Transfer the bitmap back onto the Mac
Zinc should now pick it up okay in Finder.