Adobe AIR 2 beta 2 was released

February 8th, 2010

New Features in AIR 2 beta 2

IMPORTANT: Applications built against Adobe AIR 2 beta 1 *will not run* using the AIR 2 beta 2 runtime. In order for an AIR 2 beta 1 application to run on the AIR 2 beta 2 runtime, the namespace of the beta 1 application descriptor file must first be updated to “2.0beta2″ and compiled against the AIR 2 beta 2 SDK.

  • Print Job Enhancements
    New properties and methods have been added to the PrintJob class to give you better control of the way content is printed from an AIR application, including the choice of printer, paper size, and number of copies. New properties also give you more information about the printer, such as printable area, whether the printer will print in color, and whether the print job is currently active. The new PrintJobOptions.printMethod property allows you specify whether to use bitmap or vector printing. The PrintJobOptions.pixelsPerInch property allows you to specify the resolution of print jobs. The new PrintUIOptions (win/mac only) class allows you to control how much the end user can change the page range to be printed. See PrintJob, PrintJobOptions, and PrintUIOptions.
  • TLS/SSL sockets
    You can now connect to a server that requires TLSv1 or SSLv3 for socket communications. See SecureSocket and Secure client sockets (AIR).
  • Flash Access support
    You can now play protected content managed by Flash Access.
  • IME API/IME Text Input Enhancements
    Several new features added in this release support better text input handling with IME software. The new API is designed for use with the new Flash Text Engine (FTE). The legacy IME API still supports the TextField class. The new API enhances the overall IME text input quality so that it works better and with more stability than in previous versions. You can use the following new IME APIs in this release:

admin Flash, Flex

FDT 3.5 released

January 26th, 2010

Finally, FDT 3.5 with Flex support released. It improve and add a lot of new feature for Flash/Flex developer.

You can now use the advanced Autocompletion features that you might know from the FDT ActionScript Editor in your MXML files also. Auto complete MXML tags, functions, events, AS code or use the code templates to insert MXML and AS code very quickly. Make use of the great refactoring and search features also in your Flex files now.

AutcompletionForMXMLTags

We have also added a lot new Features to the AS Editor like Event Type Autocompletion, improved Quick Outline, inline XML and a completely rewritten Debugger with new features.

AutocompletionForEventTypes

Download FDT 3.5 herer

Standalone installer
http://www.fdt.powerflasher.com/update/installer/FDTEnterpriseWindows.exe

Eclipse Plugin
1. Install Eclipse (www.eclipse.org)
2. Open Eclipse
3. Select “Help->Software Updates->Find and install…”
4. Select “Search for new features to install” and press next
5. Press “New Remote Site…”
6. Insert FDT into Name and “http://fdt.powerflasher.com/update/” into URL
7. Press finish

admin Flash, Flex

Flex ebooks: Hello Flex 4

January 18th, 2010

Here is link download: Hello Flex 4

irabbit Uncategorized

Loading dynamic compiled font in flash and flex

December 24th, 2009

When building complex and large application, you should take care of used memoy and size of module. This post will help you descrease size of module by using dynamic font.

In regular application,  you usually embeds font for textfield in fla or mxml file. It is a cause the publish file(swf) will be large.  Such as with Arial font, the file of size will increase from 30kb to 80kb. If there are more than 1 font, the file of size will be increase morethan 100kb. You do not like this. Here is the way.

The first in fla file or mxml file, the font family of textfield should be “_sanf” and no font is embeded or no style tag will be meet in mxml file.

The second, you will load compiled font. The compiled font will be swf file that using flex sdk or normally publish by flash using export action script code.

Assume that you have compiled font. Using Loader load this file and register this font. Then apply this font for all textfield that need this font family.

Because you use two way to compiled font, so we create interface for using in two way.


package {
public interface IFont {
function get font():Class;
function get fontName():String;
function get fontClass():String;
}
}

.
There are 3 function that compiled font must be implements:
The first is font() for flex sdk. When you embed font using tag Embed, the instance must be return by font method.
The second, the fontName method, is name of origional font, if you embed font you give his name: Arial, Verdana….
The third is fontClass. You create New Font in library in flash file and export it to actionscript class. The fontClass is name of class that you export.

The compiled font class must be implements this interface. Here is compiled font example that built by flex sdk:


package {
	import flash.display.Sprite;
	public class Arial extends Sprite implements IFont {

		[Embed(source="fonts/arial.ttf", fontName="Arial")]
                protected static var embedClass:Class;

                public function Arial() {

                }

		public function get font():Class {
			return embedClass;
		}

                public function get fontName():String {
                        return "Arial";
               }

		public function get fontClass():String {
			return "Arial";
		}
        }
}

Build font using flex sdk by type the command in cmd: mxmlc Arial.as. Flex sdk will be compile it to Arial.swf file that hold your font.

If you do not have flex sdk, you have font and flash ide, you can create font by the way:
Create New Font in library and select font family and some property and export it to actionscript class, (in our exampe is FontClass).
Then write some code:


package {

	import flash.display.Sprite;	

	public class MyFont extends Sprite implements IFont {

		protected var exportFont:FontClass;

		public function MyFont() {
			exportFont = new FontClass();
		}		

		public function get font():Class {
			return null;
		}

		public function get fontName():String {
			return 'Arial';
		}

		public function get fontClass():String {
			return 'FontClass';
		}
	}
}

