Brian Lin
asked on
XML question
Hi,
I am loading XML into the flash textfield....I want to add some images in the XML....I try to put <img src='museumPic.jpg'/> in the body text of XML file. I also put image museumPic.jpg in the same location where the swf file is. The image does not show up. Scripting is at below, how can I fix it. thanks
<?xml version="1.0" encoding="iso-8859-1"?>
<body>Isaac Newton (1642-1727)
<img src='museumPic.jpg'/>
Newton was an English physicisist and mathematician who discovered the binomial theorem, invented calculus, and produced theories of mechanics, optics, and the law of universal gravitation. Many of his ideas for ................ was knighted Sir Isaac Newton. </body>
I am loading XML into the flash textfield....I want to add some images in the XML....I try to put <img src='museumPic.jpg'/> in the body text of XML file. I also put image museumPic.jpg in the same location where the swf file is. The image does not show up. Scripting is at below, how can I fix it. thanks
<?xml version="1.0" encoding="iso-8859-1"?>
<body>Isaac Newton (1642-1727)
<img src='museumPic.jpg'/>
Newton was an English physicisist and mathematician who discovered the binomial theorem, invented calculus, and produced theories of mechanics, optics, and the law of universal gravitation. Many of his ideas for ................ was knighted Sir Isaac Newton. </body>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
can I also ask, how to set up the size for the image <img src='museumPic.jpg'/> ? like this <img width="12" src='museumPic.jpg'/> ?
yep, exactly, but use both width and height..
ASKER
ok...if I want to put text below image. I try to use <br>....not working....are there anything else ?
ASKER
// Set up XML text
my_xml = new XML();
my_xml.onLoad = function( success ) {
if ( success ) {
scroll_txt.htmlText = this;
}
};
my_xml.load( "page_1.xml" );