-
importing image from xml - with a twist...
OK - so here is my dilema -
I'm creating an MP3 radio/player
I am trying to import an image file from XML.
The XML already contins variables (text) that are getting passed into thie flash movie.
The end result is this -
Artist:
Title:
Label:
THEN next to all of this - I want to load a picture of the musician.
The songs are grabbed at random - so all the invormation is included in a SONG node.
the code looks like this:
PHP Code:
<song>
<artist>Foo Fighters</artist>
<title>Watershed</title>
<label>Capital Records</label>
</song>
i have tried just about everything.. from adding a new node
PHP Code:
<imgSRC>foo.jpg</imgSRC>
and all sorts of onLoad commands.
I don't know if i'm messing up the XML or the AScript (or both)
does anyone have a solution for this problem?
greatly appreciated
RR
-
Senior Member
There isn't any standard for adding an image, you will have to write the Actionscript code to handle loading the jpg file (as a new movie), and then deciding where to display it.
Thanks
Luke
-
There's a tutorial on the Macromedia site on this:
http://www.macromedia.com/support/fl...slideshow_xml/
Basically, you can add the image path as an xml attribute and then load the jpeg file into a target movie clip. It's also easier to handle values like artist, title, name etc as xml attributes rather than have to go thru all the nodes...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|