Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing Vaiables to Flash from a ASP Page

Status
Not open for further replies.

sanjs

Technical User
Mar 2, 2003
28
0
0
GB
Hi,

I'm trying to pass varaibles to Flash from a page url such as:


I can't get this to work, so I tried the
<PARAM NAME=FlashVars VALUE=&quot;title=&quot;<% Request.QueryString(&quot;title&quot;)%>&quot;&paragraph=first+line%0Dsecond+line&quot;>

but this doesn't work either - does anyone know how I can acheive this?

Thanks,

Sanjay
 
sanjs - Here is a page I use that does what you want.
The variable(LessonNameVar) comes in through the URL , then is sent to the flash movie in the two lines that begin with

&quot; <param name= &quot; AND
&quot; <embed src= &quot;


************** CODE ****************
<%@LANGUAGE=&quot;VBSCRIPT&quot; %>

<%
Dim LessonNameVar
LessonNameVar = Request(&quot;LessonNameField&quot;)
'Response.write LessonNameVar ' Used for checking out Variable
%>
<html>
<head>
<title>Main</title>
<meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=iso-8859-1&quot;>
</head>
<body bgcolor=&quot;#FFFFFF&quot; text=&quot;#000000&quot; leftmargin=&quot;0&quot; topmargin=&quot;0&quot;>
<div align=&quot;left&quot;><font size=&quot;+4&quot;></font>
<object classid=&quot;clsid:D27CDB6E-AE6D-11cf-96B8-444553540000&quot; codebase=&quot;shockwave/cabs/flash/swflash.cab#version=5,0,0,0&quot; width=&quot;774&quot; height=&quot;424&quot;>
<param name=movie value=&quot;Login.swf?LessonNameVar=<%=(LessonNameVar)%>&quot;>
<param name=quality value=high>
<embed src=&quot;Login.swf?LessonNameVar=<%=(LessonNameVar)%>&quot; quality=high pluginspage=&quot;download/index.cgi?P1_Prod_Version=ShockwaveFlash&quot; type=&quot;application/x-shockwave-flash&quot; width=&quot;774&quot; height=&quot;424&quot;>
</embed>
</object></div>
</body>
</html>

*****************************************

To view the variable in Flash you have to create a text box that is DYNAMIC, and name it &quot;LessonNameVar&quot;

Let me know how you do.
 
Tom,

That works great, its exactly what I was looking for.

What I'm trying to do is send a recordset into the url to feed into the Flash movie. What I need now is an easy way to send the recordset into the url - might have to be done manually!

Thanks,

Sanjay
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top