Tuesday, November 04, 2008

ActionScript entered in top 20

Tiobe Softwares has released rankings of programming languages and popularity of programing languages for the month of November 2008. 

The ratings are based on the number of skilled engineers world-wide, courses and third party vendors. The popular search engines Google, MSN, Yahoo!, and YouTube are used to calculate the ratings.

The definition of the TIOBE index can be found here.

Position
Nov 2008
Position
Nov 2007
Delta in PositionProgramming LanguageRatings
Nov 2008
Delta
Nov 2007
Status
11Same Popularity of Programming Languages: November 2008Java20.299%-0.24%A
22Same Popularity of Programming Languages: November 2008C15.276%+1.31%A
34Up Popularity of Programming Languages: November 2008C++10.357%+1.61%A
43Down Popularity of Programming Languages: November 2008(Visual) Basic9.270%-0.96%A
55Same Popularity of Programming Languages: November 2008PHP8.940%+0.25%A
67Up Popularity of Programming Languages: November 2008Python5.140%+0.91%A
78Up Popularity of Programming Languages: November 2008C#4.026%+0.11%A
811Up Popularity of Programming Languages: November 2008Up Popularity of Programming Languages: November 2008Up Popularity of Programming Languages: November 2008Delphi4.006%+1.55%A
96Down Popularity of Programming Languages: November 2008Down Popularity of Programming Languages: November 2008Down Popularity of Programming Languages: November 2008Perl3.876%-0.86%A
1010Same Popularity of Programming Languages: November 2008JavaScript2.925%0.00%A
119Down Popularity of Programming Languages: November 2008Down Popularity of Programming Languages: November 2008Ruby2.870%-0.21%A
1212Same Popularity of Programming Languages: November 2008D1.442%-0.26%A
1313Same Popularity of Programming Languages: November 2008PL/SQL0.939%-0.24%A
1414Same Popularity of Programming Languages: November 2008SAS0.729%-0.40%A–
1518Up Popularity of Programming Languages: November 2008Up Popularity of Programming Languages: November 2008Up Popularity of Programming Languages: November 2008ABAP0.570%-0.08%B
1619Up Popularity of Programming Languages: November 2008Up Popularity of Programming Languages: November 2008Up Popularity of Programming Languages: November 2008Pascal0.511%-0.13%B
1717Same Popularity of Programming Languages: November 2008COBOL0.510%-0.20%B
1825Up Popularity of Programming Languages: November 2008Up Popularity of Programming Languages: November 2008Up Popularity of Programming Languages: November 2008Up Popularity of Programming Languages: November 2008Up Popularity of Programming Languages: November 2008Up Popularity of Programming Languages: November 2008Up Popularity of Programming Languages: November 2008ActionScript0.506%+0.04%B
1923Up Popularity of Programming Languages: November 2008Up Popularity of Programming Languages: November 2008Up Popularity of Programming Languages: November 2008Up Popularity of Programming Languages: November 2008Logo0.489%-0.04%B
2016Down Popularity of Programming Languages: November 2008Down Popularity of Programming Languages: November 2008Down Popularity of Programming Languages: November 2008Down Popularity of Programming Languages: November 2008Lua0.473%-0.27%B

Friday, October 31, 2008

Using Flex (Eclipse) Help as Standalone mode

You might find it useful to launch Flex Builder (as Eclipse plugin) help in a standalone mode by launching help in a mode that uses a standalone help server installed with the IDE.

To start standalone help, at the command line execute the following :

java -classpath C:\eclipse-SDK-3.2.1-win32\eclipse\plugins\org.eclipse.help.base_3.2.2.R322_v20061207.jar org.eclipse.help.standalone.Infocenter -command start -eclipsehome C:\eclipse-SDK-3.2.1-win32\eclipse -port 4567 -noexec

Open the web browser and goto http://localhost:4567/help/index.jsp

To stop standalone help, at the command line execute the following :

java -classpath C:\eclipse-SDK-3.2.1-win32\eclipse\plugins\org.eclipse.help.base_3.2.2.R322_v20061207.jar org.eclipse.help.standalone.Infocenter -command shutdown -eclipsehome C:\eclipse-SDK-3.2.1-win32\eclipse -port 4567 -noexec

Note :

After you shut down the help server, links in the help browser will be unavailable until you restart the server.

Set Eclipse home path to eclipse folder, and make sure to specify a correct the org.eclipse.help.base jar library version depending on your Eclipse version. Then put in a source port number - here I’ve used 4567 (manual config).

Tuesday, September 30, 2008

Externalize Font with font subset, font weight and font style at the same time

You have a flash / flex application where you want to allow users to customize the text formatting, font style / font weight for some text box. So you would provide a small set of fonts which would all get embedded into the swf.

