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.

1
  • we're going to need more info than that. Commented May 7, 2010 at 6:45

1 Answer 1

2

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.

Sign up to request clarification or add additional context in comments.

2 Comments

still no solution. This is my xml data in php string.... $sreturn = "<?xml version='1.0' encoding='UTF-8' ?><clients>"; $sreturn .="<client><shopbanner src='localhost/shopmajik/uploads/…>"; $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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.