addEventListener(MouseEvent.CLICK, function(e:MouseEvent){onClickEvent(e,”Argument”)});
Archive for the ‘AS 3.0’ Category
To pass parameter using addeventlistener
Posted in AS 3.0 on April 15, 2009 | Leave a Comment »
Converting objects to XML using the Flex SimpleXMLEncoder
Posted in AS 3.0, tagged Converting XML, object to xml, SimpleXMLEncoder, using the Flex SimpleXMLDecoder on March 5, 2009 | 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.
[...]
convert XML to Object, xml to ArracyCollection
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 on February 5, 2009 | 5 Comments »
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 [...]
Comparison with NaN
Posted in AS 3.0, tagged NaN, Number on February 5, 2009 | Leave a Comment »
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”.
//NaN is the default value of the Number Data Type
private var myNumber:Number;
[...]