Pages

Wednesday, December 12, 2007

Thursday, December 6, 2007

Encrypting Data in AIR

In my current AIR project...I have used MD% algorithm to store the password in encrypted format(which is nothing else but a plain text)..and I every time the application starts I read the textfile ......

But just now read about Encrypting Data in AIR
Now thinking why the heck I used so much encryption and decryption :( when there was something like data Encryption was already available.


// Writing encrypted information
var passwordBytes:ByteArray = new ByteArray();
passwordBytes.writeUTFBytes("secretPassword");
EncryptedLocalStore.setItem("password", passwordBytes);
// Reading encrypted information
var passwordBytes:ByteArray = EncryptedLocalStore.getItem("password");
var password:String = passwordBytes.readUTFBytes(passwordBytes.length);


details here :
http://weblogs.macromedia.com/cantrell/archives/2007/12/encrypting_data.cfm

Thursday, November 22, 2007

PurpleTrail deskop - My AIR Project

Yes ...Its MY AIR project..in Air beta2 and flex 3... :) and I am damn happy about it. I got a chance to work in these techs and to build a product...I have craved for this chance all through my carrier and yes I got it thanks to my employer for trusting me...I have been a lot busy with this lately..and could not post anything here..

Completed the first part of our product. have a look at the screen shot..Its the desktop version of the app purpletrail.com. Please have a look at the application..the work is still in progress.. losts of new feature will come in. All that we see on web there will come in desktop :) :) :) ..I am too excited about it..May god help me in the future journey of this.

There is lot more to come.. can not summaries in one screen....
The main feature that i wanted to highlight here is the Smiley Textfield..
Yes its our normal textArea class...extended.. and coustmized to read img tag and anchor tag (text in anchor tag gets the special formatting.) these features are not available with our normal textArea..look at the tooltil also.. ToolTip class is also customized to hold the rich text..with img tag.

There are lot many things not just smiley.. like autorize textArea..clickable field in textArea.. etc. etc. Had lots of fun doing this..more fun is waiting for me. I am too impaitent to make it furnish. Thanks God for everything

Thursday, October 11, 2007

Image as a toolTip

I just dreamed of it now... and yes dream came true.. :) :)
I found a post by Rich Tretola on his blog "blog.everythingflex.com" where he has posted his example in which we can show a image in the tooltip , all we have to provide is the image url ... Everythingflex.com is really about everything in flex !

Thanks Rich....

Wednesday, October 10, 2007

I reported a bug on apollocoder and Mike Chamber forwarded it to their QA team :) :) :)

Anyways, The bug is :
Using ScreenMouseEvent.CLICK , something like :
SystemTrayIcon(Shell.shell.icon).addEventListener(ScreenMouseEvent.CLICK,showScreen)
Gives error:
TypeError: Error #2007: Parameter type must be non-null.
Work arround, Hardcode the "click" string as :
SystemTrayIcon(Shell.shell.icon).addEventListener("click",showScreen)
The problem does not occur in :
ScreenMouseEvent.RIGHT_CLICK
ScreenMouseEvent.RIGHT_MOUSE_DOWN
ScreenMouseEvent.RIGHT_MOUSE_UP

Tuesday, October 9, 2007

Standard chrome of air

D I unnecessarily used standard chrome of air??? ! If I am using the custome chrome, its not letting me set up the native menu option, I get an error like :
" Native menus are supported only in case of standard chrome?? "
what is this??
* Full screen in not supported if we are having the transparent window....??
*Native menus are supported only in case of standard chrome??


Friday, October 5, 2007

Air App in system Tray with menus

Here is the sample code :

