Monday, December 21, 2009

Picasa Browser with Ruby on Rails

I would like to show small example how to use AIR application and Ruby on Rails for backend. PicasaBrowser is very simple application with 2 http requests to server:

1. to obtain list of public albums for specified gallery


2. to get all photos from selected album.


In the RoR application I have used REXML library to parse rss feed. I know, my ruby code is not perfect and is not in ruby style (yet :)), so I would like you to correct my code.

Air app source code. ROR source code.

On Flex on Rails blog you could find few more examples of AIR and Rails applications.

Friday, December 11, 2009

Thursday, December 10, 2009

Tanjooberrymutts :)

By the time you read through this YOU WILL UNDERSTAND "TANJOOBERRYMUTTS"
...and be ready for China .
In order to continue getting-by in China , we need to learn English the way it is spoken......

Practice by reading the following conversation until you are able to understand the term "TANJOOBERRYMUTTS" .
With a little patience, you'll be able to fit right in.

Now, here goes...
The following is a telephonic exchange between maybe you as a hotel guest and room-service today......

Room Service: "Morrin. Roon sirbees."
Guest: "Sorry, I thought I dialed room-service."
Room Service: " Rye . Roon sirbees....morrin! Joowish to oddor sunteen???"
Guest: "Uh..... Yes, I'd like to order bacon and eggs ."
Room Service: "Ow ulai den?"
Guest: ".....What??"
Room Service: "Ow ulai den?!?... Pryed, boyud, pochd?"
Guest: "Oh, the eggs! How do I like them? Sorry.. Scrambled, please."
Room Service: "Ow ulai dee bayken ? Creepse?"
Guest: "Crisp will be fine."
Room Service: "Hokay. An sahn toes?"
Guest: "What?"
Room Service: "An toes. ulai sahn toes?"
Guest: "I.... Don't think so.."
RoomService: "No? Udo wan sahn toes???"
Guest: "I feel really bad about this, but I don't know what 'udo wan sahn toes' means."
RoomService: " Toes ! Toes!...Why Uoo don wan toes? Ow bow Anglish moppin we botter?"
Guest: "Oh, English muffin! !! I've got it! You were saying 'toast'...
Fine...Yes, an English muffin will be fine."
RoomService: "We botter?"
Guest: "No, just put the botter on the side."
RoomService: "Wad?!?"
Guest: "I mean butter.... Just put the butter on the side."
RoomService: "Copy?"
Guest: "Excuse me?"
RoomService: "Copy...tea. .meel?"
Guest: "Yes. Coffee,
please... And that's everything."
RoomService: "One Minnie. Scramah egg, creepse bayken , Anglish moppin,
we botter on sigh and copy ... Rye ??"
Guest: "Whatever you say."
RoomService: "Tanjooberrymutts. "
Guest: "You're welcome"


Remember I said "By the time you read through this YOU WILL UNDERSTAND 'TANJOOBERRYMUTTS' .......
and you do, don't you!

(c) morning spam :)

Tuesday, December 8, 2009

How to get IP address with AIR 2.0 (windows version)

Previously it was quit difficult to get client's IP address from AIR application, but with AIR 2.0 SDK it is just few lines of code.

if (NativeProcess.isSupported)
{
var file:File = File.applicationDirectory;
file = file.resolvePath("c:\\WINDOWS\\system32\\ipconfig.exe");
var nativeProcessStartupInfo:NativeProcessStartupInfo = new NativeProcessStartupInfo();
nativeProcessStartupInfo.executable = file;
process = new NativeProcess(); process.addEventListener(ProgressEvent.STANDARD_OUTPUT_DATA, onOutputData);
process.start(nativeProcessStartupInfo);
}

private function onOutputData(event : ProgressEvent):void
{
trace(process.standardOutput.readUTFBytes(process.standardOutput.bytesAvailable));
}

As you can see this is Windows version. I am not very familiar (yet) with OSX native processes, but I am sure that there is a way to get IP address as well.
So, it is time to try some IP2GEO API. It will be fun :)

