# Display random text from XML file

**URL:** <https://forum.kirupa.com/t/display-random-text-from-xml-file/329368>\
**Category:** flash\
**Created:** [August 18, 2012, 2:27pm UTC](https://forum.kirupa.com/t/display-random-text-from-xml-file/329368 "2012-08-18T14:27:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![alfandango](https://avatars.discourse-cdn.com/v4/letter/a/da6949/32.png) [@alfandango](https://forum.kirupa.com/u/alfandango)\
**Post date:** [August 18, 2012, 2:27pm UTC](https://forum.kirupa.com/t/display-random-text-from-xml-file/329368/1 "2012-08-18T14:27:10Z")

</div>

My skills with AS3 are poor but I’m trying to do the following in a flash app:

click a button and display one random element from an XML file. EG, press the “Bob quote” button and see one of Bob’s random quotations… Press the “Bill quote” button and a random Bob quote will display.

Seems fairly straightforward but I’m struggling, so if anyone could point me in the right direction It’d be greatly appreciated 🙂
