TypeError: Error #1034: Type Coercion failed: cannot convert XMLList@37ace21 to Class.

Problem:

Something is receiving the wrong data type and it cannot be converted. For example, a function is expecting a string and we pass it an Array.

This also occurred in when I was passing an Array to a function that expected another data type.
The error detail is “cannot convert []@e1f73f9 mx.core.IUIComponent.”

NOTICE – The value I am passing to the “target” property is an Array because the value is enclosed in brackets “[myvalue]”. This would work if the property was “targets”. The property “target” expects an object.

// INCORRECT


// CORRECT - Notice I removed the Array brackets

In this next example, an XMLList cannot be converted into an Array, which is what this component needs.

The error details is “cannot convert XMLList@37ace21 to Class.”

 
public function tabBarHandler(event:ItemClickEvent):void {
    
	var menuitems:XML = event.item.menuitems as XML;

	// this converts an xml list into a array collection but the tab bar cannot accept an xmllist data type
	// you *CAN* use this method if your data provider can accept an ArrayCollection
	//var menuDP:ArrayCollection = new ArrayCollection(new XMLListCollection(event.item.menuitems.submenu as XMLList).toArray());

	// in our case since we *CANNOT* we manually convert it to an array and then add it to the tabbar
	for each (var menuitem:XML in menuitems.submenu) {

		// create a new object and assign the properties to it from the xml node
		var newItem:Object = new Object();
		newItem.label = menuitem.@label;
		newItem.link = menuitem.@link;
		// optionally create a reference to the original xmlnode
		newItem.menuitem = menuitem;
		// add item to the array collection
		menuDP.addItem(newItem);

		trace(menuitem.@label);

	}

	// add new menuDP array collection to our tab bar
	subMenuBar.dataProvider = menuDP;
}

Please reply in the comments below if this helped you or not. You can also use the Error Lookup Tool to look up Flex compiler or runtime errors. more info…

TypeError: Error #1034: Type Coercion failed: cannot convert XMLList@37ace21 to Class.

