473,326 Members | 2,010 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Passing values from ASP to FLASH

15
Hello everyone, Im running into a problem passing values from ASP to Flash. I've been searching around and trying different things with no luck. The project im working on will use ASP to pull data from Access and SQL and then post the information on series of frames that is timed. The code im am posting is just a test to try and get values passed to Flash. I am using Flash CS3 with actionscript 2.0.

Frame 1:
Expand|Select|Wrap|Line Numbers
  1. success="";
  2. loadVariablesNum("test.asp", 0);
  3.  
Frame2:
Expand|Select|Wrap|Line Numbers
  1. if (success ne "") {
  2.            gotoAndStop(6);
  3.     }
  4.  
Frames 3 & 4 has text box diplaying "Loading Data..."

Frame 5:
Expand|Select|Wrap|Line Numbers
  1. gotoAndPlay(2);
  2.  
Frame 6:
Has a Dynamic Text box with the property VAR: vartest

ASP
Expand|Select|Wrap|Line Numbers
  1. <%@LANGUAGE="VBSCRIPT"%>
  2.  
  3. <%
  4.     Option Explicit
  5.  
  6.     Dim varTest
  7.  
  8.     varTest = "Did this work?"
  9.  
  10.     Response.Write "success=True&vartest="
  11.  
  12.     Response.Write Server.URLEncode(varTest)
  13.  
  14. %>
  15.  
It just loops frame 2 - 5 never ending. If I was to remove success=""; from Frame 1 then it comeplete and the Dynamic text on frame 6 shows:

"

Response.Write Server.URLEncode(varTest)


Any help would be great. I know it must be something im missing.

Thanks,
John
Jun 27 '08 #1
1 3092
jrayjr
15
Good evening everyone, I was able to get the problem worked out. I changed the way it was pulling the data in and I had to use the absolute path to the ASP file.

Expand|Select|Wrap|Line Numbers
  1. myVars = new LoadVars();
  2.  
  3. myVars.load("http://*.*.*.*/Flash/Test/test.asp");
  4.  
  5. myVars.onLoad = function( success ){
  6.     if (success ){
  7.         txtTest = myVars.varTest;
  8.         txtTest2 = myVars.success;
  9.     }else{
  10.         trace( "Failed!" );
  11.     }
  12. }
  13.  
-John
Jun 29 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: domeceo | last post by:
can anyone tell me why I cannot pass values in a setTimeout function whenever I use this function it says "menu is undefined" after th alert. function imgOff(menu, num) { if (document.images) {...
10
by: vbMark | last post by:
Hello, I am doing this: window.location="page2.php?subj="+subj+"&body="+body; to send information to another page. However, I don't want that second page to show up or display in any way....
2
by: craigkenisston | last post by:
Hi, I created an array of objects like this : object Values = {myObject.myprop, otherobject.otherprop, thirdobject.xprop}; Then I pass it to a method. and I get the values filled in that...
2
by: jeniffer | last post by:
gcc -c test.c gcc -o test test.c ./test i=6 0 14 22 42 48 e6 014224248ffffffe6 ea =
5
by: Jake G | last post by:
I have a flash word verification doohickey running on a page that submits an email (problem with a spammer). The code for the flash is...... <td width="109"<div id="flashcontent"> <object...
0
chunkny
by: chunkny | last post by:
I'm having a little trouble getting a FLV player component to work dynamically. When the information is hardcoded from Flash MX 2004, everything works fine, but the problem is that my website is...
0
by: kiluone | last post by:
Hi forums, we can't seem to find the answer to this issue. I hope someone can point me in the correct direction. " we are passing text values entered by user to PHP from Flash using XML. But...
1
by: jrayjr | last post by:
Good morning, I've ran into a problem where I need to pass a value from my main swf to a external swf that I load. I've looked everywhere with no luck. Hope to find someone here that may know. ...
0
Markus
by: Markus | last post by:
What's the best way to pass variables to a flash document? I've googled it and gotten answers, but most of them seem to be using old flash versions and invalid syntax (html). Ergo, I'm hesitant to...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.