Monday, November 23, 2009

AirFM v 0.93

I would like to announce new version of AirFM application. Many users have been asking me how to add new stream to the list. Now this version allow to add/remove stream to to the group "My Stations".

PS. I realized that dock icon looks very ugly. So if someone wants to help me with icons for app, feel free to contact me.

Monday, November 2, 2009

CairngormGenerator AIR app .

I would like to unveil CairngormGenerator air application created in my team to save time for developers. This application will help you to generate events, commands and delegates classes for your project if you decide to use Cairngorm framework.

Just specify package for your classes:


Enter a general name which will be concatenated with "Command", "Event" and "Delegate":


Enter name of the remote function:


Also, you could list parameters if it requires:


In the result, we have 3 generated files. You can review it and save.


I hope this small application will save your time which you could spend for implementing nice features in your projects. Have a pleasant coding. CairngormGenerator.air

Saturday, October 17, 2009

Selection for Repeater.

This time I have added animated selection for the repeater.



Source code.

Saturday, October 10, 2009

What's Coming in Adobe AIR 2.0

Adobe AIR technology become more and more powerful. Check out presentation from Adobe MAX.

Wednesday, October 7, 2009

Spring effect for validation.

Recently I played around with the Spring effect developed by Chet Haase. After small modifications I have used it to highlight mandatory fields (or form items - Last Name) in the form.
Also in the Status label you could place some more additional information.

Sunday, October 4, 2009

Animated Repeater.

This example is how to animate appearance of repeater's items. The repeater is very easy to use in combination with HBox/VBox or FlowBox, just put repeater into the box, setup vertical/horizontal gap and it it will work. But there is no fun :) To add some animation I tried to wrap up repeater with canvas and calculate x,y coordinates for each item. In additional, I have animated alpha property.

Sunday, September 27, 2009

Animated selection in TileList.

One more experiment with UI. This time I have tried to animate selection in the TileList. Try to click on items in the TileList or enter index for selection.



Implementation is quite easy, I have overrided drawSelectionIndicator method of the TileList and added animation using Tween.

Feel free to ask me for source code.

Friday, September 18, 2009

Status notifications in tool tip.

Another way to inform user about minor processes in the application is show tool tip behind the mouse cursor.



If you move mouse cursor outside of the flash application, tool tip will be centered on application. And if you move cursor back to the application, tool tip will be attached to mouse cursor.

For this example I have created class called MouseIdleMonitor, it helps me to track mouse activity (last x,y coordinates on the stage) and indicate when mouse become idle.

Also you can create your own animated cursor and using CursorManager change it according to situation.

Tuesday, September 15, 2009

Status notification. Google Style.

In our applications we are trying to give user some feedback what is going on with application. For example, loading data, processing results, etc. Sometimes busy cursor (clock) is not enough and it is not very informative.



On example above you can see status message (click on "Let me in") which informs user about current processes.

If you liked it, feel free to contact me for source code.

Monday, September 14, 2009

The ActionScript Conference: 1st day

Photos from the first day of The ActionScript Conference in Singapore.

Thursday, August 13, 2009

Pass "+" (plus sign) in flashvars

Today I have stuck with small problem, I tried in flashvars pass the value which contains "+", but in flash plus sign was converted in white space. The problem is quite strange, because I tried to pass special characters: ; / ? : @ $ , # - _ . ! ~ * ' ( ), everything was working fine. So, if you are going to pass + in flashvars, you need to convert it to %2b hex code.

Tuesday, August 4, 2009

Twitt file with FileSocial.com

Recently I have released TwittMyFile. This air application could help users upload file on FileSocial service and post it on twitter.

Friday, July 31, 2009

Detect Flash Player version

Recently I needed to detect version of the flash player on user workstation. Using package flash.system.Capabilities you could obtain all information including platform, major(what I needed)/minor version, build number and internal build number. And here is regular expression /^(\w*) (\d*),(\d*),(\d*),(\d*)$/, which could help you parse value of the Capabilities.version.

