Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/Code)
 inc_flash_stats
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Morpheus73
Average Member

Denmark
597 Posts

Posted - 15 May 2001 :  06:17:49  Show Profile
Problem with serverside query languages like ASP, is that dynamic content is hard to do, you have to refresh the whole page in order to update variables...

Well, Iīm messing around with shipping the content from the DB to an ASP file and on to FLASH...First test will be on a dynamic messenger, that loops every 5-10 secs, and gets the content from the INC_FLASH_STATS.asp page and displays them without refreshing the rest of the page...

However, I keep having trouble getting flash to read the variables I generate in inc_flash_stats.asp...would someone take a look at it?...here it is (inc_flash_stats.asp)...Well...



<% ' Get Private Message count for display on Default.asp
if strDBType = "access" then
strSqL = "SELECT count(M_TO) as [pmcount] "
else
strSqL = "SELECT count(M_TO) as pmcount "
end if
strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS , " & strTablePrefix & "PM "
strSql = strSql & " WHERE " & strMemberTablePrefix & "MEMBERS.M_NAME = '" & strDBNTUserName & "'"
strSql = strSql & " AND " & strMemberTablePrefix & "MEMBERS.MEMBER_ID = " & strTablePrefix & "PM.M_TO "
strSql = strSql & " AND " & strTablePrefix & "PM.M_READ = 0 "

Set rsPM = my_Conn.Execute(strSql)
pmcount = rsPM("pmcount")

' Get Buddies online count
If trim(strDBNTUserName)="" Then
' No user/password so ask user
strMessBuddies = "Login to View Online Buddies"
Else '### User Logged In So Get Buddies Who Are Online

set rsBuddiesOnline = server.CreateObject("ADODB.RecordSet")
strSql = "SELECT " & strMemberTablePrefix & "ONLINE.UserID," & strMemberTablePrefix & "MEMBERS.MEMBER_ID"
strSql = strSql & " FROM " & strMemberTablePrefix & "ONLINE INNER JOIN (" & strMemberTablePrefix & "MEMBERS INNER JOIN " & strMemberTablePrefix & "BUDDYS ON " & strMemberTablePrefix & "MEMBERS.MEMBER_ID = " & strMemberTablePrefix & "BUDDYS.BUDBUDID) ON " & strMemberTablePrefix & "ONLINE.UserID = " & strMemberTablePrefix & "MEMBERS.M_NAME"
strSql = strSql & " WHERE " & strMemberTablePrefix & "BUDDYS.BUDMEMBERID=" & getmemberID(strDBNTUserName)
rsBuddiesOnline.Open strSQL, my_Conn

dim intDisplayBudCount
intDisplayBudCount = 0
If rsBuddiesOnline.Eof OR rsBuddiesOnline.Bof Then
strMessBuddies = "No Buddies Online"
Else

do until rsBuddiesOnline.eof
' here we could read the Name in an array and display it in flash
intDisplayBudCount = intDisplayBudCount + 1
rsBuddiesOnline.movenext
loop
strMessBuddies = cstr(intDisplayBudCount) & " Buddies online"
End if
rsBuddiesOnline.close
set rsBuddiesOnline = Nothing
End if
MyOutput="Variable1"&pmcount&"&Variable2"&strMessBuddies&"&Tjeck =ok"
Response.Write Server.URLEncode(MyOutput)
%>


and I set the ActionScript in flash to do the following...

1) LoadVariables (inc_flash_stats,"0")
2) (empty)
5) If Tjeck == "ok" goto 10 Else Goto 2 and Play
10) Tjeck ="" (and 2 dynamic textfileds with Variable1 and Variable 2 showing)
20) Goto 1 and Play

- anyone see the probs and able to help with a solution? ... once we get this to work, inc_flash_stats could be made to generate many of the variables we need, and theoretically many of the mods could be converted and/or used by flashfiles/sites

mph73


Morpheus73

BuffyNET
Junior Member

United Kingdom
126 Posts

Posted - 15 May 2001 :  06:32:09  Show Profile  Visit BuffyNET's Homepage  Send BuffyNET an ICQ Message
quote:


1) LoadVariables (inc_flash_stats,"0")
2) (empty)
5) If Tjeck == "ok" goto 10 Else Goto 2 and Play
10) Tjeck ="" (and 2 dynamic textfileds with Variable1 and Variable 2 showing)
20) Goto 1 and Play

- anyone see the probs and able to help with a solution? ... once we get this to work, inc_flash_stats could be made to generate many of the variables we need, and theoretically many of the mods could be converted and/or used by flashfiles/sites

mph73


Morpheus73



1) LoadVariables (inc_flash_stats,"0") needs to be :

1) Load Variables ("inc_flash_stats.asp", 0)

I used flash once to do a continual update, be warned, it will be an immense load on the server.

Neil
Go to Top of Page

Morpheus73
Average Member

Denmark
597 Posts

Posted - 15 May 2001 :  08:34:38  Show Profile
quote:

quote:


1) LoadVariables (inc_flash_stats,"0")
2) (empty)
5) If Tjeck == "ok" goto 10 Else Goto 2 and Play
10) Tjeck ="" (and 2 dynamic textfileds with Variable1 and Variable 2 showing)
20) Goto 1 and Play

- anyone see the probs and able to help with a solution? ... once we get this to work, inc_flash_stats could be made to generate many of the variables we need, and theoretically many of the mods could be converted and/or used by flashfiles/sites

mph73


Morpheus73



1) LoadVariables (inc_flash_stats,"0") needs to be :

1) Load Variables ("inc_flash_stats.asp", 0)

I used flash once to do a continual update, be warned, it will be an immense load on the server.

Neil



hmmm...tried that, wonīt work either...maybe itīs something in the ASP thatīs wrong...could someone who knows both flash and ASP take a look, maybe even test it?

mph73

Morpheus73
Go to Top of Page

BuffyNET
Junior Member

United Kingdom
126 Posts

Posted - 15 May 2001 :  09:11:37  Show Profile  Visit BuffyNET's Homepage  Send BuffyNET an ICQ Message
ok, to use ASP to create the variables for flash, you must make sure that the only think the ASP script outputs is text, it is structured as below :

variable1=something
&variable2=something else

modified code below :


<!-- #include file="config.asp"-->
<!-- #include file="inc_functions.asp"-->

<% ' Get Private Message count for display on Default.asp

set my_Conn = Server.CreateObject("ADODB.Connection")
my_Conn.Open strConnString


if strDBType = "access" then
strSqL = "SELECT count(M_TO) as [pmcount] "
else
strSqL = "SELECT count(M_TO) as pmcount "
end if
strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS , " & strTablePrefix & "PM "
strSql = strSql & " WHERE " & strMemberTablePrefix & "MEMBERS.M_NAME = '" & strDBNTUserName & "'"
strSql = strSql & " AND " & strMemberTablePrefix & "MEMBERS.MEMBER_ID = " & strTablePrefix & "PM.M_TO "
strSql = strSql & " AND " & strTablePrefix & "PM.M_READ = 0 "

Set rsPM = my_Conn.Execute(strSql)
pmcount = rsPM("pmcount")

' Get Buddies online count
If trim(strDBNTUserName)="" Then
' No user/password so ask user
strMessBuddies = "Login to View Online Buddies"
Else '### User Logged In So Get Buddies Who Are Online

set rsBuddiesOnline = server.CreateObject("ADODB.RecordSet")
strSql = "SELECT " & strMemberTablePrefix & "ONLINE.UserID," & strMemberTablePrefix & "MEMBERS.MEMBER_ID"
strSql = strSql & " FROM " & strMemberTablePrefix & "ONLINE INNER JOIN (" & strMemberTablePrefix & "MEMBERS INNER JOIN " & strMemberTablePrefix & "BUDDYS ON " & strMemberTablePrefix & "MEMBERS.MEMBER_ID = " & strMemberTablePrefix & "BUDDYS.BUDBUDID) ON " & strMemberTablePrefix & "ONLINE.UserID = " & strMemberTablePrefix & "MEMBERS.M_NAME"
strSql = strSql & " WHERE " & strMemberTablePrefix & "BUDDYS.BUDMEMBERID=" & getmemberID(strDBNTUserName)
rsBuddiesOnline.Open strSQL, my_Conn

dim intDisplayBudCount
intDisplayBudCount = 0
If rsBuddiesOnline.Eof OR rsBuddiesOnline.Bof Then
strMessBuddies = "No Buddies Online"
Else

do until rsBuddiesOnline.eof
' here we could read the Name in an array and display it in flash
intDisplayBudCount = intDisplayBudCount + 1
rsBuddiesOnline.movenext
loop
strMessBuddies = cstr(intDisplayBudCount) & " Buddies online"
End if
rsBuddiesOnline.close
set rsBuddiesOnline = Nothing
End if
MyOutput="Variable1="&pmcount&"&Variable2="&strMessBuddies&"&Tjeck=ok"
Response.Write (MyOutput)
%>



This works fine, I have tested it. I am very used to using variables in flash and using ASP, if you want I can email the flash source to you.

Neil
Go to Top of Page

redbrad0
Advanced Member

USA
3725 Posts

Posted - 06 June 2001 :  09:28:18  Show Profile  Visit redbrad0's Homepage  Send redbrad0 an AOL message
neil, whats going on with this? do you have an example we can see?

Brad
Go to Top of Page

Morpheus73
Average Member

Denmark
597 Posts

Posted - 06 June 2001 :  09:50:00  Show Profile
quote:

neil, whats going on with this? do you have an example we can see?

Brad



well ... one of the first versions neil sent me is up and running over at Tschiveīs portal. but itīs the early alpha version...works fine though!

mph73


Morpheus73 - morpheus73@hotmail.com
Go to Top of Page

redbrad0
Advanced Member

USA
3725 Posts

Posted - 06 June 2001 :  10:00:11  Show Profile  Visit redbrad0's Homepage  Send redbrad0 an AOL message
whats the web address?

Brad
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.2 seconds. Powered By: Snitz Forums 2000 Version 3.4.07