<?xml version="1.0" encoding="utf-8"?>
<mx:WindowedApplication
xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
height="400"
width="500"
creationComplete="init()"
showFlexChrome="false">
<mx:Script>
<![CDATA[
import mx.core.BitmapAsset;
import flash.system.Shell;
import mx.controls.Image;
public var _root:NativeMenu
[Embed(source="icons/AIRApp_16.png")]
[Bindable]
public var imgCls:Class;
function init(){
_root = new NativeMenu()
this.nativeWindow.x = 0
this.nativeWindow.y = 0
trace(Shell.supportsSystemTrayIcon )
var editMenu:NativeMenuItem = _root.addItem(new NativeMenuItem("exit"));
editMenu.addEventListener(Event.SELECT,exitApp)
var imgObj:BitmapAsset = new imgCls() as BitmapAsset;
Shell.shell.icon.bitmaps = [imgObj.bitmapData]
SystemTrayIcon(Shell.shell.icon).menu = _root;

}
public function exitApp(event){
stage.nativeWindow.close()
}
]]>
</mx:Script>
<mx:Canvas height="100%" width="100%" borderStyle="solid" borderColor="#18252E" cornerRadius="20" backgroundColor="#605050">
&ltmx:Button x="54" y="43" label="Close window" click=" stage.nativeWindow.visible=false"/>
</mx:Canvas>
<mx:Image id="myImageRaw" source="{imgCls}" visible="false"/>
</mx:WindowedApplication>

>

Thursday, October 4, 2007

Making air window fullscreen size

<mx:WindowedApplication
xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
showFlexChrome="false"
height="{ Capabilities.screenResolutionY}"
width="{ Capabilities.screenResolutionX}"
creationComplete="init()">

<mx:Script>
<![CDATA[
function init(){
this.nativeWindow.x = 0
this.nativeWindow.y = 0

}
]]>
</mx:Script>

Wednesday, October 3, 2007

changes in AIR sdk:

  1. 1. name space changed: "http://ns.adobe.com/air/application/1.0.M5" from and "http://ns.adobe.com/air/application/1.0. The structure of the app.xml got changed (we know !:) )
  2. stage.window changed to stage.nativeWindow
  3. We can no more write to appresource directory we have to write in appstorage directory.
  4. fullscreen mode :The full screen mode does not work if the application is set to transparent :( The work around is to set one transparent png as the background image for window and then make it full screen.
  5. File.resolvePath changed from File.resolve
  6. ....More will come...

Tuesday, October 2, 2007

Flex builder beta 2

Yes! flex builder beta2 got released today..with lots of new features. Get it from here. Apart from the various new features in FB3 -beta2, release notes talks about the Installing and Configuring Flex Automated Testing. Which I do not understand much. The small list of features in FB3 is:
  • Native support for Adobe AIR – Flex 3 introduces new components and incorporates the Adobe AIR development tools into the SDK and Flex Builder.
  • Persistent framework caching – You can make Flex 3 applications as small as 50K when leveraging the new Flash Player cache for Adobe platform components.
  • Flex Builder productivity enhancements – Flex Builder 3 introduces refactoring support, new profilers for performance and memory tuning, and code generation tools for data access.
  • Integration with Creative Suite 3 – The Flex Component Kit for Flash CS3 allows Flash CS3 users to build components that can be seamlessly integrated into a Flex application, while Flex Builder 3 adds new wizards for importing assets from CS3 applications as skins.
  • Advanced DataGrid – The Advanced DataGrid is a new component that adds commonly requested features to the DataGrid such as support for hierarchical data, and basic pivot table functionality.
  • First steps toward open source Flex. As a first step toward making Flex an open source project, we've opened up the Flex and Flex Builder bug tracking system to the public, as well as published detailed roadmap information.
The Details we can find on : http://www.adobe.com/devnet/flex/articles/flex3_whatsnew.html and Flex Interface Guide(http://www.adobe.com/devnet/flex/?navID=fig). Gotta get fast on track to keep up with new things

Monday, October 1, 2007

Air beta 2

Adobe released there Beta 2 runtime. Release notes are on labs . (here :)) . The doc says:

Support for AIR Beta 1

AIR Beta 1 will expire on December 11th 2007, so all applications that you have created for AIR Beta 1 need to be migrated to AIR Beta 2 if you want to run your applications after that date.

