-2

I would like to add a component in my flash website which will, 1.load xml data. 2.parse it using stylesheet 3. Have a scrollbar incase xml data is a lot.

any suggestions will be helpful

Sir Lojik
  • 1,409
  • 7
  • 24
  • 45

2 Answers2

1

Try the following:

  1. Load your XML file with URLLoader.
  2. Use the listener Event.COMPLETE and cast the data to XML.
  3. Parse through the children of the XML through a loop or recursively and build data objects.
  4. Render the data objects into a TextField with span tags and apply a stylesheet according to the formatting you require.

Of course there are other ways but I'm making guesses at what you're looking to use this application for.

Henry Tseng
  • 3,263
  • 1
  • 19
  • 20
0

following on Henry's answer...

create a sprite container to hold your textfields. set a maximum display height , when the container's height exceeds the max display height , add a scrollbar.

PatrickS
  • 9,539
  • 2
  • 27
  • 31