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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Flash</strong> <strong>MX</strong> <strong>2004</strong> <strong>Games</strong><br />

variable ‘question’. If instead we are adding a new record then we use the SQL command ‘INSERT<br />

INTO’ followed by the table name and a list of column names separated by commas inside round<br />

brackets. The value of the column names follows the word ‘VALUES’ and is a list of values<br />

separated by commas inside round brackets in the same way as the column names. To actually<br />

send this information <strong>to</strong> the database we create the string then pass it <strong>to</strong> the ‘Execute’ method of<br />

the open connection. Finally we close the open connection and pass some data <strong>to</strong> <strong>Flash</strong>, either<br />

‘questionAdded=true’ or ‘questionUpdated=true’ using the ‘Response.Write’ method. Inside<br />

<strong>Flash</strong> the values of these variables will be set directly as a result of the write. The code for this<br />

script is in the file ‘Examples\Chapter14\scriptsJS\addQuestion.asp’.<br />

1 <br />

2<br />

3 <br />

19 <br />

20

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

Saved successfully!

Ooh no, something went wrong!