So do it as soon as possible. :) there are few changes.. minimised to systemtray functionality added ,initialWindow tag added in the descriptor , changed to http://ns.adobe.com/air/application/1.0.M4.

Details are on labs.

Saturday, September 29, 2007

Ptraco on http://www.airapps.net/

Got an early information from sagar that, they (airapps.net's ppl) took our app and kept it on the site, :) is it not cool? Nobody from us ,neither me nor Sagar submitted Ptraco there, somebody from airapps.net came to sagar's blog and got the details about it , and hence published it onto the site. It seems Ptraco has got the separate media server for itself and unlimited connections to it.

All we got to do is now..to take out the time and start working on it vigorously again.

Friday, September 28, 2007

scale nine...in flash

To edit the symbol in flash with scale nine grid ,so that it can be used to skin the flex component, Just do the following :

Whil creating the symbol select the checkbox which says "Enable guides for 9-slice scaling"

The post from the guy behind scale nine in flexcoders :
[
Working with rounded corners you'll want to set the left scaleGrid right after the end of the top left curve, for the right scaleGrid set it right before the top right curve starts, for the top scaleGrid set it right after the top left and top right vertical curve ends, and for the bottom scaleGrid set it before the bottom left and bottom right curves start. The artwork inside that "box" or boundaries will be the content that stretches, while everything outside of it will not. ]

Thursday, September 20, 2007

New presentation tool from google :)

I use google docs,google reader regularly. While browsing across the bolgs came to know about the presentation tool from google, The Great-google's presentaion tool is awesome.

Tuesday, September 11, 2007

air's adl.exe

When we open the air app the adl.exe get executed and runs in background.
I was trying to create multiple windows and playing with its visibility and close event.

When one window is made invisible without closing it.There is no way to open the
window again..(because its was not closed , just made invisible.)

If you are facing the problem like this.. while development..DO NOT PANIC(As I did).
Closing of flexbuilder or anything else wont help..
Just go to the task manager and end the process "adl.exe"
I am wondering , what is the long form on adl??

Friday, September 7, 2007

Logger

So .. I wrote a logger today for my flex and air app.

If u are creating logger for the first time.. and u are on the XP
You will have to follow the following steps

1) create "mm.cfg" file in

C:\Documents and Settings\user_name

2) then write ur logger and give the trace target..
A help about creating a logger is given at felxbuilder's help
few code snippet here :

import mx.logging.Log;
import mx.logging.ILogger;
var logObj = Log.getLogger(NameofClass); // for name of class u can just pass
// application class also
// mx.core.Application.application

and in main application :

<mx:TraceTarget level="0" includeDate="true" includeTime="true" includeCategory="true" includeLevel="true"> <mx:filters> <mx:Array> <mx:String>*</mx:String> </mx:Array> </mx:filters> </mx:TraceTarget>

and thats it..
then where u will write...
trace("trace me") or logObj.info("trace me")
The messaged is pushed to logfile

The location of the log file is

C:\Documents and Settings\user_name\Application Data\Macromedia\Flash Player\Logs\Flashlog.txt

Yes .. the log folder gets created.

:) info pushes the

google custom search egine

google....

Google's development speed is more than my thinking speed.

Look at the gadget in the side bar..is it not cool?

:)


Wednesday, August 22, 2007

Edit in place


WOW! did I know that the UI component in CS3 are editable now. Now my designers wont have problem in editing them in place..the feature in flash 6 is bought back.. In a very systematic way.. all the movieclips in the UI component are linked to the external class in the display package. And hence no code in the timeline. And there by i don't need to worry that my designer delets the code by mistake.. cool and thanks to adobe for bringing back something good.


Thursday, August 16, 2007

beyond imaginaion APE and papervision 3

http://www.cove.org/ape/index.htm

http://blog.papervision3d.org/

These two open source project are really awesome.
All the things that happens to the particles in nature by the forces of
physics are implemented in " APE ".

