all groups > flash data integration > march 2005 >
You're in the

flash data integration

group:

asp variables into actionscript


asp variables into actionscript peter atkinson
3/21/2005 5:16:52 PM
flash data integration:
I'm having trouble getting flash to recognise my asp variables. I only want to
pull out one variable 'sOrganisationName'. Heres my .asp
code----------------------------------------------------------------------------
------------------------------------------------------------
<%@Language='VBScript'%> <% DIM buildSQL DIM dataString DIM orgName DIM
sOrganisationName SET dataString = Server.CreateObject('ADODB.Connection')
dataString.Open application('ConnectionString') buildSQL= 'SELECT value FROM
options WHERE [name] = 'Organisation'' SET orgName =
dataString.Execute(buildSQL) IF NOT orgName.eof THEN
sOrganisationName=('value') Response.Write orgName('value') ELSE
Response.Write('MICAD Host Server') END IF dataString.Close
%>------------------------------------------------------------------------------
--------------------------------------------------------------------------------
-- Heres what i have in
Flash---------------------------------------------------------------------------
------------------------------------------------------ Frame 1: loadVariables
('forflash.asp', 0, 'GET'); Frame 2: if (oOrganisationName ne '') {
gotoAndStop(10); } Frame 9: gotoAndPlay (2) Frame 10:I have a dynamic text
field with the VAR in the propertys pane set to
'sOrganisationName'.------------------------------ ANY HELP WOULD BE GREATLY
APPRECIATED. Thanks.:D
Re: asp variables into actionscript Randy1969
3/23/2005 12:20:10 AM
lookinto LoadVars sendAndLoad, that way you can trigger a function when the
variables actually load. As for your asp page:

<%@Language="VBScript"%>

<%
DIM buildSQL
DIM dataString
DIM orgName
DIM sOrganisationName

SET dataString = Server.CreateObject("ADODB.Connection")

dataString.Open application("ConnectionString")
buildSQL= "SELECT value FROM options WHERE [name] = 'Organisation'"

SET orgName = dataString.Execute(buildSQL)

IF NOT orgName.eof THEN
Response.Write "&oOrganisationName=" & Server.urlencode(orgName("value") )
ELSE
Response.Write "&oOrganisationName=" & Server.urlencode("MICAD Host Server")
END IF
dataString.Close
Set dataString=nothing

You need to return the actual variable name.

Hope this helps,

Randy Poole
CIO
TelSim, Inc (http://www.telsim.com)
Yahoo_IM: telsim_inc
AddThis Social Bookmark Button