/* CSS file */
@namespace mx “library://ns.adobe.com/flex/halo”;
@namespace s “library://ns.adobe.com/flex/spark”;
//CFF(Compact Font Format)
//For halo component set the embedAsCFF:false
@font-face {
src: url(“assets/fonts/verdana.TTF”);
fontFamily: myHaloFont;
advancedAntiAliasing: true;
embedAsCFF:false;
}
//For spark component set the embedAsCFF:true
@font-face {
src: url(“assets/fonts/verdana.TTF”);
fontFamily: mySparkFont;
advancedAntiAliasing: true;
embedAsCFF:true;
}
s|Button{
fontFamily:mySFont;
}
mx|Button{
fontFamily: myFont;
}
a powerful software utility that helps you make easy conversion between more than 2,100 various units of measure in more than 70 categories
Posted in Other | Leave a Comment »
addEventListener(MouseEvent.CLICK, function(e:MouseEvent){onClickEvent(e,”Argument”)});
Posted in AS 3.0 | Leave a Comment »
http://www.madeinflex.com/img/entries/2007/05/customeasingexplorer.html
Posted in Uncategorized | Leave a Comment »
import mx.rpc.xml.SimpleXMLEncoder;
import mx.utils.ObjectUtil;
private function init():void {
var xml:XML = objectToXML(arrColl.source);
}
private function objectToXML(obj:Object):XML {
//Creates a QName object with a URI from a Namespace object and a localName from a QName object.
var qName:QName = new QName(“root”);
var xmlDocument:XMLDocument = new XMLDocument();
var simpleXMLEncoder:SimpleXMLEncoder = new SimpleXMLEncoder(xmlDocument);
var xmlNode:XMLNode = simpleXMLEncoder.encodeValue(obj, qName, xmlDocument);
var xml:XML = new XML(xmlDocument.toString());
return xml;
}
Posted in AS 3.0 | Tagged Converting XML, object to xml, SimpleXMLEncoder, using the Flex SimpleXMLDecoder | Leave a Comment »
Most of the time we are facing difficulties in using the xml in data transfer object. So here is my simple solution for this problem. We can easily conver the xml into object with the use of simpleXMLDecoder. The only thing we have to do is just convert the xmlString into XMLDocument and pass this xmlDocument into the simpleXMLDecoder.
Posted in AS 3.0 | Tagged as xml to object, convert XML into Object, ml to ArracyCollection, object to xml, xml converter, xml to array, xml to object in as3 | 5 Comments »
Any comparison with NaN is always false:
We can match the default value with the related data type. But in Number data type NaN(Not A Number) is the default value. But matching the NaN with Default Number value rise the “error – Ilogical comparison with NaN”.
Posted in AS 3.0 | Tagged NaN, Number | Leave a Comment »
About Enhanced Constraints:-
Flex 3 has new approach to creating layouts is to expand upon the constraint-based layout system you are all familiar with. Allowing constraining of elements to not be dependent on the nesting of containers. Enhanced constraints allow you to constrain child controls to each other, the edges of the parent containers and stretches and reflows as the Canvas container resizes.
Description about the Enhanced Constraints :
There are two properties available
1.constraint column
2.constraint row
1) constraints rows are defined from top to bottom
2) constraints column are defined from left to right
3) you can create only one constraint region for eg, create constraint column
4) It will be re size according to the application
5) positioning will be handled in left,right,top,bottom.
6) Position can be done by id of row or column
7) if the column named “col1″ with width=”200″ and you specify on your control the position left=”col1:0″ and right=”col1:0″
control to draw at 0px and end at 200px of the region, you don’t have to create 2 columns, each
column has left,right,top,bottom regions
Sample:-
</mx:Canvas>
<mx:constraintColumns>
<mx:ConstraintColumn id=”nav” width=”212″ />
<mx:ConstraintColumn id=”column1″ width=”100%” />
</mx:constraintColumns>
<mx:constraintRows>
<mx:ConstraintRow id=”row1″ height=”80%” />
<mx:ConstraintRow id=”footer” height=”20%” />
</mx:constraintRows>
<mx:List left=”nav:10″ right=”nav:10″ top=”row1:10″ bottom=”row1:10″ />
</mx:Canvas>
Types of Constraints :
- Center Constraints – Here there are two styles available horizontal center and vertical center
<mx:Button horizontalCenter=”0″ /> — placed in horizontal center
<mx:Button verticalCenter=”0″ /> — placed in vertical center
<mx:Button horizontalCenter=”col1:0″/> placed in horizontal center for constraintColumn
- BaseLine Constrinats :
User is setting the setting the range from the top edge of the constraints
<mx:Button baseline=”20″ /> — its the baseline 20 PX from the top edge
Posted in Flex | Tagged Constraints, Enhanced Constraints | Leave a Comment »
http://weblogs.macromedia.com/mc/archives/flex_user_experience/index.html
Posted in Uncategorized | Tagged smoothing on Images | Leave a Comment »
Posted in Uncategorized | Tagged flex basics, flex component explorer, Flex for beginner | 1 Comment »