If we working with external fonts in Actionscript 3.0, the external font must have a class definition for allowing the Font class and ApplicationDomain to detect and register it. We can produce class definition for the external font  with embed tag in Flex or Font symbol in Flash library. 

In Flash CS3 you can create a font symbol in the library, and export it for ActionScript. But with this way if you embed the font in the library then flash automatically embeds all available characters. So the compiled external font swf size will increased and bloated the load-time with unused fonts. This was the largest issues especially if we working with Asian fonts. You can find more informations about it in this nice article

With Flex 3.0 and mxmlc (Flex SDK 2-3) there’s the embed metatag where you can even define font character ranges which should be embedded for reducing compiled external font swf size:

  1. [Embed(source='font.ttf', fontName='Font Name', unicodeRange='U+0021-U+0021, ... , U+2122-U+2122')]

or with this tag :

  1. [Embed(source='font.ttf', fontName='Font Name', fontWeight='bold', fontStyle='italic')]

Another nice article here

Unfortunatelly if we combining subset tag (unicodeRange) with fontWeight / fontStyle tag will cause a Flex compile error. I hope in Flex 4 this issue fixed.

This article explain the same approach, but it need to add extra font family (Bold or Italic) at specific font but Flex will still treat them as separate fonts.

 

All the examples (both Flash CS3 or Flex 3.0) I’ve seen so far only address the loading of one font either in regular weight or bold, but not one (subset characters ranges) fonts with regular, weight, italic or bold-italic at the same time. And it seem very difficult for export one (subset characters ranges) font as external font, (ie loading the font from an external swf) and change font weight / font style at runtime in loader (main app) swf.

Luckily I was able make something worked, here what I did :

  1. Embed font in FLA file with instance textfield at the stage (Benefit: we can make subset of required glyphs only, and font style/weight). We need create four instances textfield (Regular, Bold, Italic and Bold-Italic texfield) and publish the swf for each font, (ie. Verdana_Style.swf for Verdana). In this step the published swf doesn’t contain class definition yet. So we can not import it at runtime.
  2. Transcoding the published swf (also give a class definition) with Flex 3.0 compiler with Embed metatag and publish to final external swf font (i.e Verdana.swf)
    package
    {
     import flash.display.Sprite;
     import flash.text.Font;                         

    public class Verdana extends Sprite
     {

    [Embed(source='library/fontstyle/Verdana_Style.swf', fontName='Verdana')]
       public static var regular:Class;

    [Embed(source='library/fontstyle/Verdana_Style.swf', fontName='Verdana', fontWeight='bold')]
       public static var bold:Class;

    [Embed(source='library/fontstyle/Verdana_Style.swf', fontName='Verdana', fontStyle='italic')]
       public static var italic:Class;

    [Embed(source='library/fontstyle/Verdana_Style.swf', fontName='Verdana', fontWeight='bold', fontStyle='italic')]
       public static var boldItalic:Class;

    public function Verdana()
       {
         super();

      Font.registerFont ( regular );
         Font.registerFont ( bold );
         Font.registerFont ( italic );
         Font.registerFont ( boldItalic );
       }

    }
    }
  3. Import the final external swf font at runtime to main application.
    Here the simple actionscript 3.0 with 
    Lithos Pro Regular font demo.

    package {
     import flash.display.Loader;
     import flash.display.Sprite;
     import flash.events.Event;
     import flash.net.URLRequest;
     import flash.text.*;    

    public class DemoExternalFontSimple extends Sprite
     {
       public static const FONT_NAME:String = 'Lithos Pro Regular';
       public static const FONT_LIB:String = "LithosProRegular.swf";

    public function DemoExternalFontSimple ()
       {
         loadFont ('fontlib/'+FONT_LIB);
       }

    private function loadFont ( url:String ) : void
       {
         var loader:Loader = new Loader ();
         loader.contentLoaderInfo.addEventListener ( Event.COMPLETE, fontLoaded );
         loader.load (new URLRequest ( url));
       }

    private function fontLoaded ( event:Event ) : void
       {
         drawText();
       }
     }
    }
       public function drawText () : void
       {
         var tf:TextField = new TextField ();
         tf.defaultTextFormat = new TextFormat (FONT_NAME, 160);
         tf.embedFonts = true;
         tf.antiAliasType = AntiAliasType.ADVANCED;
         tf.autoSize = TextFieldAutoSize.LEFT;
         tf.text = FONT_NAME + " Regular was here...:;*&^% ";
         tf.selectable = false;
         tf.rotation = 1;
         tf.x = 10;
         tf.y = 10

    var tf2:TextField = new TextField ();
         tf2.defaultTextFormat = new TextFormat (FONT_NAME, 160true);
         tf2.embedFonts = true;
         tf2.antiAliasType = AntiAliasType.ADVANCED;
         tf2.autoSize = TextFieldAutoSize.LEFT;
         tf2.text = FONT_NAME + " Bold was here...:;*&^% ";
         tf2.selectable = false;
         tf2.rotation = 1
         tf2.x = 10;
         tf2.y = 50

    var tf3:TextField = new TextField ();
         tf3.defaultTextFormat = new TextFormat (FONT_NAME, 160falsetrue);
         tf3.embedFonts = true;
         tf3.antiAliasType = AntiAliasType.ADVANCED;
         tf3.autoSize = TextFieldAutoSize.LEFT;
         tf3.text = FONT_NAME + " Italic was here...:;*&^% ";
         tf3.selectable = false;
         tf3.x = 10;
         tf3.y = 100

    var tf4:TextField = new TextField ();
         tf4.defaultTextFormat = new TextFormat(FONT_NAME, 160truetrue);
         tf4.embedFonts = true;
         tf4.antiAliasType = AntiAliasType.ADVANCED;
         tf4.autoSize = TextFieldAutoSize.LEFT;
         tf4.text = FONT_NAME + " Bold Italic was here...:;*&^% ";
         tf4.selectable = false;
         tf4.x = 10;
         tf4.y = 150;

    addChild(tf);
         addChild(tf2);
         addChild(tf3);
         addChild(tf4);
       }