34 thoughts on “TypeError: Error #1034: Type Coercion failed: cannot convert XMLList@37ace21 to Class.

  1. Judah,

    Great blog. Very helpful in solving Flex errors. Here is a totally unrelated question. How do show code as ‘code’ in blog. IT looks like from the source code that you have multiple Div tags and lists etc… Is this a plugin or part of a theme, or something else.

    Thanks in advance,

    Curtis J. Morley

    Like

  2. Judah says:

    Another instance this error occors when trying to add a Sprite to a Container.

    TypeError: Error #1034: Type Coercion failed: cannot convert flash.display::Sprite@14b5401 to mx.core.IUIComponent.

    This is the code:

    var bar:Sprite = new Sprite();

    bar.graphics.lineStyle(5, 0xFF0000);
    bar.graphics.moveTo(100, 100);
    bar.graphics.lineTo(200, 100);

    bar.addEventListener(MouseEvent.CLICK, clickHandler);

    // this refers to the application / container
    this.addChild(bar);

    Change the reference from “this” to “rawChildren”:

    rawChildren.addChild(bar);

    Like

  3. Mikael says:

    Hi

    I love you man!

    This blog have helped me so many times.

    I must say that the main blog did not help me this this time, but your latest comment was right on spot.

    I started on Flex from Flash just a week ago, so this kind of errors is new to me.

    Thank you.

    Like

  4. Asha says:

    Hi

    In my application i want to perform some operation on click a column in dataGrid so i am using item click event of datagrid.

    Signature of the Function to be executed is :

    private function showOrderDetail(event:ListEvent):void
    {
    // some operation
    }

    code in dataGrid :

    itemClick = “showOrderDetail(event)”

    I am getting the runtime error saying that

    TypeError: Error #1034: Type Coercion failed: cannot convert flash.events::MouseEvent@19d9cc1 to mx.events.ListEvent.

    Help me out.

    Regards,
    Asha

    Like

  5. Judah says:

    @Asha – the click event is getting passed a mouse event. so the event handler is not getting the correct event type passed to it:

    [as]
    private function showOrderDetail(event:ListEvent):void {
    //should be:
    private function showOrderDetail(event:MouseEvent):void {
    [/as]

    Like

  6. Asha says:

    Hi

    In my application i want to perform some operation on click a column in dataGrid so i am using item click event of datagrid.

    Signature of the Function to be executed is :

    private function showOrderDetail(event:ListEvent):void
    {
    // some operation
    }

    code in dataGrid :

    itemClick = “showOrderDetail(event)”

    I am getting the runtime error saying that

    TypeError: Error #1034: Type Coercion failed: cannot convert flash.events::MouseEvent@19d9cc1 to mx.events.ListEvent.

    Help me out.

    Regards,
    Asha

    Like

  7. Asha says:

    Hi

    If i make that change it will result in a comiler error

    1067 : Implicit coericon of a value of type mx.events:ListEvent to an unrelated evnt type flash.events:MouseEvent

    Regards,
    Asha

    Like

  8. Pradip Jadhav says:

    Hi Asha,

    If you are using module loader please insert following code in your main application file,

    import mx.managers.*;
    private var _dragManager:DragManager;
    private var _historyManager:HistoryManager;
    private var _popupManager:PopUpManager;

    Regards,
    Pradip jadhav

    Like

  9. Keisha says:

    Hi,

    I am using Flex and a PHP file that is parsing JSON data. When I try to debug the flex file (the data is not being displayed in a data table) I get this error: Error #1034: Type Coercion failed: cannot convert “[{“id”:”2″,”name”:”Strapless Wedding Dress Tips”,”author”:”Ramona Waters”,”rating”:”0″},{“id”:”3″,”name”:”Coordinating Your Brides Maids”,”author”:”Ericka Brown”,”rating”:”0″}]” to mx.controls.Alert.

    I am a flex newbie and need help on how to resolve this please.

    Like

  10. Judah says:

    @Keisha – It could be a couple things. I tend to think that the issue is malformed JSON data. The quotes may not be correct. It could also be the way you are applying it to the Data Grid. Couple things I would do:

    1. validate the json data. what JSON interpreter are you using? i would use the one from as3corelib. set the result type to plain text and then trace that value. take that value and paste it into a JSON validator. http://www.google.com/search?q=json+validator
    2. post your code to flex coders list to have other devs take a look at it (you can’t do that here bc wordpress mangles it up).

    Like

  11. Keisha says:

    The data is valid json according to the JSON Validator. I am also using the as3corelib with the result format set to text. I did sign up to flex coders, so I will see what they suggest. It may be something simple like the way it is going into the grid like you said. Thanks for your suggestions!

    Like

  12. kevin says:

    Hey, I just wanted to say that I had an issue that was solved by replacing this with rawChildren. Thank you very much, you helped me out immensely 🙂

    Like

  13. Felix says:

    I have a MXML file as follows

    [Code]

    [/code]

    it works well. Howeve, when I replace

    [Code]

    [/code]
    with

    [Code]

    [/code]

    i.e., using resultHandler(event) to handle the received data. I got the following error messages. I could not figure out why? Please help.

    [Code]
    TypeError: Error #1034: Type Coercion failed: cannot convert mx.collections::ArrayCollection@36f5741 into Array?
    at TEST2/resultHandler()[C:Documents and SettingsAdministratorMy DocumentsFlex Builder 3TEST2srcTEST2.mxml:17]
    at TEST2/__http_result()[C:Documents and SettingsAdministratorMy DocumentsFlex Builder 3TEST2srcTEST2.mxml:23]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at mx.rpc.http.mxml::HTTPService/http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent()[C:autobuild3.2.0frameworksprojectsrpcsrcmxrpchttpmxmlHTTPService.as:290]
    at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::resultHandler()[C:autobuild3.2.0frameworksprojectsrpcsrcmxrpcAbstractInvoker.as:193]
    at mx.rpc::Responder/result()[C:autobuild3.2.0frameworksprojectsrpcsrcmxrpcResponder.as:43]
    at mx.rpc::AsyncRequest/acknowledge()[C:autobuild3.2.0frameworksprojectsrpcsrcmxrpcAsyncRequest.as:74]
    at DirectHTTPMessageResponder/completeHandler()[C:autobuild3.2.0frameworksprojectsrpcsrcmxmessagingchannelsDirectHTTPChannel.as:403]
    at flash.events::EventDispatcher/dispatchEventFunction()
    [/code]

    Like

  14. Felix says:

    I have a MXML file as follows

    it works well. Howeve, when I replace

    with

    i.e., using resultHandler(event) to handle the received data. I got the following error messages. I could not figure out why? Please help.

    TypeError: Error #1034: Type Coercion failed: cannot convert mx.collections::ArrayCollection@36f5741 into Array?
    at TEST2/resultHandler()[C:Documents and SettingsAdministratorMy DocumentsFlex Builder 3TEST2srcTEST2.mxml:17]
    at TEST2/__http_result()[C:Documents and SettingsAdministratorMy DocumentsFlex Builder 3TEST2srcTEST2.mxml:23]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at mx.rpc.http.mxml::HTTPService/http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent()[C:autobuild3.2.0frameworksprojectsrpcsrcmxrpchttpmxmlHTTPService.as:290]
    at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::resultHandler()[C:autobuild3.2.0frameworksprojectsrpcsrcmxrpcAbstractInvoker.as:193]
    at mx.rpc::Responder/result()[C:autobuild3.2.0frameworksprojectsrpcsrcmxrpcResponder.as:43]
    at mx.rpc::AsyncRequest/acknowledge()[C:autobuild3.2.0frameworksprojectsrpcsrcmxrpcAsyncRequest.as:74]
    at DirectHTTPMessageResponder/completeHandler()[C:autobuild3.2.0frameworksprojectsrpcsrcmxmessagingchannelsDirectHTTPChannel.as:403]
    at flash.events::EventDispatcher/dispatchEventFunction()

    Like

  15. cyianite says:

    ei ,
    Have you encountered this kind of error in Flex
    “Type Coercion failed: cannot convert mx.charts.events::ChartIemEvent to ListEvent”

    Thanks
    Cyianite

    Like

  16. Samruddhi says:

    hi,

    private function onResultHttpService(event:ResultEvent):void
    {
    var viewXMLList:XMLList = event.result.view;
    var len:Number = viewXMLList.length();
    var containerWindowManagerHash:Object = new Object();

    for(var i:Number = 0; i < len; i++) // Loop through the view nodes
    {
    // Create a canvas for each view node.
    var canvas:Group = new Group();

    var label:Label = viewXMLList[i].@label;
    canvas.addElement(label);
    canvas.percentWidth=100;
    canvas.percentHeight=100;
    viewStack.addChild(canvas);

    // Create a Manager for each view.
    var manager:PodLayoutManager = new PodLayoutManager();
    manager.container = canvas;
    manager.id = viewXMLList[i].@id;
    manager.addEventListener(LayoutChangeEvent.UPDATE, StateManager.setPodLayout);
    podDataDictionary[manager] = viewXMLList[i].pod;
    podLayoutManagers.push(manager);
    }

    I have been trying to solve this problem so hard but i m not able to solve the error. Please help me….

    I get the following error

    TypeError: Error #1034: Type Coercion failed: cannot convert XML@e49aa41 element to XMLList.
    at dashboard/onResultHttpService()[D:SBZalasamruddhiflexProjectsdashboardsrcdashboard.mxml:58]
    at dashboard/__onHttpService_result()[D:SBZalasamruddhiflexProjectsdashboardsrcdashboard.mxml:194]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at HTTPOperation/http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent()[E:devgumbo_beta2frameworksprojectsrpcsrcmxrpchttpHTTPService.as:979]
    at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::resultHandler()[E:devgumbo_beta2frameworksprojectsrpcsrcmxrpcAbstractInvoker.as:318]
    at mx.rpc::Responder/result()[E:devgumbo_beta2frameworksprojectsrpcsrcmxrpcResponder.as:56]
    at mx.rpc::AsyncRequest/acknowledge()[E:devgumbo_beta2frameworksprojectsrpcsrcmxrpcAsyncRequest.as:84]
    at DirectHTTPMessageResponder/completeHandler()[E:devgumbo_beta2frameworksprojectsrpcsrcmxmessagingchannelsDirectHTTPChannel.as:446]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at flash.net::URLLoader/onComplete()

    Like

  17. Samruddhi says:

    Sorry,

    please ignore the above error. The following is the error

    TypeError: Error #1034: Type Coercion failed: cannot convert XMLList@e9c4041 to spark.components.Label.
    at dashboard/onResultHttpService()[D:SBZalasamruddhiflexProjectsdashboardsrcdashboard.mxml:62]
    at dashboard/__onHttpService_result()[D:SBZalasamruddhiflexProjectsdashboardsrcdashboard.mxml:190]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at HTTPOperation/http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent()[E:devgumbo_beta2frameworksprojectsrpcsrcmxrpchttpHTTPService.as:979]
    at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::resultHandler()[E:devgumbo_beta2frameworksprojectsrpcsrcmxrpcAbstractInvoker.as:318]
    at mx.rpc::Responder/result()[E:devgumbo_beta2frameworksprojectsrpcsrcmxrpcResponder.as:56]
    at mx.rpc::AsyncRequest/acknowledge()[E:devgumbo_beta2frameworksprojectsrpcsrcmxrpcAsyncRequest.as:84]
    at DirectHTTPMessageResponder/completeHandler()[E:devgumbo_beta2frameworksprojectsrpcsrcmxmessagingchannelsDirectHTTPChannel.as:446]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at flash.net::URLLoader/onComplete()

    Like

    1. Judah says:

      @Sam

      This line is creating the error:
      var label:Label = viewXMLList[i].@label;

      It should be something like this:
      var label:Label = new Label();
      label.text = viewXMLList[i].@label;

      Like

  18. Samruddhi says:

    Judah,

    Thanks for taking out time and helping me…

    i did it like u said but now i m getting a new error… 😦

    TypeError: Error #1034: Type Coercion failed: cannot convert spark.components::Group@e53e851 to mx.core.INavigatorContent.
    at mx.controls::NavBar/childAddHandler()[E:devgumbo_beta2frameworksprojectsframeworksrcmxcontrolsNavBar.as:1183]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at mx.core::UIComponent/dispatchEvent()[E:devgumbo_beta2frameworksprojectsframeworksrcmxcoreUIComponent.as:11749]
    at mx.core::Container/http://www.adobe.com/2006/flex/mx/internal::childAdded()[E:devgumbo_beta2frameworksprojectsframeworksrcmxcoreContainer.as:3911]
    at mx.core::Container/addChildAt()[E:devgumbo_beta2frameworksprojectsframeworksrcmxcoreContainer.as:2578]
    at mx.containers::ViewStack/addChildAt()[E:devgumbo_beta2frameworksprojectsframeworksrcmxcontainersViewStack.as:1423]
    at mx.core::Container/addChild()[E:devgumbo_beta2frameworksprojectsframeworksrcmxcoreContainer.as:2496]
    at dashboard/onResultHttpService()[D:SBZalasamruddhiflexProjectsdashboardsrcdashboard.mxml:66]
    at dashboard/__onHttpService_result()[D:SBZalasamruddhiflexProjectsdashboardsrcdashboard.mxml:190]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at HTTPOperation/http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent()[E:devgumbo_beta2frameworksprojectsrpcsrcmxrpchttpHTTPService.as:979]
    at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::resultHandler()[E:devgumbo_beta2frameworksprojectsrpcsrcmxrpcAbstractInvoker.as:318]
    at mx.rpc::Responder/result()[E:devgumbo_beta2frameworksprojectsrpcsrcmxrpcResponder.as:56]
    at mx.rpc::AsyncRequest/acknowledge()[E:devgumbo_beta2frameworksprojectsrpcsrcmxrpcAsyncRequest.as:84]
    at DirectHTTPMessageResponder/completeHandler()[E:devgumbo_beta2frameworksprojectsrpcsrcmxmessagingchannelsDirectHTTPChannel.as:446]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at flash.net::URLLoader/onComplete()

    Like

  19. rahul says:

    Hi Judah,
    I am working on line charts in flex using pure as3
    and trying to apply itemrenderer to the linseries

    lineseriesInstance.setStyle(“stroke”,new ClassFactory(StrokeClass));

    where StrokeClass is my custom class inherited from
    mx.graphics.Stroke

    it generates follwing error please help me.

    TypeError: Error #1034: Type Coercion failed: cannot convert mx.core::ClassFactory@2caada1 to mx.graphics.IStroke.
    at mx.charts.series::LineSeries/describeData()[C:Workflexdmv_automationprojectsdatavisualisationsrcmxchartsseriesLineSeries.as:1202]
    at mx.charts.chartClasses::DataTransform/describeData()[C:Workflexdmv_automationprojectsdatavisualisationsrcmxchartschartClassesDataTransform.as:230]
    at mx.charts.chartClasses::AxisBase/describeData()[C:Workflexdmv_automationprojectsdatavisualisationsrcmxchartschartClassesAxisBase.as:177]
    at mx.charts.chartClasses::NumericAxis/get dataDescriptions()[C:Workflexdmv_automationprojectsdatavisualisationsrcmxchartschartClassesNumericAxis.as:1033]
    at mx.charts.chartClasses::NumericAxis/autoGenerate()[C:Workflexdmv_automationprojectsdatavisualisationsrcmxchartschartClassesNumericAxis.as:1050]
    at mx.charts.chartClasses::NumericAxis/updateCache()[C:Workflexdmv_automationprojectsdatavisualisationsrcmxchartschartClassesNumericAxis.as:761]
    at mx.charts.chartClasses::NumericAxis/update()[C:Workflexdmv_automationprojectsdatavisualisationsrcmxchartschartClassesNumericAxis.as:884]
    at mx.charts.chartClasses::NumericAxis/getLabelEstimate()[C:Workflexdmv_automationprojectsdatavisualisationsrcmxchartschartClassesNumericAxis.as:645]
    at mx.charts::AxisRenderer/measureLabels()[C:Workflexdmv_automationprojectsdatavisualisationsrcmxchartsAxisRenderer.as:1740]
    at mx.charts::AxisRenderer/calcRotationAndSpacing()[C:Workflexdmv_automationprojectsdatavisualisationsrcmxchartsAxisRenderer.as:1459]
    at mx.charts::AxisRenderer/adjustGutters()[C:Workflexdmv_automationprojectsdatavisualisationsrcmxchartsAxisRenderer.as:1326]
    at mx.charts.chartClasses::CartesianChart/updateAxisLayout()[C:Workflexdmv_automationprojectsdatavisualisationsrcmxchartschartClassesCartesianChart.as:1873]
    at mx.charts.chartClasses::CartesianChart/updateDisplayList()[C:Workflexdmv_automationprojectsdatavisualisationsrcmxchartschartClassesCartesianChart.as:1355]
    at mx.core::UIComponent/validateDisplayList()[E:dev3.0.xframeworksprojectsframeworksrcmxcoreUIComponent.as:6214]
    at mx.managers::LayoutManager/validateDisplayList()[E:dev3.0.xframeworksprojectsframeworksrcmxmanagersLayoutManager.as:602]
    at mx.managers::LayoutManager/doPhasedInstantiation()[E:dev3.0.xframeworksprojectsframeworksrcmxmanagersLayoutManager.as:675]
    at Function/http://adobe.com/AS3/2006/builtin::apply()
    at mx.core::UIComponent/callLaterDispatcher2()[E:dev3.0.xframeworksprojectsframeworksrcmxcoreUIComponent.as:8460]
    at mx.core::UIComponent/callLaterDispatcher()[E:dev3.0.xframeworksprojectsframeworksrcmxcoreUIComponent.as:8403]

    Like

    1. Judah says:

      @rahul – i think it could be you need to cast it as a stroke.

      lineseriesInstance.setStyle(“stroke”, Stroke(new ClassFactory(StrokeClass)));

      also try it without the class factory and go from there…

      lineseriesInstance.setStyle(“lineStroke”, new Stroke(0xFF0000, 4));

      ps it may need to be “lineStroke”

      Like

  20. Raghuvir Konanki says:

    Hi,

    I’m having somewhat the same trouble. My database table consists of “double” type columns. While my Action Script class which is mapped to my hibernate class has its setter and getter methods also returning double values which are brought from the database as it is.
    Since double data type doesn’t exist in flex I’ve used the “Number” type in my action script which maps to the hibernate class.
    At run time it throws this error in flex when I’m trying to display this data in my mxml.

    TypeError: Error #1034: Type Coercion failed: cannot convert Object@5c82401 to mx.messaging.messages.IMessage.

    #Epic fail. Flex.

    Need some more info on this let me know. But for now I really need the solution for this.

    Thanks,
    Raghu

    Like

  21. jess says:

    my error

    Type Error: Error #1034: Type Coercion failed cannot convert flash.display:: MovieClip@2a9edccl to fl.motion. Animator Factory.

    Like

  22. i have xml which was retrieved from the database

    !
    @
    #
    $
    %
    ^
    &
    *
    (
    )
    {
    |

    ?

    >

    <

    if i tried to load these into dropdownlist by using this

    it shows an error such That
    “#Error 1085 The element type “</character" must be terminated by the matching end-tag"

    Like

  23. Jakob says:

    Dear Judah,

    I am new to AS3. I want to display a message for 3 secs. when the user rolls over a button, only once per session. The variables: nxt is the button, popup is the TIMER variable, see/notsee are boolean flags set when the message is displayed/hidden respectively and nxt_msg is the message sprite. The relevant code is:

    nxt.addEventListener(MouseEvent.ROLL_OVER,display_pop);
    popup.addEventListener(TimerEvent.TIMER, display_pop);
    
    function display_pop (event:MouseEvent):void {
    				if(see==false) {
    					see = true;
    					nxt_msg.x = 437;
    					nxt_msg.y = 354;
    					popup = new Timer(3000,1);
    					popup.start();
    					nxt_msg.visible = true;
    				}
    				else {if(notsee==false) {
    						notsee = true;
    						nxt_msg.x = 165;
    						nxt_msg.y = 405;
    						popup = new Timer(3000,1);
    						popup.start();
    						nxt_msg.visible = false;}		
    				     }
    	 }	

    There are no syntax errors, but the baby is comatose! Actually, the message appears and stays as long as the mouse is over the button, on rollout nothing happens, and then on rollover the message disappears! Will you please tell me what’s wrong here?

    Sincerely,
    Jakob
    Montreal

    Like

  24. Jakob says:

    Woops! I just forgot this little titbit: at the beginning of the program, I initialized popup like so – var popup:Timer = new Timer(3000,1);

    Like

  25. judah says:

    Ran into this again, Type Coercion failed: cannot convert XMLList@10929fd81 to XML.

    In this case when you access an XML node like so:

     something.name = _data.asset

    and the XML is:

    <root>
        <asset name="product1" />
    </root>
    

    the result is an XMLList of one item. To fix you have to get the first and only item like so:

    var object:XML = _data.asset[0];

    or cast it to the type XML

    var object:XML = XML(_data.asset);

    Like

    1. judah says:

      Oops. It cannot be cast to XML which is the cause of this error so this does not work:

      var object:XML = XML(_data.asset);

      While this one does:

      var object:XML = _data.asset[0];

      I think this is a quirky behavior on using XML in AS3. Basically if you access xml.node then it returns a XMList but if you access xml.node.@item it treats node as XML. 😛

      Like

Leave a comment