• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 10. XML Server > XML-Driven Flash Client

XML-Driven Flash Client

Let's return to our quiz game from Chapter 8 and upgrade it with the lessons from Chapter 9. Then it will be ready to interface with the PHP code we just wrote. We start with the original contents of Frame 1—a hardcoded database—and replace all the literal definitions of Questions and Answers with downloaded XML data.

ActionScript

function Question( questiontext, answerarray ){
      this.q= questiontext;
      this.a= answerarray;
}
function Answer( text, score, comment ){
    this.text=text;
      this.score=score;
      this.comment=comment;
}
whichquestion=1;
quiz =  new Array();


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint