Flasher Archive

[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]


Subject: RE: [flasher] High Score
From: Paul Willoughby
Date: Mon, 12 Feb 2001 12:12:52 -0000

If you're on a server that supports ASP this might help. It's a VBscript
which will write Flash variables to a text file in name/value pairs that you
can then reload into Flash. It's great for a few variables, but if you want
to record a lot of info you probably want a proper database.
It's based on tutorials I've seen at www.4guysfromrolla.com on the File
System Object and Dan Waters articles on integrating Flash and ASP at
www.asp101.com, so I'd visit them if you want to find out more about how it
works. Remember to include '<%' at the beginning of the script and '%>' at
the end (without quotes):


'define the iomode
Const fsoForWriting = 2

'create a File System Object
Dim objFSO
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")

'Opens the text file or creates one if it doesn't already exist
Dim objTextStream
Set objTextStream = objFSO.OpenTextFile((Server.MapPath("testVars.txt")),
fsoForWriting, True)

'Write the Flash variables to the text file
'note the extra &s for creating the name value pairs in the text file
objTextStream.WriteLine "pos1=" & Request.Form("pos1") & "&" & "pos2=" &
Request.Form("pos2") & "&" & "pos3=" & Request.Form("pos3") & "&" & "pos4="
& Request.Form("pos4") & "&" & "eof=1"

'Close the file and clean up
objTextStream.Close
Set objTextStream = Nothing
Set objFSO = Nothing


waitaminnit! did you say 'sell'? sheesh...too late ;~)

hth

paul

> -----Original Message-----
> From: Paul Hagwood [vampfan [dot] geoatyahoo [dot] com (mailto:vampfan [dot] geoatyahoo [dot] com)]
> Sent: 09 February 2001 15:52
> To: flasher from chinwag
> Subject: [flasher] High Score
>
>
> Ok, another question from a not so bright guy...
>
> I want to keep track of a high score but I don't have
> generator installed and I have limited control over
> the server (i.e. the client has to put on the server
> what I give them).
>
> Any Ideas of a tutorial for this kind of thing or is
> there someone out there who can sell me the script to
> make this work? Thanks.

>



[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]