by asc
1 replies
Hi i am learning as3 and really could do with some guidance.

I basically have a text box and want a user to add a number, then with that number use it to access an xml file and show some information on a screen. the text box is for a pregnant woman to say how many weeks she is pregnant (12 for example) then be able to read an xml file with a block of text about being 12 weeks pregnant, and display it.

Ive added a textbox but not worked out how to use the number anyone inputs. Ive sort of got an idea of how to get the info from xml, i have managed to do that and trace it, but not sure how to get it onto the main stage to show the user.

any help or advice here would be greatly appreciated!

Alan
#actionscript
  • Profile picture of the author Earnie Boyd
    You can use the XML like a DB. Use the number of weeks as the id to find the text to display.

    <pregnant weeks>
    <id>1</id>
    <title>One week pregnant</title>
    <body>What you should be doing at 1 week pregnant...</body>
    <id>2</id>
    <title>Two weeks pregnant</title>
    <body>What you should be doing at 2 weeks pregnant...</body>

    ...

    </pregnant weeks>
    Signature
    {{ DiscussionBoard.errors[6008332].message }}

Trending Topics