I’m trying to load some text data from an XML Document like this
package utilities{
import flash.utils.ByteArray;
import net.flashpunk.FP;
import net.flashpunk.Entity;
public class loadTextData
{
public var type:String;
public var index:int;
public var textArray:Array = new Array ;
[Embed(source="dialogue/prompt.xml")]public const PROMPT_DIALOGUE:Class;
public function loadTextData() {
var promptDataXML:XML = FP.getXML(PROMPT_DIALOGUE);
}}
}
But i’m constantly getting an output failure with:
"[Fault] exception, information=TypeError: Error #1034: Type Coercion failed: cannot convert utilities::loadTextData_PROMT_DIALOGUE@552fff1 to flash.utils.ByteArray."
Every tutorial I’ve looked at have Embedded the XML Document as a class like I have above and have then used the FP.getXML() function with no issue, I’m stumped as to where I’m going wrong…