views:

67

answers:

1

i'm working on a flash widget. But it meet some error problem and the error is described bellow-> 1. TypeError: Error #1085: The element type "img" must be terminated by the matching end-tag "".

OK, jonathanasdf

here is my code

import fl.transitions.easing.*;
import fl.transitions.*;

var xml:XML;
var xmlList:XMLList;
var xmlLoader:URLLoader = new URLLoader ();

var imageLoader:Loader;
var bigImage:Loader = new Loader();
var imageText:TextField = new TextField();

xmlLoader.load(new URLRequest("http://localhost/shopmajik/flash/shopdata"));

xmlLoader.addEventListener(Event.COMPLETE, xmlLoaded);

function xmlLoaded(e:Event):void {
    xml=new XML (e.target.data);
    xmlList = xml.children();
    trace(xmlList);

    imageLoader = new Loader();
    imageLoader.load(new URLRequest(xmlList.elements("shopbanner").attribute("src")));
    imageLoader.x = -220;
    imageLoader.y = -187;
    addChild(imageLoader);
}

i've collect the data from a codeigniter controller function. I've stacked in this position if anyone please help me.

+2  A: 

That error is due to malformed XML, your loader code is likely fine. Take a closer look at the part of your code that generates the XML and make sure it places that missing </img> in the right spot.

grapefrukt
still no solution. This is my xml data in php string....$sreturn = "<?xml version='1.0' encoding='UTF-8' ?><clients>";$sreturn .="<client><shopbanner src='http://localhost/shopmajik/uploads/".$client->shop_banner."'>".$client->shop_banner."</shopbanner></client>"; $sreturn .= "</clients>";
please repost that code in your original post and with some proper formatting, i can't tell what's what when it's mangled like that.
grapefrukt