Thursday, July 9, 2009

AirFM. Air Update Framework.

Recently, I have retrieved error 16820 while updating AirFM application. I don't have time right now to look into,but seems to me the cause of this error is google maintenance work on Google Code. I did quick search in internet I found very descriptive article about Update Framework for air applications. I will find time to check what was wrong with previous update, but you can still download latest (v0.91) version and install it.

Wednesday, June 24, 2009

Next version Adobe AIR - Athena. New Features.

Yesterday I watched Arno Gourdol's presentation on Flash Camp at May 29.
With a small air app he displayed new StorageVolumeChangeEvent.STORAGE_VOLUME_MOUNT and
STORAGE_VOLUME_UNMOUNT events from upcoming new version of Adobe AIR. Using these events it will be possible
to monitor when user mounted/unmounted flash drives. Also he anounced some changes in the installation process,
I mean warning dialog when user installs AIR app which is signed by trusted security certificate.

Saturday, June 20, 2009

Google is indexing flash external resources

Few days ago Google has announced that search engine was upgraded and now it capable to index flash external resources. If you you are using external resources in your flash project, such as text, XML or event external SWF, now all this stuff will be indexed be google search engine. But if you want to restrict access to your resource, for example, configuration of your swf, which is mostly stored in xml file, you just need configure it in robot.txt.
Something like this:
User-Agent: *
Disallow: /configs/configuration.xml
Allow: /

Wednesday, June 17, 2009

AirFM - desktop radioplayer.


Yesterday I have released beta version of my new air application - AirFM. It is desktop air radioplayer which already contaions 200+ radiostations. I have tried to make it as simple and light as possible, thera are only three sections: radiostations, player itself and favorites.
In the nearest future I am going to implement following features:
  • Finish "Favorites" section;
  • Add new station to favorites;
  • Display current track for selected radiostation;
  • Total time of playing for each of previously used radiostations;
  • Some changes in design.
You can download this application from project site on Google Code.


Sunday, May 31, 2009

It's time!

Adobe already released Flash Builder 4.0 beta.
I've just installed it and tried first project. I see that swfobject library is using in the index.template.html file. Design mode is slightly different from Flex builder, but Properties panel and Constrains are in same style. I found one interesting panel - Appearance, on this panel now we can change global application style and whole application theme, I found here 8 predefined adobe themes. The full list of new features you could find in Matt Chotin's post.
Than, I have tried to import simple flex project into Flash Builder and it works fine. So, seems to me, it is time to move all my projects to Flash builder. I hope there won't be any serious problems.

Saturday, May 30, 2009

everything Live!

I just want to share with you my thougts about future internet or Web 3.0.
I realised that Web 3.0 will bring to us Live comunications, Live collaborations, Live contents, everything Live. There won't be "typing" any more in our messengers, we won't need to refresh browser to get new comments, new posts or new photos.
I see that some services are already using this feature. For example, Drop.io service is using for Live collaboration in drops or Leprosirium community has Live version where user can monitor new comments or posts.

One hour of today evening I spent watching Google Wave presentation. Just watch it, the demo is really cool.


Wednesday, May 20, 2009

Merapi is open.

Adam Flater has announced that Merapi is open. I immediately downloaded asdoc documentation for flex library to check systemExecute method which was seen in alpha version, but I didn't find it. Then, I have tried merapi library in flex... unfortunately this method disappeared.
I hope guys from Merapi project will reply on my question what happened to this method.

Monday, May 18, 2009

Sherlock Holmes.



It's really cool :) Cannot wait for Christmas!

Caching Tutorial

While checking my rss, I found quite interesting resource - all about web cache, how to use it, how to avoid caching. Caching tutorial.
In my work to avoid caching swf files or external resources, such as xml files or images, I am using following practice - to append random value to the url.

url="{ 'externalResource.xml?' + new Date.milliseconds }"


Nothing new, it is common practice and it is works perfectly.

