PDA

View Full Version : Loadvariables from ASP URGENT!


wingmeng
08-05-2004, 10:10 AM
hi

im trying to get my default.asp page to parse its username retrieved from my database to my flash movie. this is like a welcome page when the user has successfully login to my website and a welcome message with user's name in the flash movie.

the asp code

<!-- #include file="../_Private/VerifyLogin.asp" -->
<!--#include file="../database/connection2.asp" -->
<%
Dim strPage,username
strPage = "default"
username = session("username")
%>
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Smart Web Learning | Welcome to the Smart Web Learning Programme</title>
<link rel="stylesheet" type="text/css" href="/rw/style.css">
<script language="Javascript" src="/include/javascript.js" type="text/JavaScript"></script>
</head>
<body topmargin=0 leftmargin=0 marginheight=0 marginwidth=0>
<!-- #include file="studentbanner.asp" -->
<table width="760" border="0" cellpadding="0" cellspacing="0" align="center">
<tr><td width="180" bgcolor="#0480B8" valign="top"><!-- #include file="menu.asp" --></td>
<!--- Center Panel --->
<td valign="top" align="center">
<table width="100%" border="0" cellspacing="0" cellpadding="4" class="size11">
<tr><td valign="top" colspan=3>
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
WIDTH="550" HEIGHT="160" id="smartweb" ALIGN=""><PARAM NAME=movie VALUE="/rw/images/parsetest.swf"><PARAM NAME=loop VALUE=false> <PARAM NAME=menu VALUE=false> <PARAM NAME=quality VALUE=high><PARAM NAME=bgcolor VALUE=#FFFFFF><EMBED src="/rw/images/parsetest.swf" loop=false menu=false quality=high bgcolor=#FFFFFF WIDTH="550" HEIGHT="160" NAME="smartweb" ALIGN=""
TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>
</OBJECT></td></tr>
<tr><td width="50%" class="td_07">
Hi <b style="color:#3E57B6;"><%=(session("username"))%>!</b> Thank you for choosing Smart Web Learning as your
online launching pad for education excellence.<br><br>

SmartModules consists of revision tests and assessments which you can take to evaluate your understanding of
subjects you learn from the SmartLessons. <b>Click the button on the right</b> to begin your SmartModules. Good luck!

</td>
<td><img src="/rw/images/gradien_line.gif" width="2" height="214" border="0" alt=""></td>
<td width="50%" class="td_07" align="center"><a href="/rw/student/test.asp" onmouseover="picOn('image1');" onmouseout="picOff('image1');"><img name="image1" src="/rw/images/btn_begin_off.gif" width="203" height="112" alt="Click Here to Begin" style="border:1px solid Black;"></a><br><br><b>or</b><br><br>
<a href="/smartweb/home.cfm"><img src="/rw/images/return.gif" width="126" height="33" border="0" alt="Return to SmartModules"></a></td></tr>
</table><br><br>
</td></tr>
</table>

<!-- #include file="../copyright.asp" -->
</body>
</html>

i have a flash movie with a texfield and actionscript assigned to it

loadVariables("default.asp", "0");

nothing seems to work. am i doing it right?

thank you!

hangalot
08-05-2004, 12:19 PM
first of use the loadVars object.
secondly u r calling a page immersed with html, flash is just going to go huh, unless of course u want to parse it as xml. i would advise u to look at the tutorials availible on the web, you should get a bit more of an understanding in this regard.

tg
08-05-2004, 02:54 PM
so you just want to pass the username form the html/asp into flash? do a search for flashvars, or oldnewbie has a post in the mx actionscript forum that has a link for flashmethod - setvariable.... do a quick search, you should find it in about 10 minutes or so.

hangalot
08-05-2004, 02:58 PM
but in that case he can just pass it as a variable in the querystring for the embed and object tags. i think he is trying to load the username via an asp script, and not use setVariable which is a clientside action.
could b wrong.

wingmeng
08-09-2004, 04:28 AM
ok...thanks..i'll try out all your suggestions...