blog

2011 January Archive at Jozef Chúťka's blog

January 21, 2011

5 Comments

AIR Desktop NativeProcess Remotair remote

Remote Desktop With Remotair

A computer desktop with a terminal and a phone screen shown in the corner.

A day ago I published a youtube video about remote Windows control from an Android device. I will try to clarify the process about how it is done. What you need to make this work for you is (1.) an Android device with Remotair application v 0.1.9 (or higher) installed, (2.) Windows with Remotair desktop .exe air application v 0.1.3 (or higher) and (3.) some capture-desktop softwer, VH Screen Capture works good.

Read the rest of this entry »

January 13, 2011

2 Comments

api maps onBoard OpenStreetMap

onBoard on Maps

A map of Europe with the onBoard toolbar.

I am pleased to announce, I managed to create an onBoard port for OpenStreetMap API. A few months ago I tought about how could this been done, and finaly, past week I had some time to work on that. With map version you can explore map as well as draw on any place – when zoomed to max. The tool that was created I consider as a very smooth map explorer, I am not affraid to say much smoother than official explorer from OpenStreetMap or Google Maps even considering short time spent on developing it, and I am not mentioning possibility to rotate the map or possibility to have an Android app in few hours.

Read the rest of this entry »

January 10, 2011

12 Comments

ceil fast floor Math round

Faster floor, round, ceil for ActionScript

It is always nice to add some speed boost to your performance critical algorithms. Making some native Math function’s alternatives perform up to 8 times faster is possible. Lets have a look at the basic ones Math.floor(), Math.round(), Math.ceil():

faster alternative for Math.floor()

var ni:int = n;
return (n < 0 && n != ni) ? ni - 1 : ni;

faster alternative for Math.round()

return n < 0 ? n + .5 == (n | 0) ? n : n - .5 : n + .5;

faster alternative for Math.ceil()

var ni:int = n;
return (n >= 0 && n != ni) ? ni + 1 : ni;

Read the rest of this entry »

January 7, 2011

6 Comments

ByteArray compress gzip gzuncompress lzma zip

Quick Tip: Compression in Flash

While working on one of my projects where I needed compression for transfered data, I hit some very interesting compression libraries. Also the ByteArray class contains compress method, using zlib algorithm in flash player or multiple algorithms in AIR. At the end I decided to use ByteArray.compress() method for encoding vs. PHP gzuncompress for decoding, what works correctly, fast and smooth.

Here is a list of 3rd party compression libraries and other good stuff:

AS3 Zip: ActionScript 3 based library for reading and writing zip files

FZip: FZip is an Actionscript 3 class library to load, modify and create standard ZIP archives.

ASZip: ActionScript 3 library to generate ZIP files

LZMA Encoder: AS3 class to compress data using LZMA algorithm.

LZMA Decoder: A part of the apparat framework.

GZIP: ActionScript GZIP compression library

Gzip for HTTPService/URLLoader: Adding Gzip support for Flex/AIR HTTPService/URLLoader

airxzip: Zip library for ActionScript3 on AIR

If you know some more, please let me know.

January 5, 2011

5 Comments

factoryClass Frame preloader Stage

Using Metadata Frame for a Preloader

This article was sleeping in my drafts for a while, and I am happy I managed to finish it today. There are multiple ways to create preloader for your ActionScript applications with flex compiler. The easiest and my prefered way is to use Frame metadata.

This metadata is a hint to the compiler that the class containing the metadata would like to be bootstrapped by the cited factory. In other words, when you build an application based on mx.core.Application, that isn’t actually the “root” class of the SWF. The root class is actually a compiler-generated subclass of mx.managers.SystemManager (Modular Applications)

Read the rest of this entry »

January 3, 2011

2 Comments

appInstaller package uninstall

Quick Tip: Unistalling BlackBerry Playbook application

The most common way to uninstall app from playbook simulator is using -uninstallApp flag within blackberry-deploy command. The bad thing about it is, that command requires installed .bar file or package-id that noone remembers:

blackberry-deploy -uninstallApp -device 192.168.44.129 -package MyApp.bar

Fortunately, there is another undocummented method mentioned by peter9477 using simulator’s http server. To make it work is very easy…

Read the rest of this entry »