Flasher Archive

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


Subject: RE: FLASH: Fill Flash "Grid" (variables) from ASP?
From: Macerlean, Brian
Date: Thu, 11 Nov 1999 16:16:42 GMT

Whoops, there's a bug in there:
'Make sure that we remove the spaces
msSerializeRecords = msSearchAndReplace(sOutString, " ",
"&")

Should be
'Make sure that we remove the spaces
msSerializeRecords = msSearchAndReplace(sOutString, " ",
"+")

B:-)
-----Original Message-----
From: Macerlean, Brian
[Brian [dot] Macerleanatprimark [dot] com (mailto:Brian [dot] Macerleanatprimark [dot] com)]
Sent: Donnerstag, 11. November 1999 16:01
To: 'flasheratchinwag [dot] com'
Subject: RE: FLASH: Fill Flash "Grid" (variables)
from ASP?

I've done a little bit of code for you in VB, it shouldn't
be much hassle to
convert it to VBA, I haven't bother sticking any error
trapping in there
yet. MsSerializeRecords returns a string which you can then
pass back to
your Flash movie.

Private Function msSearchAndReplace(byval vsSource As
String, rsFindStr As
String, rsReplaceStr As String) As String

Dim pnPos As Integer

If Len(Trim$(vsSource)) > 0 Then
pnPos = 1
Do
pnPos = InStr(pnPos, vsSource, rsFindStr)
If pnPos > 0 Then
'Match has been found
vsSource = Left(vsSource, pnPos - 1) &
rsReplaceStr &
Mid$(vsSource, pnPos + Len(rsFindStr), Len(vsSource) -
(pnPos +
Len(rsFindStr)) + 1)
End If
Loop Until pnPos = 0
End If
gsSearchAndReplace = vsSource

End Function

Private Function msSerializeRecords() as string

'No Error trapping in VBA!!

Dim padoRecSet as adodb.Recordset
Dim psOutString as string

'Open the recordset here
'--->

AdoRecSet.MoveLast

psOutString = ""
msSerializeRecords = ""
padoRecSet.MoveFirst
If not adoRecSet.EOF
plRecCount = AdoRecSet.Count
For plIndex = 1 to AdoRecSet.Count
'You might want to do some trapping
here to make
sure that Description has got valid data in it
psOutString = psOutString &
"Description=" & plIndex
& adoRecSet.Fields("Description") & "&"
padoRecSet.MoveNext

Next plIndex
'Make sure that we remove the spaces
msSerializeRecords =
msSearchAndReplace(sOutString, " ",
"&")

End if


Exit Function

Bryan

-----Original Message-----
From: DeJarnett, Gary
[a3gddattechmail [dot] admin [dot] ttu [dot] edu (mailto:a3gddattechmail [dot] admin [dot] ttu [dot] edu)]
Sent: Donnerstag, 11. November 1999 14:14
To: 'flasheratchinwag [dot] com'
Subject: FLASH: Fill Flash "Grid"
(variables) from
ASP?

I'm able to pass data to and from my SQL
Server database
into my Flash
movie. I have now defined a "grid" on my
screen to hold
timesheet data and
want to fill in this grid from my database.
The variables
in my grid are
named by row number (like Description1,
Description2,
etc...) and I would
like set up a loop on my active server page
to loop through
the recordset
and fill in the data appropriately. My
problem is in
figuring out how to
code my loop so that variables and their
values get passed
back to Flash in
the proper format (&description1="first
description"...) by
incrementing the
number at the "end" of the variable name.
Is anyone else doing anything like this at
all? Could you
give me an
example using a piece of your VBScript?
This might appear
to be an active
server page question, but it has a different
twist to it due
to the way that
variables must be passed back to Flash.
Thanks,

Gary
DeJarnett
(dejarnettatttu [dot] edu
<dejarnettatttu [dot] edu (mailto:dejarnettatttu [dot] edu)> )

ps I'm also trying to think of any neat
things to do with a
short Flash
animation when building the lines of the
grid on the page,
in case anyone
has any ideas. I thought about making the
lines "whirl
around" before
lining up on the grid, but that would be
beyond my current
Flash skills.


flasher is generously supported by...

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Streaming Media WEST '99 Conference &
Exhibition
"The Worlds largest Internet Audio & Video
Event"
December 7 - 9, San Jose Convention Center,
California

Reserve your space today at
http://www.streamingmedia.com

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list
settings go to
http://www.chinwag.com/flasher or email
helpatchinwag [dot] com


flasher is generously supported by...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Streaming Media WEST '99 Conference & Exhibition
"The Worlds largest Internet Audio & Video Event"
December 7 - 9, San Jose Convention Center, California

Reserve your space today at http://www.streamingmedia.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpatchinwag [dot] com


flasher is generously supported by...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Streaming Media WEST '99 Conference & Exhibition
"The Worlds largest Internet Audio & Video Event"
December 7 - 9, San Jose Convention Center, California

Reserve your space today at http://www.streamingmedia.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpatchinwag [dot] com


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