I use SWFObject to embed swf file in html page and same solution to prevent swf from caching:

var randomNumber=Math.floor(Math.random()*10000);
swfobject.embedSWF("index.swf?"+randomNumber, "alternativeContent", "100%", "100%", "9.0.115", "expressInstall.swf", flashvars, params, attributes);


And there is Adobe's TechNote How to prevent caching of swf files.

Friday, May 15, 2009

Nullwave radio

Currently, I am working with guys from Nullwave.ru and I am doing front end part of the internet radio player.

I cannot reveal link to this player, because we are still testing it. We already did a lot, I've got a lot of experience working with sounds, streaming sounds and sockets (xmlsockets), especially with socket policy.
I hope , we will release it for public very soon.

Sunday, May 10, 2009

Security sandbox violation or magic BIN directory

Why flex builder allows make remote data call from bin directory? What does mean "Security sandbox violation" error? How to configure FlashPlayerTrust file? All answers and lot more related to local sandboxes can be found on AdobeTutorialz.

Monday, May 4, 2009

AIRTranslate on Softpedia


Yesterday I have received email from Softpedia:

"Congratulations,

AIRTranslate, one of your products, has been added to Softpedia's database
of software programs for Mac OS. It is featured with a description text,
screenshots, download links and technical details on this page:
http://mac.softpedia.com/get/Internet-Utilities/AIRTranslate.shtml
...
AIRTranslate" has been tested in the Softpedia labs using several
industry-leading security solutions and found to be completely clean of
adware/spyware components. We are impressed with the quality of your
product and encourage you to keep these high standards in the future.

To assure our visitors that AIRTranslate is clean, we have granted it with
the "100% FREE" Softpedia award. To let your users know about this
certification, you may display this award on your website, on software
boxes or inside your product."

Cool :) I need new ideas for new applications.

Tuesday, April 21, 2009

DESKTOP REPORTING for Google Analytics

Recently, I was searching air desktop client for Google Analytics. I remember the very first and very powerful example, but I found only broken link on Adobe Marketplace and few posts on TechCrunch or here.
Also, I found the DESKTOP REPORTING company which is working on such application (if I am not mistaken they developed application what I found on TechCrunch). I left them my email and today they have released Polaris for Google Analytics.

I have just installed it. It looks impressive, I like UI and the design. Seems to me, they have implemented almost all google analytics native features. I like it.

This company has another three products for Google Analytics coming soon.

Sunday, April 19, 2009

Thursday, March 19, 2009

AIR 2.0

Rich Tretola today asked community what we want in AIR 2.0. I summarized all features from comments in one list:
  1. OS integration (launch external applications, run as service);
  2. multi-threading;
  3. PDF support;
  4. access to USB / Bluetooth devices;
  5. support on mobile devices;
First issue, of course, is the most important and it is still open. I know few solutions for this issue, for example very powerful tool for Win and Mac platform - Shu Player. It is commercial project and costs S$190. My colleagues tried it with their project and they were satisfied with it.
Another one project to extend AIR application is FluorineFX Aperture (for Win platform only). I didnt tried it yet, but list of features looks very impressive:
  • Launch native applications and documents;
  • Take screenshots of the whole screen;
  • Access Outlook contacts from an Air application;
And of course Merapi project. It is bridge beetwen AIR and Java. Few examples of AIR application with Merapi you can find on my blog.

Regarding multi-threading issue I found question on Flex cookbook: Is multi-threading possible in Flash or ActionScript?

I think, the rest of issues are not a big deal for Adobe :)

Friday, March 13, 2009

New service from Google - Google Voice

Google is going to launch new service called Google Voice. The idea is really great, but I didn't find any details about countries where this service will work. Is it for US states only or for international use? I found this question on Google Voice forum, unfortunately, exactly this question does not have any answers.

Wednesday, March 11, 2009

Comments in pop-up.

I changed comments to pop-up mode because now it is only one way to post comment on my blog. I will change back it to normal mode as soon as Blogger fix this problem.

