Pages

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