-
Senior Member
xml/as2 list of text and images
Hi all,
I've been searching all over but can't find out how to do this. Maybe some one knows a tutorial they could point me to?
I'd like to have a scrollable list of text, an image to the left of each item and I'd like to do this with xml.
I've been searching round but I can only find out how to import one or the other not both in one scrolling element.
Can anyone help?
Thanks in advance
-
Senior Member
Just t know if it's possible would be great.
-
If you're talking the built in components, I'm inclined to say no. I've never come across it before, at least.
You can always create your own
I (Love | Hate) Flash.
----
Save a version back so others may help you!
-
Farmer
in a nutshell:
XML:
create an xml with your image, text pairing, either like:
Code:
<myItem image="myImage.jpg" text="some text here" />
...
or:
Code:
<myItem>
<image>MyImage.jpg</image>
<text>Some text here</text>
</myItem>
AS3:
* load your xml
* parse it and split out your info - maybe hold in in objects or your own class
* create a holder movieclip
* for each pairing, create a movieclip inside the holder movieclip
* create a textfield instead this movieclip, set it to the text of the object
* create a loader and load your image - when it's loaded, add it as a child to this movieclip
* make it scroll by moving the y value (or x for horizontal) of your holder movieclip and hiding the excess with a mask or something
* if you want to create scrollbars etc - the math's not hard
Tags for this Thread
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
|