Tuesday, March 10, 2009

Adobe Certified Expert in Flex & AIR.

I have passed Adobe Flex 3 with AIR ACE exam and. I cannot say that exam was very difficult but not very easy. For flex developers who is going to pass this exam I can advice guide created by Jonnie Spratley. He collected all needed (maybe not all) information for this exam in one document.
But this guide is nothing without real practice.
May the force be with you :)

Sunday, March 8, 2009

AIRTranslate: updates

I've released new version (1.1) with few features:
  • Swap languages;
  • Return to initial text (double click on text area to return initial text);
  • and some minor changes.
AIRTranslate will inform you that new version is available.

Friday, March 6, 2009

AIRTranslate: Google Translate on AIR

Yesterday I have finished small AIR application for Google Translate service - AIRTranslate.
I've tried to minimize UI to make it simple as possible and put all major features on main screen.
Few words about supported languages. Google supports a huge list of languages, initially, I made combobox control with full list of languages, but then I decided to make list of basic (by my opinion) languages and option "More...". When user clicks on this option, application will automatically add all languages to access.By the way, If you are going to paste and translate text in few lines application will be automatically expanded.

Some features I am going implement in the next releases:
  1. Keep history of users translations.
  2. Track most used languages and set languages in the start of application.
  3. Swap languages.
  4. Back to initial text.
  5. Spelling (?)
AIRTranslate is available on google code site, source code will upload a bit later.

Tuesday, February 10, 2009

Release of Adobe® AIR™ Marketplace

Last month I've got email from Adobe announcing that they are going to release new version of the Marketplace and asked me as publisher to make some changes on the Image Shack Uploader page.
And yesterday Adobe® Marketplace Beta has been released to public. Check it out.

Btw, Image Shack Uploader was downloaded 69 times from Marketplace and 153 downloads from google code.

Friday, February 6, 2009

RIAction in Singapore

Singapore Flex User Group announced RIA event. It is going to be big session for all kind of ria developers.

Thursday, February 5, 2009

version 2.4: Resize and crop

Today I have implemented beta version of the resize/crop functionality for Image Shack Uploader AIR application. To open Resize/crop tool you need to select User crop/resize tool checkbox on the Options window. Now, before upload to server, you can change size of you picture and upload it or select fragment on your picture and upload only selected area.


Latest version is available on the ImageShackUploader project site.

Saturday, January 31, 2009

Resize and crop for Image Shack Uploader

I am about to release new feature for Image Shack Uploader application. On the screen shot you can see Resize/Crop Tool:

There will be possible to crop image or resize it and upload on server. This window can be configured in options. I hope it wil be useful.

Wednesday, January 21, 2009

Open file from AIR using Merapi bridge

When I finished with vista style experiment I was thinking what if merapi could help to open files from AIR application. On the screen cast below I will show AIR application which could open MS Office file:


Before run my AIR application I needed to start java bridge (java project from Eclipse). I decided to zip all needed libraries into one runnable JAR file and run it from BAT file. But I still wanted to make one runnable file to start java bridge and AIR application together. One day, browsing on Merapi forum I found entry with solution to my problem. Using NSIS installer author has been built exe file.
The Bridge class from the Merapi library has a method called systemExecute with one string parameter Path. I tried to use this method with path to notepad.exe file, but in the result I had an error on Java side. I think this method was added to implement such feature as executing files from AIR application. Will check with new version of the Merapi library.

Update: Source code for Java project and for AIR project. In the java archive you could find runnable .jar and .bat files.

AIKI-JUTSU TAKEDA-RYU MAROTO-HA

Tuesday, January 20, 2009

Experiment: Fake Transparency

Recently, I have tried to make window for AIR application in vista-style . I mean, transparent window and blur effect applied on it.


I realized that I can make transparent AIR window and apply blur effect on it, but all objects on this window will be blurred as well. After some research, I understood that it is impossible to implement such feature like window in vista-style with AIR 1.5. Then I decided to try to make a desktop screenshot, copy area under the window and apply it to the backgroundImage property. But there was another problem, AIR 1.5 could not do a screenshot. So I decided to postpone this experiment to next version of AIR.

But some days ago, on the everythingflex blog I found post about Java bridge to AIR application called Merapi. Using this bridge, AIR application could do a screen shot. I decided to a bit amend sample in that post. The result of my experiment is below:



Original size.

Update: Source code for AIR application is available here.

Monday, January 19, 2009

Enterprise Flex with BlazeDS, The Book

In my morning subscriptions I found interesting post on Flex Pasta blog where Brian Telintelo announced that his book "Enterprise Flex with BlazeDS" has been published. The introduction and list of chapters looks interesting. On lunch I am going to check is this book in «Borders». I hope it is already in Singapore.

Update: Unfortunately, it is not, because it is just published and will be available in month. So I made pre-order.

Sunday, January 18, 2009

Loading Image progress

Sometimes, in my projects, I needed to display progress of the image loading. It is not a big deal to display some animation stuff or some text during the image loading. But what if we need to display real progress of the loading, I mean percentage? After doing some research in internet, I found unusual solution to this problem. I think it is kind of trick where you can add ProgressBar as a child to Image. Another words, extend Image class adding ProgressBar which will display progress of its own loading.
This solution I found on Tony Fendall's blog and please check it out with source code.

Update: ImageShack uploader and auto update

Today I have implemented auto-update functionality for ImageShack Uploader application.
Now source code is available on Google code.

Update: Adobe QA team just approved my application and now it is available on Adobe AIR Marketplace.

Friday, January 16, 2009

Multitouch technology with AIR

Last year, in June, I attended one of the most interesting session of Singapore Flex User Group, session was about multitouch technology. Christian Moore from NaturalUI made a great presentation about history of this technology, how it works and how to create multitouch application using Lux library and ActionScript 3.0.
Even more, Hu Shunjie created an example of the touchscreen with paper box, piece of plastic and webcam.

I am trying to follow this technology and today, on InsideRIA, I found impressive video presentation about multitouch interface built on AIR. Check it out.

Thursday, January 15, 2009

ImageShack Uploader

Sometimes I use ImageShack server to share my photos with friends or for posting images on forums. And one day, on ProgrammableWeb I found APIs for this service and decided to create AIR application for uploading images.

In the process of the development I found that Adobe's File or FileReference classes does not allow send files with custom content type and ImageShack backend do not accept Adobe's default content type. I investigated this issue and realized that currently it is impossible to send custom content type. So I decided to use as3httpclientlib library.
Using this library I could specify content type required for uploading (like image/jpeg, image/png) and send file using multipart POST request.
Each time, when image was successfully uploaded, I save links in the shared objects. So, user can manage all uploaded images (links to original images and thumbnails).
ImageShack upload method accepts parameters which allows resize images on backend side. But there I found another problem. This time it was problem on the backend. When I send parameters required for resizing, server does not respond. I decided to install ImageShack's firefox plugin and trace request to server. Unfortunately, server did not respond as well. So in the next version I am going to resize image using actionscript and send already resized image to the server.
Also, I have one issue in my todo list to implement, it is auto update for my air application.

If you are interested in such kind of application, you can download it here.

Post, The First.

Hi Everyone,

My name is Denis Volokh and I am Flex/Air developer at Singapore Telecommunications Ltd.
I've started this blog to share some of my ideas, experiments and codes.

Currently, I am working on the project codenamed "eShop", this project was rolled out this year, but we still have a lot of features to implement.
SingTel is the first company who is selling iPhone in Singapore. For the reservation and buying iPhone in SingtelShop we have developed standalone flex application, you can check it out here.

My friend Andrij and I am working on the project called "Idubee". It is online spreadsheet application built with Adobe Flex Framework.

Also, I am interested in Papervision3D framework, Java development (Merapi) and all what is related to the web.

A bit later I will present few examples of my works.

So, see you in next posts.