I have heard a lot and seen a lot about the desktop by Anand agrawal.
On similar front, http://dougmccune.com/blog/2007/08/04/the-making-of-tileui/
shows how neatly the tileUI has been made by McCune.

I am completely flattered and now thinking of some idea..
what I can do with this.

* AI game? (can think of it.. but there are many categories
like technical simulation of hi-tech machine or
car racing game etc etc. )

* menu Style? (there are already menu styles in menu)

* Some organizer like task organizer (this becomes too professional )?

* Some todo list.. this can be done.. actully I have done also
with apollo.. but this will be just like copying McCune's concept.

What should I do .. a better idea.. got to think a lot

Friday, August 10, 2007

what the hell is fibonacci seris

http://www.textism.com/bucket/fib.html

Wednesday, August 1, 2007

golden ratio



Is it really possible? YES.. the beauty of mathematics is called as "Golden ratio"

Tuesday, July 31, 2007

Oh working on PTRACO

I am also working on one Apollo App. Ptraco , We had thought a lot a lot and lot.. many many and many logos different approaches.. thinking and deciding on the technology. Finally.. Apollo was the solution and here we go.. I have wrote many API's and base is almost done. No need to say..The UI is great! Lot to do ..lot to do..lot to learn... Details on http://sagarkulkarni.com/2007/07/23/first-air-application-way-to-build/ We are using OpenAmf for the server connections.

My new notesApp

I am really dumb enough. So many days I have not posted anything on my blog. Actually studied a lot and tried lot of samples but did not posted anything. Hmmmmm!. Sagar has posted the app oh his blog.


OK enough ... here is the APP.



Screen shots should be enough to give clear idea of what the app is. Too lazy to write anything.

Friday, May 18, 2007

Check Box in list

I was too lazy to read docs and then create a cellrenderer class to show checkbox in list component.
Was searching for some ready made code to get this working.
But no luck finally tired out something and could get to this point

example: List with CheckBox

Source

You can find the CheckCellRenderer.as in mx/controls/cells folder of flash

I edited it according to my need and named as CheckBoxCell.as

Wednesday, March 21, 2007

My first Apollo application

Checked out the Apollo followed the tutorial on labs by Andrew Muller : Building your First flex-based Apollo application. and could make an first step towards it. Its something very similar to mdm and Mprojector. There we get the mdm component to access the api of mdm (in flash). Here we need to have a apolloApplication tag instead of Applicaion tag in(flex) and Basically it creates a exe to which we can give attributes from xml(myApp-app.xml ) file kept on application root. we can have all the attributes like transparency's systemChrome and applications icon. We need to create a deployable air (installer )file.

We can ditribute this air file for the installation. and thats all..
Apollo app is created. we just need to study the Apollo api's :
http://labs.adobe.com/wiki/index.php/Apollo:Documentation:API_Reference


Monday, March 19, 2007

Apollo is on Adobe labs

Was waiting long for Apollo ..and now the wait has ended. Was desperate to try something in it. But it was not available for development for the common developers.
But now its publicly available for the download on the adobe labs.We were reading a lot about it , its Camp from the various ppl's blog. But now will actually get to try something on it. :) Just visit this link : http://labs.adobe.com/technologies/apollo/ Check out all the sample applications and learn a lot , develop a lot :) Cheers :)!

Thursday, March 15, 2007

my feedz api

The myFeedz API from adobe gives us facility to search content of
our interest across the web in more systematic way.
We need to create a account on myfeedz which gives a api key in our profile section.
We can add the tags of our own interest, the feeds that we like to our profile.
Using this key we can access the myFeedz API. Get the info of our interest.
The api section of myfeedz nicelly explain the use of all the api's listed there.
I was having some problem while accessing list of tags from my profile on my feedz.
Thanks to renaun , who helped me a lot in sorting out the problem.
The sample code is here :