Friday, August 15, 2008

In Flash Platform We Trust!

Perhaps ActionScript 3.0 is more proprietary than it was last week. It’s still extension of ECMAScript and still holds a lot of the core values, namespaces and package. Maybe EcmaScript 4.0 was stillborn, and maybe the harmony will change the future of language/ the standards committe.

I think our joint concerns are better served if we keep in mind that most valuable point is abc file , no matter which language it compiling from (actionscript 3.0, haXe or javascript). So let keep saying to yourself “In flash platform I trust..!”

Tuesday, July 15, 2008

Merapi: Alpha Code Released!

Well, Merapi has been a long time in the making, but on July 14th, 2008 the initial Merapi Alpha release candidate has been distributed to the Merapi Alpha community of users.

Last evening Adam packaged up first Alpha RC 1 Build! It seems to be bug free and functioning rather nicely!

Read more : http://merapiproject.net/

Saturday, July 12, 2008

Nice Flash & AIR debugger

It's a simple AIR based debugger for flash & AIR apps.
Arthropod is really easy to use, the only thing you need to do is import the Debug class, write a log message with the log function, start Arthropod and publish your site / AIR application.

Nice application to try

Sunday, July 06, 2008

Beberapa alasan Plurker tidak akan dibuat di platform AIR

Layanan Plurk sudah 2 bulan ini semakin menunjukan perkembangan pesat, terakhir sudah mencapai 80000 pengguna.

Beberapa developer menanyakan ketersediaan client API untuk Plurk, termasuk official client desktop app. Memang ada developer AIR platform yang terobsesi ikut membuat client di platform AIR.

Tapi jawaban ini lumayan bikin mikir. Tapi aku pikir ini justru membuat developer AIR malah lebih tertantang untuk bikin versi AIR-nya. Pengen bikin juga?
Blogged with the Flock Browser

Saturday, June 07, 2008

M3D, Mascot Capsule 3D porting to Actionscript 3.0, next candidates for 3DEngines

One day several years ago after Actionscript 3.0 released, I've been believed the time will coming someday if this 3D engines will be porting to Actionscript.

Mascot Capsule 3D and Mobile 3D Graphics has been used as technologies  for Mobile 3D programming for the Java™ Platform Micro Edition on Sony Ericsson feature phones.

This 3D Engine has been designed from the ground up for mobile devices,taking into account limited memory, performance and control interfaces.
It completely abstracts the underlying operating system and device hardware, allowing game developers to develop once on Windows and then deploy to multiple mobile platforms. Includes complete support for multi-channel audio, 2D and 3D graphics,
a powerful and fully configurable 3D scene graph, collision checking,
physics simulation, networking with both Bluetooth and IP based networks.

It will be strong candidate for competing againts with existed 3D Actionscript engine (PV3D or Away 3D or Sandy3D).

Yesterday one of showcase has been published. Look at ecodazoo.com, this site strongly suspected use M3D engine, similar with Mascot Capsule 3D.

It could be next step 3D Flash website interface just begin, and I think web people will follow.

Further info about M3D see www.touchtao.com
Mobile Capsule 3D see Mobile 3D

In my humble opinion, correct me if i'm wrong!

Blogged with the Flock Browser