Yes, after create compiled font, we shoul load it and register font. Here is code to register Font.


   var ldrContext:LoaderContext = new LoaderContext(false, ApplicationDomain.currentDomain);
    var ldr:Loader = new Loader();
    ldr.contentLoaderInfo.addEventListener(Event.COMPLETE, onComplete);
    ldr.load(new URLRequest(Arial.swf'), ldrContext);

Waiting for loading completely:

   var iFont:IFont = (evt.currentTarget as LoaderInfo).content as IFont;
    if (iFont.font) {
 	Font.registerFont(iFont.font);
    } else {
	var fontClass:Class = (evt.target as LoaderInfo).applicationDomain.getDefinition(iFont.fontClass) as Class;
	Font.registerFont(fontClass);
    }

You can apply this font by:


   var format:TextFormat = new TextFormat();
    format.font = iFont.fontName;
    txt.embedFonts = true;
    txt.setTextFormat(format);

Here is demo:

And this is full source code:

irabbit Flex ,

Encode/Decode base64 with Delphi and PHP

December 10th, 2009

Sometime i need send/receive data between Delphi and PHP. To prevent unneeded characters i use Base64 to encode and decode data. Here is code for PHP and Delphi, it work fine with Unicode.


$mydata="Welcome - Chào các bạn.";
echo base64_encode($mydata);
/* return V2VsY29tZSAtIENow6BvIGPDoWMgYuG6oW4u */

.

Decode data receive from PHP in Delphi


uses EncdDecd;
....

procedure TForm1.Button2Click(Sender: TObject);
var
 str, strEncode, strDecode: string;
begin

  (* code to encode to base64 in Delphi
   strEncode := EncodeBase64(BytesOf(UTF8Encode(str)), Length(BytesOf(UTF8Encode(str))));
  *)

  str:='V2VsY29tZSAtIENow6BvIGPDoWMgYuG6oW4u';
  strDecode := UTF8ToUnicodeString(StringOf(DecodeBase64(str)));
  ShowMessage(strDecode);
  (* result will "Welcome - Chào các bạn." *)
end;

.

admin Delphi

Adobe AIR 2 Beta released

November 17th, 2009

Adobe_Air

What new with Adobe AIR 2.0 ?

AIR 2 builds on the success of AIR 1 by giving developers new capabilities, and even tighter integration with the desktop. Some new features of AIR 2 include:

  • Support for the detection of mass storage devices.
  • Advanced networking capabilities like secure sockets, UDP support, and the ability to listen on sockets.
  • Support for native code integration.
  • The ability to open a file with its default application.
  • Multi-touch and gesture support.
  • New APIs for access to raw microphone data.
  • Webkit update with HTML5/CSS3 support.
  • Global error handling.
  • Improved cross-platform printing
  • Improved security and support for enterprise and government standards
Read more http://www.adobe.com/devnet/logged_in/rchristensen_air_2.html

admin AIR, Flash, Flex

New beta products on Adobe Labs

October 6th, 2009

(Oct 5) Adobe release Flash Professional CS5 sneak preview, Adobe® Flash® Builder™ 4 beta 2, Adobe Flash Catalyst™ beta 2.

With Flash Professional CS5 now flash developer can build native IPhone application.

More information herer http://labs.adobe.com/

admin AIR, Flash, Flex

Adobe Flash CS5 !!!

September 21st, 2009

image

Rumors had been flying around for a few days before the conference that we were going to see some sneak peaks at this year’s Adobe keynote, and that’s exactly what happened. Richard Galvan and Mark Anders, “Senior” Principle Scientist at Adobe, were back again this year with an update on the Flash platform and a sneak peek on Flash CS5 and the new Flash Mobile features

Read more

admin AIR, Flash, Flex

ZMega1280 1.0 – Uploader tool for Mega1280

September 17th, 2009

zmega1280

ZMega1280 is a free tool help Mega1280’s users and non users  can easy upload and share files.

Just add or drag drop files(folders) to tool and start upload and share.

Tool written on Delphi 2010.

Download

Mega1280 service

http://mega.1280.com/index.php

admin Tools

FDT 3.5 Beta 1 will be released.

August 28th, 2009

What’s new in FDT 3.5

With version 3.5 of FDT we are introducing great new features for both MXML and ActionScript editor. While we are focused on bringing you the best MXML editor for Flex development at this time, we are continually improving FDT.

There will be two beta testing phases before final release.

The public beta of FDT 3.5 Beta 1 will be released today. Public beta release for FDT 3.5 Beta 2 is scheduled for the next weeks.

Features and Improvements of FDT 3.5 beta 1

Autocompletion for MXML Tags

Autocompletion for event types

Watch that feature in action

Improved Quick Outline

Autocompletion for constant convention

Watch that feature in action

Semantic Highlighting and Autocompletion for inline XML

Watch that feature in action

New Quick Fixes

Watch that feature in action

Brand new Debugger

Variable folding and XML Preview are the new features in the debugger

Features and Improvements of FDT 3.5 beta 2

  • Autocompletion for ActionScript in MXML files
  • Search and Find References in MXML files

Download

http://fdt.powerflasher.de/index.php?id=307

admin AIR, Flash, Flex