<?xml version="1.0" encoding="utf-8"?>
<mx:Application
xmlns:mx="http://www.adobe.com/2006/mxml" >
<mx:Script>
<![CDATA[
import com.adobe.serialization.json.JSON;
import mx.controls.Alert;

[Bindable]
private var myFeedzKey:String = "82f3eacc8d5ba8f651d940d197d23041";//"";
[Bindable]
private var feedURI:String = "http://www.myfeedz.com/api/v1/tags/?key=";
]]>
</mx:Script>
<mx:HTTPService
id="feedZservice"
url="{ feedURI + myFeedzKey + '&from=1' }"
useProxy="false" result="showAlert(event)"
showBusyCursor="true"
/>
<mx:HBox>
<mx:Button label="list tags from my account" click="feedZservice.send()"/>
</mx:HBox/>
<mx:DataGrid
id="dgPosts"
height="90%" width="90%"
dataProvider="{ JSON.decode( feedZservice.lastResult.toString()).tags }">
</mx:DataGrid>
</mx:Application>

New video widget for gtalk

The google talk Gadgets from google. One more flash wonder..
just amazed to see the tabs and the opening closing of windows :)
check out the details on : http://blog.outer-court.com/archive/2007-03-14-n58.html

Wednesday, March 14, 2007

http://www.eightprinciples.com/

Viacom sues Google over YouTube clips - new from znet

http://news.zdnet.com/2100-9588_22-6166668.html?tag=nl.e589

flex lib proect:

Just like the corelib project for the collection of Actionscript3 api's ,the flexlib project has also started on codes.google.com for the collection of the custom flex component.
These components are open source and I think any body can contribute to this library.

But the contributed components has to be a pure Actionscript3 code and not mxml classes.

Library has a beatifull asDoc documentation which explains all the Apis.The downloadable zip of the library also contains the example for each component demonstrating their use.

We just need to include this library in our project and then use it as imported class or the user defined namespce.

ex:
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:flexlib="class path to flexlib library" > <flexlib:compoentName > <!-- properties to set --> </flexlib:compoentName >


more information on
http://code.google.com/p/flexlib/

Monday, March 12, 2007

Skinning Flex component

Skinning the flex component is too easy than it seems to be.
with the help of the beautiful templates (flash file and the css file given ),
we can just edit in the flash file given and use it in our flex project.
If we don't want to use that css file and just want to skin few component, we can do that also.

Ex: if we want to skin the tab bar component then,
1) create on css file (my_Skin_css.css) and write this


TabBar
{
firstButtonStyleName: "tabStyle";
tabStyleName: "tabStyle";
lastButtonStyleName: "tabStyle";

}
.tabStyle {
disabledSkin: Embed(source="my_skins.swf", symbol="Tab_disabledSkin");
downSkin: Embed(source="my_skins.swf", symbol="Tab_downSkin");
overSkin: Embed(source="my_skins.swf", symbol="Tab_overSkin"); selectedDisabledSkin: Embed(source="my_skins.swf", symbol="TabSelected_disabledSkin");
selectedDownSkin: Embed(source="my_skins.swf", symbol="TabSelected_upSkin");
selectedOverSkin: Embed(source="my_skins.swf", symbol="TabSelected_upSkin");
selectedUpSkin: Embed(source="my_skins.swf", symbol="TabSelected_upSkin");
upSkin: Embed(source="my_skins.swf", symbol="Tab_upSkin");

}

Note:
Tab bar is the component which aligns tabs in vertical or horizontal manner.
So it needs to handle the toggling of tabs. hence the first tab and the last tab needs to have different styling.
For that reason the "firstButtonStyleName" and "lastButtonStyleName" are sepcially mentioned.
If these things are undefined then the default style is assumed i,e(tabStyleName) for the first and last tab also.
(These atrributes are present mostly in the bar component like: button bar , togglebutton bar and tabbar )
(we can always refer to the default css given for the name of classes which flex use to skin its component.)

2) create flash file with the name my_skins.fla contains the movieClips with linkage name specified in the symbol attribute in ths css file
publish this flash file

3) and package the published swf(my_skins.swf) and my_Skin_css.css with mxml file.
mentioned the path of the css like this :
<mx:Style source="my_Skin_css.css"/>

Just run yourmxml and see the the skined component.

Download the template for the flash and css here :
Soruce article : http://www.adobe.com/devnet/flex/articles/flex_skins_print.html

Tuesday, February 20, 2007

making swf active in I E- no need to click it

When we embed the swf in a html page and view it in browser.
Its not active by default and on rollOver we get a message like this
: Press SPACEBAR or ENTER to Activate and use this control.

To Avoid this problem follow the following steps

1) Replace the object tag in html (in which we are embeding swf) by div
<div class="div03" style="opacity: .75; height: 385px;" id="flashContentLayer"> <script language='javascript'>fnPutFlashObject()</script>

2) write a function fnPutFlashObject() in an external js file

function fnPutFlashObject()
{
document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="1000" height="392" id = "main">');
document.write('<param name="movie" value="swf/flash-banner_left_ver1.swf">');
document.write('<PARAM NAME=wmode VALUE=transparent>');
document.write('<PARAM NAME=menu VALUE=false>');
document.write('<param name="quality" value="high">');
document.write('<embed src="swf/flash-banner_left_ver1.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="1000" height="392" id="main"></embed>');
document.write('</object>');

}

3) and include this js file in script tag
<script type="text/JavaScript" src="jsFiles/Source.js">

and it works !

Tuesday, February 13, 2007

sprites in mxml

While adding a sprite to mxml base application it produces a error like :

cannot convert flash.display::Sprite@3d2a191 to mx.core.IUIComponent.


Sprite is nothing but a new object introduce which is similar to movieClip. We can draw inside it and place it on to the stage by using its graphic object


The reason for error is mailny because sprite is the superclass of UIComponent , where as to add any object in mxml base container we need it to be a type of UIComponent. As the UIComponent class is the base class for all visual components. addChild method in UIcompoent Overrides the addChild method DisplayObjectContainer’saddChild method and adds a new object to mxml base container. (DisplayObjectContainer’ is a super class of sprite class ) Hence when we do addChild(newObject) we get a error , if newObject is of type sprite, as addChild which is invoked is of UIComponent class's method.

Hence we need to add a sprite to UIcompoent first and then the UIcomponent to mxml base container as follows :


<?xml:namespace prefix = mx /><mx:application initialize="drawStuff()" layout="absolute" mx="http://www.adobe.com/2006/mxml">

</mx:script>

<![CDATA[
import mx.core.UIComponent;
var bgColor:uint = 0xFFCC00;
public function drawStuff() : void
{
var ref : UIComponent = new UIComponent(); // creating a UI compoent Object
var circle1 : Sprite = new Sprite();
circle1.graphics.beginFill(bgColor);

circle1.graphics.drawCircle( 40, 40, 40 );
circle1.buttonMode = true;
addChild( ref ); // add UI component to mxml base container
ref.addChild( circle1 );// adding sprite to UIcompoent
}

]]>

</mx:Script>
</mx:Application>

Thursday, January 25, 2007

Attitude ...just thiking

Whenever life acts we respond. In determining how we face life it is our attitude.Fortunately, we control our attitudes.


"WE are responsible for all of our experiences of LIFE."


we are not responsible for everything that happens to us,
but we are responsible for how we react to what does happen to us
. The formula is that, "Life acts. we react." our reaction is under our control.
In any life situation we are always responsible for at least one thing.
we are always responsible for the attitude towards the situation in which we find ourself.
our attitude is our reaction to what life gives us. we can have either a more positive or a more negative attitude.

our attitude is under our control and can be changed.


With the right attitude we can be a HAPPY person


Tuesday, January 9, 2007

InfoWorld : 2007 Technology of the Year Awards: App Dev

8 technologies are awarded as technologies of the year by info world. Adobe Flex is also mentioned there as the leading RIA technology.


http://www.infoworld.com/slideshow/2007/01/25-2007_technology-8.html