My Articles:
More Google Wave invitations
I get more Google Wave invitations today and as I have already invited my friends I have now free Google Wave invitations. So if you want to try Google Wave and play with it, but do not know anyone with Google Wave account, ask in comments. I will send 10 invitation for first 10 people which will ask for Google Wave invitation in comments.
$1000 for WordPress plugin
If you are WordPress plugin developer you have nice chance to earn $1000. It’s for GetClicky Web Analytics site. It is site similar to Google Analytics, but their data are realtime, so you can really see who is on your site and which content is seen by your visitors currently. It’s very useful web analytics site and I’m using it for tracking my sites. But get back to GetClicky WordPress Plugin.
They need to help with development and they are willing to pay you $1000. Here is quotation form their site:
You need to be very experienced with the WP API, and must have developed at least one major (semi-popular) plugin, or several more minor ones. You also must be the type of person who believes code is a beautiful piece of art, because if there’s one thing that gets my goat, it’s messy code.”
Read more about it: $1000 for WordPress plugin. And if you are not WordPress plugin developer you may be interested in tracking you site with realtime web analytics by GetClicky. It’s completly free for one site and it’s very affordable if you want to track more sites in realtime.
Kseniya Simonova – Sand Animation
Off Topic: This is really amazing sand animation by Ksenyia (winner of Ukraine’s Got Talent). She is painting and animating German occupation of Ukraine in WW2.
Goodbye FlashDen, hello ActiveDen
I’ve found out today, that there is no longer FlashDen.net, but instead there is new site in Envato network called ActiveDen. It’s same site, but Adobe has asked Envato to change the name because “Flash” is registered trademark of Adobe. And there are also Flex files on ActiveDen, so there are no more just pure Flash files, so it’s maybe better name now.
Goodbye FlashDen, hello ActiveDen
Major update of Goalscape AIR application
This friday we have released major update for Goalscape AIR application. It is project we (me with Tomas as Flexets company) have been working on for more than year. If you are not aware of Goalscape application please look at intro video. But in one sentence it’s Goal Management Software.
Here is list of main features in this update:
- Search function
- Adding and naming goals
- Icons for common functions
- Language support
- Notes text
- Attachments
If you are interested in details go and read about them here: Major update for Goalscape AIR application and download Goalscape (AIR application). You have 1 month free trial and then it’s just 45€ one time payment which include all future updates.
If you have any questions about Goalscape ask in comments, I can answer them in comments. Even if you install Goalscape and want to see there some features, let me know and we will consider to add them to Goalscape.
Why my sites were not indexed by Google?
Few months ago I’ve created site http://filmcomposers.info about Movie Soundtracks Composers, because I like movie soundtracks and music composing (orchestral) (I really love Hans Zimmer work). But site is still not indexed by google. I was thinking, that’s because almost all content is done by WordPress plugin Pods and there are no posts or pages and just this site is linking to the site http://filmcomposers.info. So I’ve submitted site to Google Webmasters tools, still nothing, I have check if there is no robots.txt file or if inside of that file are search spiders disalloved. I didn’t find anything. Buuut, yes, I’m such a fool
It’s WordPress privacy setting: I would like my blog to be visible to everyone, including search engines (like Google, Sphere, Technorati) and archivers or I would like to block search engines, but allow normal visitors. Yes, that’s why google can’t indexed my site
This option adds meta tag into page header:
<meta name="robots" content="noindex, nofollow">
So if you have same problems and you have site based on WordPress, check in your Admin section Settings > Privacy or check html source code for robots meta tag in header.
After this discovery yesterday I’ve found out that even franto.com has same settings and it’s not indexed by google from time I’ve changed hosting provider few months ago. So I have rather changed all my other sites and they are all ok
I think I need to create some AIR app for checking such SEO problems…
Text Layout Engine: TruncationOptions
Table of contents for Text Layout Engine
- Text Layout Engine in Flex 3
- Text Layout Engine: Fit text into rectangle
- Text Layout Engine: TruncationOptions
This is same example as yesterday (Fit text in rectangle with Text Layout Engine), but I’ve added one more switch. You can decide if you want use TruncationOptions or not. Reason why I want to show this to you is that it works differently. I do not know if this is feature or bug, but try to tell me your opinion in comments. When I use TruncationOptions in this way:
var truncationOptions:TruncationOptions = new TruncationOptions('...',3); factory.truncationOptions = truncationOptions;
all works nice and text is fitted into rectangle. But when I do not include truncation last line of text is out of the rectangle if any pixel line of text line is inside rectangle. Maybe there is some other property which can handle this situation, but I’m not really aware of it. Do you know about such property?
Try it in this example:
id="TextLayoutEngineExamples" width="100%" height="400"
codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab">
width="100%" height="400" name="TextLayoutEngineExamples" align="middle"
play="true"
loop="false"
quality="high"
allowScriptAccess="sameDomain"
type="application/x-shockwave-flash"
pluginspage="http://www.adobe.com/go/getflashplayer">
and here is source code:
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" applicationComplete="fit()" backgroundColor="0x333333" color="0xffffff"> <mx:Style source="styles/fonts.css"/> <mx:RadioButtonGroup id="radioGroup" /> <mx:VBox width="100%" height="100%"> <mx:HBox> <mx:RadioButton id="radioButton1" label="Don't truncate" value="false" group="{radioGroup}" selected="true" /> <mx:RadioButton id="radioButton2" label="Truncate" value="true" group="{radioGroup}" /> </mx:HBox> <mx:HBox width="100%"> <mx:Label text="Text:"/> <mx:TextInput id="txtInput" color="0x000000" width="100%" change="fit()" text="Text Layout Engine: Fit Text into Rectangle"/> </mx:HBox> <mx:HBox> <mx:Label text="Font Size:"/> <mx:HSlider id="fsSlider" liveDragging="true" minimum="6" maximum="50" snapInterval="1" value="14" change="fit()"/> </mx:HBox> <mx:HBox> <mx:Label text="Text Width:"/> <mx:HSlider id="wSlider" liveDragging="true" minimum="0" maximum="500" snapInterval="1" value="100" change="fit()"/> </mx:HBox> <mx:HBox> <mx:Label text="Text Height:"/> <mx:HSlider id="hSlider" liveDragging="true" minimum="0" maximum="500" snapInterval="1" value="100" change="fit()"/> </mx:HBox> <mx:HBox> <mx:Label text="Fit font to do not truncate text:"/> <mx:CheckBox id="chbTruncate" selected="false" change="fit()"/> </mx:HBox> <mx:HBox> <mx:Label text="isTruncated?"/> <mx:Canvas width="20" height="20" backgroundColor="0xff0000" visible="{!isTruncated}" includeInLayout="{!isTruncated}"/> <mx:Canvas width="20" height="20" backgroundColor="0x00aa00" visible="{isTruncated}" includeInLayout="{isTruncated}"/> </mx:HBox> <mx:UIComponent id="ui" width="100%" height="100%"> </mx:UIComponent> </mx:VBox> <mx:Script> <![CDATA[ import assets.TLEAssets; import flashx.textLayout.factory.TruncationOptions; import flash.text.engine.Kerning; import flash.text.engine.FontLookup; import flash.text.engine.RenderingMode; import flashx.textLayout.formats.TextLayoutFormat; import flashx.textLayout.factory.StringTextLineFactory; private var sprite:Sprite; [Bindable] public var isTruncated:Boolean; public function fit(fs:int = -1, cnt:int = -1):void { if (sprite == null) { sprite = new Sprite(); ui.addChild(sprite); } while (sprite.numChildren > 0) { sprite.removeChildAt(0); } var factory:StringTextLineFactory = new StringTextLineFactory(); factory.compositionBounds = new Rectangle( 10, 10, wSlider.value, hSlider.value ); if (fs == -1) fs = fsSlider.value; var format:TextLayoutFormat = new TextLayoutFormat(); format.fontFamily = "Verdana, _sans"; format.fontSize = fs; format.color = 0x000000; format.textAlpha = .9; format.kerning = Kerning.ON; format.renderingMode = RenderingMode.CFF; format.fontLookup = FontLookup.EMBEDDED_CFF; factory.spanFormat = format; if (radioGroup.selectedValue == true) { var truncationOptions:TruncationOptions = new TruncationOptions('...',3); factory.truncationOptions = truncationOptions; } factory.text = txtInput.text; factory.createTextLines( useTextLines ); isTruncated = factory.isTruncated; if (chbTruncate.selected && isTruncated && fs > 10 && cnt < 50) { fs--; cnt++; fit(fs, cnt); } sprite.graphics.clear(); sprite.graphics.beginFill(0x555555,.5); sprite.graphics.drawRect( 10,10, wSlider.value, hSlider.value ); sprite.graphics.endFill(); } private function useTextLines( line:DisplayObject ):void { var displayObject:DisplayObject = sprite.addChild( line ); } ]]> </mx:Script> </mx:Application>
Let me know, what you think about it…
P.S. I have other example with use TextFlow component with TextFlowTextLineFactory (graphics included within the text) instead of using StringTextLineFactory. I will post it later today or tommorow. Stay tuned
blog2
Hey Visitor. Thank you for visiting my site. I want to say you, that this blog has different URL structure in past years and I have changed it, because it was not nice, that each post on franto.com blog had 2 different URLs. I could just redirect this URL to http://franto.com, but I want to tell you reason, why this URL does not longer exist. If you are looking for something specific on my site and can not find, please let me know in comments and I will get back to you as fast as I can and point you to correct URL. Also if you have anything else you want me say, just write your comment below this post.
Thank you,
Franto
Text Layout Engine: Fit text into rectangle
Table of contents for Text Layout Engine
- Text Layout Engine in Flex 3
- Text Layout Engine: Fit text into rectangle
- Text Layout Engine: TruncationOptions
This is first example in serie of examples of showcase how to use Text Layout Engine (mainly for Flex 3).
Here is quick description: I need to fit text in rectangle (need it for our Goalscape project). I want to be able to change width, height, font size and text of course. In Text Layout Engine this can be done very easily. All you need to do is create correct format for your text, and set compositionBounds for text line factory. I will use StringTextLineFactory class, which provides a simple way to create TextLines from a string. Even I add also TruncationOptions, which specifies options for limiting the number of lines of text created by a text line factory and for indicating when lines have been left out. I’m using TruncationOptions, because I want use maximum of 3 lines and if text is too long I want add … at the end. This is done automatically in Text Layout Engine and I do not need to implement by myself.
Only problem I see, that result .swf file size is over 500kB even builded as Release version (Debug version has 692kB). It’s because of Text Layout Engine and Flex framework are included in .swf. But because I will use it in AIR application, it’s ok for me.
I have created Flash demo for you, but it works just in Flash Player 10, because of Text Layout Engine. Just play with sliders and write your custom text to see effect. In case text will be truncating you will see green square, otherwise there will be red square (not truncated).
id="TextLayoutEngineExamples" width="100%" height="350"
codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab">
width="100%" height="350" name="TextLayoutEngineExamples" align="middle"
play="true"
loop="false"
quality="high"
allowScriptAccess="sameDomain"
type="application/x-shockwave-flash"
pluginspage="http://www.adobe.com/go/getflashplayer">
And this is source code
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" applicationComplete="fit()"> <mx:Style source="styles/fonts.css"/> <mx:VBox width="100%" height="100%"> <mx:HBox width="100%"> <mx:Label text="Text:"/> <mx:TextInput id="txtInput" width="100%" change="fit()" text="Text Layout Engine: Fit Text into Rectangle"/> </mx:HBox> <mx:HBox> <mx:Label text="Font Size:"/> <mx:HSlider id="fsSlider" liveDragging="true" minimum="6" maximum="50" snapInterval="1" value="14" change="fit()"/> </mx:HBox> <mx:HBox> <mx:Label text="Text Width:"/> <mx:HSlider id="wSlider" liveDragging="true" minimum="0" maximum="500" snapInterval="1" value="100" change="fit()"/> </mx:HBox> <mx:HBox> <mx:Label text="Text Height:"/> <mx:HSlider id="hSlider" liveDragging="true" minimum="0" maximum="500" snapInterval="1" value="100" change="fit()"/> </mx:HBox> <mx:HBox> <mx:Label text="isTruncated?"/> <mx:Canvas width="20" height="20" backgroundColor="0xff0000" visible="{!isTruncated}" includeInLayout="{!isTruncated}"/> <mx:Canvas width="20" height="20" backgroundColor="0x00aa00" visible="{isTruncated}" includeInLayout="{isTruncated}"/> </mx:HBox> <mx:UIComponent id="ui" width="100%" height="100%"> </mx:UIComponent> </mx:VBox> <mx:Script> <![CDATA[ import flashx.textLayout.factory.TruncationOptions; import flash.text.engine.Kerning; import flash.text.engine.FontLookup; import flash.text.engine.RenderingMode; import flashx.textLayout.formats.TextLayoutFormat; import flashx.textLayout.factory.StringTextLineFactory; private var sprite:Sprite; [Bindable] public var isTruncated:Boolean; public function fit():void { if (sprite == null) { sprite = new Sprite(); ui.addChild(sprite); } while (sprite.numChildren > 0) { sprite.removeChildAt(0); } var factory:StringTextLineFactory = new StringTextLineFactory(); factory.compositionBounds = new Rectangle( 10, 10, wSlider.value, hSlider.value ); var format:TextLayoutFormat = new TextLayoutFormat(); format.fontFamily = "Verdana, _sans"; format.fontSize = fsSlider.value; format.color = 0x000000; format.textAlpha = .9; format.kerning = Kerning.ON; format.renderingMode = RenderingMode.CFF; format.fontLookup = FontLookup.EMBEDDED_CFF; factory.spanFormat = format; var truncationOptions:TruncationOptions = new TruncationOptions('...',3); factory.truncationOptions = truncationOptions; factory.text = txtInput.text; factory.createTextLines( useTextLines ); isTruncated = factory.isTruncated; sprite.graphics.clear(); sprite.graphics.beginFill(0x555555,.5); sprite.graphics.drawRect( 10,10, wSlider.value, hSlider.value ); sprite.graphics.endFill(); } private function useTextLines( line:DisplayObject ):void { var displayObject:DisplayObject = sprite.addChild( line ); } ]]> </mx:Script> </mx:Application>
Text Layout Engine in Flex 3
Table of contents for Text Layout Engine
- Text Layout Engine in Flex 3
- Text Layout Engine: Fit text into rectangle
- Text Layout Engine: TruncationOptions
I’m going to play with Text Layout Engine, which is bundled in Flex 4. But we need to use it in Flex 3 in our Goalscape project. And it’s possible to use Text Layout Engine in Flex 3. All you need to do is download Flex 4 SDK, or Flash Builder and get textLayout.swc from Flex 4 SDK into your project to libs folder. I’ve played with Flex 4 beta testLayout.swc, but now when Flex 4 beta 2 is released I’ve checked both .swc files and filesize has raised from 326kB to 531kB, so I’m really interested in what was changed or added. I will post about my tests when I will find out anything. So if you are interested in some Text Layout Engine examples, stay tuned.
Tower Defense Design – The Future of Gaming?
WordPress Mobile Edition
Flex Hero – Android links collection
Send links to your Android
Android Time Picker for Flex Hero
Android Date Picker for Flex Hero
Problems with latest stable Flex 4 nightly build
Loosing children interactivity after setting perspectiveProjection
WordPress plugin Permalinks Changer
Numeric sorting of Flex DataGridColumn
- Unizah Abbey : It was nice to know this kind of future gaming for my nephew was fond ...
- Art : Your line about all games survive made me think a little bit. I think ...
- Yann Graufogel : Hi, First, thanks for this mobile datePicker! I've noticed somethi ...
- bugz : thank you very much ! ...
- Keiran : Hi! This is a bit older but very useful if you want to create 3D pie ...
- uzair : hey Daniel: i didn't get you clearly. The thing which i understand ...
- Daniel Sedlacek : My first thought is to do everything you do now but in bigger resoluti ...
- uzair : hi I am making an online T-shirt design tool. i have to give the lo ...