02.02.2013 Views

Flash MX 2004 Games : Art to ActionScript

Flash MX 2004 Games : Art to ActionScript

Flash MX 2004 Games : Art to ActionScript

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

s.Close();<br />

conn.Close();<br />

Response.Write(str);<br />

%><br />

Listing 14.6<br />

Creating the front end<br />

Figure 14.9 Creating an input application<br />

Chapter 14: Quizzes<br />

Now we have the ASP scripts we can use them with a front end for inputting the data. In<br />

this example we will make use of the UI components that come with <strong>Flash</strong> <strong>MX</strong> <strong>2004</strong>. The<br />

input screen has a combo box in the <strong>to</strong>p left corner <strong>to</strong> select the category; but<strong>to</strong>ns <strong>to</strong> move<br />

through the questions within a category are placed <strong>to</strong> the right of the category combo. There<br />

are four but<strong>to</strong>ns on the right, ‘Delete category’, ‘Delete question’, ‘Reset’ and ‘Enter question’.<br />

There are five radio but<strong>to</strong>ns <strong>to</strong> select the level of difficulty and finally five text boxes <strong>to</strong> enter<br />

and display the question, the correct answer and three alternative answers. To initialize the data<br />

the script ‘scriptsJS/getCategories.asp’ is called using the ‘LoadVariables’ method. This occurs on<br />

219

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!