How to add more characters to WP-Cumulus

One of the major shortcomings of Flash (imho) is the way it handles text. If you want to animate text, change its transparency or do any of the other things that Flash is so good at, you need to embed font characters into your movie. This is usually not so bad, if you know the target language your movie will be used to display.

My WP-Cumulus WordPress plugin however can be used to display tags in any language. Embedding all available characters would render the plugin unusable, as even the relatively simple Latin character set adds almost 30 kilobytes to the movie’s file size. This is why in order to use the plugin for other languages, you’ll need to add the appropriate characters yourself (or find someone who already has). Here’s how. It’s really quite easy.

In order to be able to recompile the movie you’ll need a working version of Flash 9 (CS2/3) or better. A trial version should do nicely. Once you’ve installed the application, follow these steps.

1. Download the source files.
The regular download does not include the Flash movie’s source files. You’ll need the development version, available here.

2. Open up tagcloud.fla.
Once you’ve extracted the downloaded zip file, you should have a folder called ‘wp-cumulus’, which contains a folder called ‘flash sources’. In that folder there’s a file called ‘tagcloud.fla’. Open that file in Flash.

3. Find the textfield.
This shouldn’t be too difficult. There’s nothing in the movie but a single text field, placed above, and to the right of the stage. Make sure you’re using the pasteboard setting (‘View’->’Pasteboard’). Select the text field, the ‘properties’ panel (usually docked at the bottom of the screen) should look somewhat like this.

4. Embed the characters.
Click the ‘embed’ button. This opens a dialog that lets you select which languages you’ll need. Use CTRL-clicking to select them. Then press OK.

5. Compile the movie.
Press CTRL-Enter to run the movie. This will overwrite the ‘tagcloud.swf’ file in you ‘flash sources’ folder. This file is now your own, customized tag cloud for use with WP-Cumulus. Simply use it overwrite the ‘tagcloud.swf’ currently in your blog’s wp-content/plugins/wp-cumulus folder.

Optional: Change the font.
If you’d like to use a different font with WP-Cumulus, there’s a few extra steps you’ll need to take.

  1. Change the text field’s font setting on the properties panel.
  2. Open the ‘Tag.as’ file located in ‘com/roytanck/wpcumulus’.
  3. Find the line that says ‘format.font = “Arial”;’.
  4. Change ‘Arial’ to the name of your font.
  5. Save the files and compile the movie.

There’s a distinct possibility that this will not work for languages like Chinese, Korean and Japanese. Even the simplest form of Chinese consists of over 5600 characters. Ten times the amount of Latin, and most of them are made up of complex shapes that require lots of curves. This will probably cause the movie’s size to become over 300 kilobytes, which I feel makes it unusable. If anyone attempts this, please let me know the results.

Known translations

UPDATE: More info on Chinese and unicode support is here.

