Tanki Online with Alternativa3D
Awesome! Just one word that pops into my head after trying this game. Alternativa guys are really amazing. To those, who don’t know, what I’m talking about, it’s about a new 3D flash multiplayer game from Alternativa team called Tanki Online.
Couple of days ago they launched closed beta testing of this game. But closed does not mean, that you can not participate. All you need to do is send email to them and you should receive your invitation. I got mine 10mins after I sent the email. Check out all of the details on their blog post.
Multiline text field autosize
I noticed this strange thing a long time ago, found a fix, but somehow today I remembered it again and decided to publish the fix for those, who don’t know the solution.
Ok so first things first. What I’m talking about is dynamic text field with multiline autosize property. It is supposed to resize the text field height according to how much text is in it. Well yes it does resize the height, but there is a small problem – the text field becomes scrollable. You can see in the example below (place the mouse cursor over the text field and use the wheel):
The fix is very easy. First you need to check the line spacing of your text field. By default it is 2pt. And then just add a couple of code lines:
var testStr:String = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam ac mauris eget libero hendrerit lobortis. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent nisi. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Pellentesque auctor ipsum a libero. Donec imperdiet nisi non odio. Pellentesque nulla. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum nisl libero, tincidunt sit amet, mattis eget, imperdiet ut, lorem. Mauris convallis arcu cursus felis. Aliquam rhoncus lectus. Aliquam accumsan, ipsum a cursus porttitor, dolor nunc ultricies nisi, nec feugiat erat mi eget odio. Maecenas adipiscing nisl nec felis. Curabitur ornare, eros et congue dignissim, lacus est dictum turpis, eu placerat sem magna placerat ligula." this.testField.autoSize = "left"; this.testField.text = this.testStr; this.testField.height += 2; this.testField.autoSize = "none";
As you can see we need to first switch on the autosize and then add text. Now 2 lines of code are used to fix the problem with scroll. We increase the height same amount as we have line spacing. In my example it is the default value of 2. After that we turn off the autosize. Here is the result:
Hope this helps. Have a nice day.
Which characters are embedded when you add a font symbol to the library?
In my last post about text fields and languages in Flash I wrote about Latin character sets and their relationshiop with languages. In other words – which Latin character sets you have to embed, to display certain language correctly. And i got an interesting question in comments: which characters are embedded when you add a font symbol to the library?
So I tried to find an answer. To save some time I used these files from this tutorial: http://www.adobe.com/devnet/flash/quickstart/embedding_fonts/ as my testing base. I generated size report of that file to see which characters are included and how much space a font symbol in library takes. Then I created a new fla file with dynamic text field which uses Times New Roman font and tried to embbed one font after another to get the same amount of characters as in the example files.
After couple of tries I finally got the list of characters which are being embedded when you create a new font symbol in library. Here it is:
- Basic Latin
- Devanagari
- Latin I
- Latin Extended A
- Latin Extended B
- Latin Extended Add’l
- Cyrillic
- Armenian
Displaying languages in Flash text fields
I guess everyone of us uses font embedding in dynamic text fields to show characters with anti-aliasing. You can embed several character sets in those fields. The question is – will language x be displayed in that text field correctly? Are all of the characters embedded? Of course you can embed several sets of characters to be sure, that you did not miss anything. But every additional set increases the size of the sef file. It’s not such a big problem if you have 1 type of font. But what if you have several types and style (bold, italic etc)?
All character sets except Latin group are pretty clear – you know, which language will be included in your text field from the sets name. So i tried to google a bit and find a list of languages which can be displayed using a certain Latin character set, or mixture of sets. So here goes the list.
Basic Latin
English, Italian.
Latin-1 + Basic Latin
Danish, Dutch, English, Faroese, Finnish, Flemish, German, Icelandic, Irish, Italian, Norwegian, Portuguese, Spanish, and Swedish.
Latin Extended A + Latin-1 + Basic Latin
Afrikaans, Basque, Breton, Catalan, Croatian, Czech, Danish, Dutch, Esperanto, English, Estonian, Faroese, Finnish, Flemish, French, Frisian, German, Greenlandic, Hungarian, Icelandic, Italian, Latvian, Lithuanian, Maltese, Norwegian, Polish, Portuguese, Provençal, Rhaeto-Romanic, Romanian, Romany, Sami, Slovak, Slovenian, Sorbian, Spanish, Swedish, Turkish, and Welsh.
Latin Extended B
Adds characters for Croatian-Slovenian, Livonian, Khoisan languages.
Latin Extended Additional
Includes Vietnamese characters.
ImgPositioner Beta 0.1 – Flash TextField and img can be friends
As I mentioned in my previous post Display img tags in text field I decided to make a class that would position images in text field: the text, that starts after the img tag should start from a new line right after the image.
I spent couple of evenings thinking and writing actionscript code to achieve my goal. And here it is – ImgPositioner class. A class that automatically inserts the needed amount of br tags after every image. Here is an example:
Grab the sample files here: ImgPositioner class
And online demo is here: ImgPositioner demo
The class is still in beta, so any comments, suggestions, or bug reports are more than welcome.
Display img tags in text field
Ok we all know the problem with html text when displaying pictures from img tag. The text just does not go to the bottom of the picture unless you write “br” tags to simulate new line entries.
So we go on a journey of inserting “br” tags. Let me see. I think i need to add 2 more and then the text will be under the picture. Ok let’s add 2 tags. Damn still need one! And another 1!! Ok finally the text is where it is supposed to be. Picture number 2 here I come.
So basically you need to insert/delete “br” tags to achieve desired result. Most of us would probably create picture gallery using Movie Clips.
But I decided to create an Actionscript 3 class that would automatically insert “br” tags, so that the text would start under the picture. I tried to google this solution, but did not find any results. So in case anyone knows where I can find this class or similar solution, please let me know, so I won’t start creating something, that is already done.
Doom converted to Flash using Adobe Alchemy
Yes, I could not believe my own eyes when I saw this too. But yes, it’s real, and you can see it for youself. Adobe Alchemy makes miracles. Try it on Arcadenoid
P.S. I had couple of crashes with FF3, so you might want to view it with another browser.
SEO for full Flash website
Can you optimize a full Flash website for search engine indexing? Yes you can! 100%. Read more about it: Search Engine Optimized Flash – Can A Full Flash Website Compete
X11 colors panel Beta 0.1 for Flash CS4

The brand new Flash CS4 inspired me to create a panel for it. It’s called X11 colors panel. It uses X11 colors list which is split into 10 color groups. You can set the color of an object (rectangle or oval) by clicking on a color in the panel.
X11 colors panel main features:
- Colors are taken from XML file, so you can add your own colors and color groups.
- Colors are split into 10 groups, so it’s easier to browse through colors.
- X11 colors panel looks similar to Flash CS4 IDE design, so you won’t even notice, that it’s a custom made panel.
- Set the color of an object (rectangle or oval) by clicking on a color in the panel.
Download it from here: X11 colors panel
Installing is simple: unrar and copy .swf and .xml files to WindowSWF folder. You will then see X11 colors panel in Flash CS4 Window -> Other panels
Google has launched Gmail themes
Google has added 30 Gmail themes which you can use to style your inbox. They also updated default Gmail look. You can read more on Google blog
