A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: xml/as2 list of text and images

  1. #1
    Senior Member Nutbolt's Avatar
    Join Date
    Mar 2007
    Location
    London
    Posts
    138

    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
    it's just not logical!!

  2. #2
    Senior Member Nutbolt's Avatar
    Join Date
    Mar 2007
    Location
    London
    Posts
    138
    Just t know if it's possible would be great.
    it's just not logical!!

  3. #3
    Senior Member
    Join Date
    Jul 2006
    Location
    San Jose, CA
    Posts
    334
    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!

  4. #4
    Farmer divillysausages's Avatar
    Join Date
    Mar 2004
    Location
    ireland
    Posts
    251
    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
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center