143 Comments

  1. thank You!!!

    Comment by Bohdan — August 7, 2008 @ 12:29 pm

  2. I would like to give a different color to each tag.
    Is it possible simply by modifying the file tagcloud.xml or do i have to modify the flash movie also?

    Thanks.

    Regards,

    Rindra

    Comment by rindra — September 1, 2008 @ 4:11 pm

  3. Hi Rindra. WordPress does not allow you to associate colors with the tags you create. Assigning a color to the individual tags would therefore have to be random. Using different colors for tags also looks a little weird when they overtake one another. One will jump in front of the other, and it will appear the tags are moving through each other. With same-colored tags that effect is not visible.

    If you want to experiment with this, you’ll have to edit the Flash movie.

    Comment by Roy — September 1, 2008 @ 5:53 pm

  4. Hi Roy,

    Some help please. I modified the development download as per instructions. The compiled tagcloud.swf works fine in the Flash viewer and it shows the new Garamond font.

    However the new tagcloud.swf does not work when overwriting the tagcloud.swf in a the example_xml.html and tagcloud.xml folder.

    I also noticed that even before being modifed the development tagcloud.swf extracted into the /flash-sources folder does not work, whilst the tagcloud.swf downloaded into the wp-cumulus folders works fine.

    Thnaks

    Steve

    Thanks

    Steve

    Comment by Steve G — September 17, 2008 @ 10:46 pm

  5. Hi Steve. I double checked everything this morning and it seems I forget to copy the very latest version of the flash movie to all appropriate folders before releasing 1.14 yesterday. I’ve done so now, and have re-uploaded everything. If you download the development version now, it will match both the 1.14 release version’s swf and the one in the example zip. Sorry about the mix up. I was so happy I finally resolved the issues in 1.13 that I forget to take the time to properly check if everything was good to go.

    Please contact me by email if this still doesn’t work for you.

    Comment by Roy — September 18, 2008 @ 8:02 am

  6. Link: Flashowa chmura tagów i/lub kategorii w 3D | WPNinja
  7. Hi Roy,

    Thanks for releasing the source, I really appreciate the chance to embed Chinese characters!

    I’ve tried opening the tagcloud.fla in Flash and pressing ⌘+Enter (same as ctrl+enter I think), which exports the movie. I then uploaded the tagcloud.swf file to a test folder and tried it out. No matter what I do, I can’t get _any_ tags to show… The code I’m using to embed/pass options is working for 1.14 and earlier versions.

    Could there be something I am doing wrong? I haven’t even embedded any characters, I’m just trying to export a working version to start with.

    Here is the test page, with: top = exported version, middle = 1.14, bottom = some old version that I’ve been using on the rest of my site.

    http://pagesofinterest.net/mikes/test.php

    Thanks in advance for any help!

    P.S. Having the old version and 1.14 on the same page really displays the difference “non-bunching” makes! I can’t wait to shove some Chinese characters in there, so I can finally see my Chinese tags!

    Comment by Mike — September 21, 2008 @ 3:45 pm

  8. Should have mentioned:

    I’m compiling it on a Mac, 10.5 with Flash CS3 trial (downloaded it just for this ;)).

    Comment by Mike — September 21, 2008 @ 3:58 pm

  9. I tried exporting it with different Chinese sets (still doesn’t work, I just wanted to see how big it would be):

    (All include Latin I)

    Simplified Chinese I (13000+): 68kb

    Simplified Chinese All (21000+): 96kb

    Either my Flash version is screwed, or the Chinese characters are encoded in an _extremely_ efficient manner.

    Comment by Mike — September 22, 2008 @ 2:41 am

  10. Hi Mike. Can you tell me exactly what you did change (if anything) before compiling the movie? And are you getting any error messages when you run the movie? The development version as it is available from wordpress.org is an exact copy of my development folder, and there are no external dependencies I can think of.

    One thing that might cause this is that macs soemtimes use slightly different font names for the same fonts. The font name in the Tag.as file should match the font used in the text field exactly. You could try a font with a simple name to rule this out, perhaps.

    Comment by Roy — September 23, 2008 @ 8:41 am

  11. I opened the .fla, then pressed ⌘+Enter to export it. I also tried opening the .fla and going File > Export > Export Movie (with settings as pictured on the test page), and finally, File > Export > Export Image.

    Sadly none worked.

    I tried Verdana, Arial, Brushscript and a few others.

    See http://pagesofinterest.net/mikes/test.php for screenshots…

    Thanks for taking the time to help me out!

    Comment by Mike — September 24, 2008 @ 1:15 am

  12. Hi Mike. In the screenshots, the text field on the movie’s stage is set to Arial, whereas the code specifies Verdana. Those two settings have to match exactly. The text field is there only to embed the characters into the movie. The Tag class is used to create the tags on the fly, using the embedded characters if available. If not, no text will be shown.

    Comment by Roy — September 24, 2008 @ 10:58 am

  13. Yes, that was stupid of me to post those conflicting screenshots.

    To be sure I wasn’t dumb enough to actually do that, I tried to export it again, paying extra special care to get the fonts right.

    Still no joy :(

    I have noticed that right-clicking on the exported_tagclout.swf does _not_ give me the same menu as right-clicking on the lower two.

    Is this a clue?

    Comment by Mike — September 24, 2008 @ 2:48 pm

  14. Hi Mike. It looks like the swf doesn’t compile properly. The missing custom menu means none of the code works, which is quite strange. You’re not getting any error messages or warnings? Please email me your working folder, I’ll see if the same thing happens here…

    Comment by Roy — September 24, 2008 @ 6:07 pm

  15. I’m not quite sure where to look for warnings, being a Flash noob.

    Nothing jumps out at me though.

    Folder sent.

    Comment by Mike — September 24, 2008 @ 10:04 pm

  16. Link: WP-Cloud on Wordpress | Junkiest.net
  17. hi.
    i love you wp plugin. really nice!
    however, i would like to change the onMouseOver effect.

    instead of the outline effect the text shoud change the color.

    is there any possibility to do this?
    thank you.

    sebastian

    Comment by sebastian — October 3, 2008 @ 1:51 pm

  18. It’s definitely possible, but if tags have different colors, it will be much more more visible when tags overtake each other. You’ll see them jump in front of other tags, which isn’t very pretty. Feel free to have a go though.

    Comment by Roy — October 3, 2008 @ 7:44 pm

  19. Hi Roy!

    The pingback from WPNinja.pl says that the author of that site made a Polish translation of your plugin. It available at http://wpninja.pl/flashowa-chmura-tagow-ilub-kategorii-w-3d/ .

    Cheers,
    dev

    Comment by dev — October 7, 2008 @ 2:02 pm

  20. Thanks Dev :) My Polish is bit rusty…

    Comment by Roy — October 7, 2008 @ 7:53 pm

  21. Hello,
    I’m trying to add japanese caracters but, with Macromedia Flash 5 (trial version) I’ve an error when I try to open .fla file…
    Have you any idea to help me ?
    Anyway, thx for this great plugin :-)

    Comment by PYP — October 10, 2008 @ 9:45 am

  22. Hi PYP: You’ll need at least version 9 (or CS2) to use the fla file.

    Comment by Roy — October 10, 2008 @ 11:31 am

  23. OK, thanks for your quick answer :-)

    Comment by PYP — October 10, 2008 @ 1:49 pm

  24. Link: wp-cumulus. latvian. | SVILPE burto ... !
  25. hi
    I have flash MX trial version
    it says “unexpected file format” and terminates

    Comment by Masoud Borbor — October 29, 2008 @ 12:48 pm

  26. Hi Masoud. Flash MX is version 7, you’ll need CS2 or better to work on these files.

    Comment by Roy — October 29, 2008 @ 3:08 pm

  27. Hei this add on is great and love it…, thanks.

    oh yes one question how to loose the widhet header, it’s look like the word “tag cloud” its on default, cause it’s appear when I empty it…

    Thnaks a bunch.

    Comment by Jaz — October 30, 2008 @ 2:55 pm

  28. @Jaz: The title reverts back to the WordPress default if you enter nothing. I’ll think about making it optional in future releases, but for now it’s not possible to use the widget without the title.

    Comment by Roy — October 30, 2008 @ 3:42 pm

  29. Well, Thank you for this post

    Comment by Mena — October 31, 2008 @ 2:25 pm

  30. Is this the correct way to add Chinese font support to WP-Cumulus?

    If I embed about 48470 Chinese glyphs, will the flash too slow to be loaded in the site? or It simply makes a bigger tagcloud.swf?

    Comment by thinkweird — November 2, 2008 @ 2:37 am

  31. I’m curious to see how much bigger it will get. My guess is that it will at least be 50 times bigger, and loading it will seriously slow down your blog. My attempts to try it have failed, so please let me know how you fare…

    Comment by Roy — November 2, 2008 @ 11:36 am

  32. Used Macromedia Flash 8.0 to open it, but it can’t be opened. Which Flash program are you suggesting to use?

    Comment by thinkweird — November 3, 2008 @ 4:17 pm

  33. You’ll need version 9 (also called CS2) or better…

    Comment by Roy — November 3, 2008 @ 8:07 pm

  34. i just add characters i need
    and it will smaller and can play any characters you want

    Comment by acgfestival — November 6, 2008 @ 4:07 pm

  35. but this flash can only use wordpress language
    (have to add “widget_”, it’s a small problem in common html)

    Comment by acgfestival — November 6, 2008 @ 4:17 pm

  36. I have translated camulus into lithuanian language. Heres the link:
    http://www.myinfo.lt/wordpress-wp-cumulus/
    Thank You for plugin, greetings from Lithuania.

    Comment by Saulius Naujokas — November 10, 2008 @ 10:24 pm

  37. Hi Roy,

    Just wondering if you know whether anyone has managed to compile Cumulus with Chinese yet?

    Thanks

    Mike

    Comment by Mike — November 12, 2008 @ 3:09 am

  38. Hi Mike. I had a go at it myself, but the results were somewhat discouraging for now: http://www.roytanck.com/2008/11/07/about-wp-cumulus-in-chinese .

    The only real fix for this appears to be a Flash 10 version, but currently only very few users have that version installed…

    Comment by Roy — November 12, 2008 @ 9:30 am

  39. Hi Roy,
    first great look I like your work.
    I got your fla, in order to throw out the mous event (click) because I want no linking. But im not able to export a working swf..?? When I user the included swf it works, but when I make a swf ( without changes of the code) the swf don’t work..
    I used a trial of CS4..
    Did you solve the prob with Mike – he had some probs to..

    Comment by Kai — November 15, 2008 @ 4:51 pm

  40. @Kai: Are you on a Mac?

    Comment by Roy — November 15, 2008 @ 8:47 pm

  41. yes :-)

    Comment by Kai — November 16, 2008 @ 10:14 pm

  42. hi roy
    thank u
    this good

    Comment by yuli — November 17, 2008 @ 7:45 am

  43. @Kai. Please check the font name in the Tag.as class and make sure it matches the font specified for the text field to the letter. Other mac users have run into this too. You may have to experiment with different fonts to get it working.

    Comment by Roy — November 17, 2008 @ 11:21 am

  44. Hi Roy,
    thanks – did you change something in the fla? I use now cs3 on xp and I’m not able to make a working swf. by the way :-)I like to use it with DRUPAL. I think the fla wasn’t change for it? Because the delievered swf of the dev is working.. Did you have special export settings?

    Comment by Kai — November 18, 2008 @ 11:31 pm

  45. Hi Kai. There were a few changes made to the fla (or rather the .as files) to implement the new features, but nothing that should cause any trouble building it. Are you getting any error messages?

    As far as I can tell all ports of WP-Cumulus use the original swf file. However, using the latest from my project with for instance the Drupal module might not work because of new parameters that need to be passed.

    Comment by Roy — November 19, 2008 @ 8:59 am

  46. Hi Roy,
    puh mutch trouble.. !!:-)
    Ok If it’s right that the new vesion mightnot work with drupal, could you send me an older fla? I like to include this nice cloud in me Portal.

    Cheers Kai

    Comment by Kai — November 19, 2008 @ 10:44 am

  47. Hi Kai. Are you looking to embed more characters into it before using it with Drupal? If not the Drupal port should simply work for you.

    I don’t have an archive of older versions, but you should be able to get them from SVN (http://svn.wp-plugins.org/wp-cumulus/ using a SVN client) if you like.

    Comment by Roy — November 19, 2008 @ 1:04 pm

  48. Hola que tal ante todo gracias por este impresionante plugin para flash.
    Mi consulta es que tengo un problema al querer importar el archivo en dreamweaver, dream lo importa pero el inconveniente surge a la hora de que los demas vean el plugin funcionando perfectamente en la web. Esta encriptado el archivo?
    Si alguien me puede dar una ayuda la escucho. Desde ya muchas gracias y saludos para todos.

    Comment by Sebastian — November 20, 2008 @ 8:49 pm

  49. Hi Roy, everything works now.. I made a fault. The new swf had wrong permissions on my server, that caused the “nothingW on my display.

    Great work Roy!!!!

    Comment by Kai — November 21, 2008 @ 5:25 pm

  50. Link: mehmet.com » Arşiv » WordPress Cumulus Eklentisi