Tuesday 10 January 2012

Setting Favicon in Flex


We need to put the favicon image in the root folder of project. The favicon image is used to give image to the browser tab and in favorites list..
 
After adding this image in the root. We may have to add the following line in the index.html page below :

<head>
<link rel="shortcut icon" href="favicon.ico">
</head>


Simple Encryption and Decryption

Monoalphabetical Substitution Cipher in Flex Monoalphabetic Substitution Cipher is a encryption algorithm which was used in old times. In this algorithm each letter is replaced with another letter according to the cipher alphabet based on the key word.
Look at the following example:
key word: leila
PlainText Alphabet: abcdefghijklmnopqrstuvwxyz
CipherText Alphabet: leiabcdfghjkmnopqrstuvwxyz
Following is the ActionScript code for the ciphering by monoalphabetic algorithm.

Following is the monoalphabetic cipher MXML codes in Flex.


Following is the screen shot  of monoalphabetic cipher algorithm in flex to show how the codes work.

TileList as a Photogallery

The TileList control displays list of items which are tiled columns and rows. The TileList control is for displaying a list of images which needs itemRenderer to be used to locate the image because the default itemRenderer of TileList is TileListItemRenderer and shows olnly text of data provider's list and icons.
In the source code below it is shown how to display images in a TileList control.














The following shows how to control the click event of the images and give some effects to the imges: