473,657 Members | 2,534 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Passing values from ASP to FLASH

15 New Member
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.URLEncod e(varTest)


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

Thanks,
John
Jun 27 '08 #1
1 3107
jrayjr
15 New Member
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
14928
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) { document.images.src = eval("mt" +menu+ ".src") } alert("imgOff_hidemenu"); hideMenu=setTimeout('Hide(menu,num)',500);
10
2458
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. There is only behind-the-scenes work going on in that page.
2
1925
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 method. I can debug the method and values are being assigned. But when I am in the calling procedure I no longer see the values, I
2
2434
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
1499
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 classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="80" height="40" id="accesscode" align="middle"> <param name="allowScriptAccess"...
0
1362
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 dynamic, so I need to be able to change variables for parameters on the fly. I'm pretty much a flash dummy, but here's what my component parameters look like. http://i15.tinypic.com/664vzbo.jpg And the code I'm using to embed it into my website...
0
961
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 if the user users some special chars in that text value, then XML gets corrupted. How can we solve this problem?
1
12556
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. What I am trying to do is pass the value of textColor to my Weather.swf. The textColor is a dynamic value that the user selects from the main swf. I'm still quite new to how AS3 handles different things. =( import flash.net.URLRequest;...
0
1824
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 trust it. Also, how do you obtain the values inside of the flash document?
0
8420
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8617
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7353
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6176
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5642
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4173
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4330
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1970
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1733
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.