Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash








Passing ASP Variables To Flash MX


Sorry for asking this but I'm new to flash actionscripting so here goes...

I have a form that passes several variables (in ASP) to another page, would it be possible to extract those variables and have them show as text in a flash movie and also replace the url encoded spaces with blank spaces?

i.e. n=Andy
or m=Andy%20Smith

in asp file that contains the flash file I want to set the variables from the previous page then display them in a movie file...

What I'm trying to do is have someone fill out a form with various text fields, these details are passed to another page for confirmation, they will also be able to see a representation of the text they have entered in a layout in a flash file which is contained in an ASP page...

hopefully that's reasonably clear...

Cheers,



Andy




FlashKit > Flash Help > Flash MX
Posted on: 06-25-2002, 12:45 PM


View Complete Forum Thread with Replies

Sponsored Links:

Passing Variables From Flash To Asp
I am have tried using

loadVariables ("page.asp","","POST");
getURL("page.asp","_parent","POST");

but my asp files don't get any variables from the flash movie??

anyone any ideas

Gareth

View Replies !    View Related
Passing Variables Into Flash In The Url
Hi

Is there any way I can pass a couple of variables into my Flash movie in the URL. I.e. have something like:

Code:
http://www.blah.org/Movie.html?position=56&height=90


and then have some code in the movie that can pick up these values

Thanks
[Edited by m_andrews808 on 01-02-2002 at 05:54 AM]

View Replies !    View Related
Passing Variables From ASP To Flash
Hey, folks.

Here's the deal -

I've got a .swf that sits at the top of an html website. The .swf contains sound - and a nifty on/off toggle button to turn said annoying sound on or off.

Unfortunately, the .swf is not in its own frame - so every time a link is clicked, the .swf is reloaded.

I'm DESPERATELY trying to pass a 'sound' variable from the .swf (eg. sound == "on") into asp.

THIS seems to be working - because I can see the sound=on (for example) tag in the url when the page reloads, and when I view the source of the .asp document.

Now... how in tarnation do I get Flash to load the value from the ASP? It's clearly not doing that. It's in the query string - it's in the url - hell, when I view the source, the value in the ASP is changing.

How do I succesfully load the value 'sound' from the ASP into Flash?


stop ();
if (_level0.sound != "off") {
tellTarget ("sound_toggle") {
gotoAndStop (2);
}
} else {
tellTarget ("sound_toggle") {
gotoAndStop (3);
}
}

I know how to load values from, say, a text file - does it work the same way, especially given that the ASP is continually being changed by the Flash?


Does anyone have ANY idea how to save seven professional developers from insanity?

Thanks, folks!

- Thingee

View Replies !    View Related
Passing Variables To Flash 5?
When you mouseover a section in my nav, the color of the clip will change, let's say to orange. When you click, a new HTML page will load and the navigation would then default back to it's normal "off" state, with a color of "blue". Orange is the "on" color, blue is the "off" color. What I want to do is to make the orange color "sticky". Meaning that the navigation would stay orange even after a new page has loaded.

This SHOULD be possible, but I'm not sure how I would go about doing it. I'm not using frames or it would be fairly easy. I'm thinking about putting a "nav=orange" on the end of each link on my site. I'm hoping that I can somehow pass that variable into Flash which would then know to "make orange the default color" for the selected page instead of the normal blue color. I would use this method for each different color that I wanted to make "sticky".

Does that make sense at all? Can someone point me in the right direction, either with code or a link to code?

View Replies !    View Related
ASP Passing Variables Into Flash
Will someone kindly help me to understand how I would go about passing vaiable "X" into my flash movie which contains a dynamic text field.

View Replies !    View Related
Passing Variables Into Flash
Here is the snippit of code...

<object ...>
<param name=movie value="Flash/test.swf?songid=123">
<embed src="Flash/test.swf?songid=123"...></embed>
</object>


What is the actionscript I need to get the "songid" number?

View Replies !    View Related
Passing Variables To Flash
I am trying to pass variables into flash using the GET method, by appending a URL eg http://www.mydomain.com/flashhost.php?var1=test.

in the flashhost.php file I have the following lines, which is output in the HTML..
<object>
...
...<EMBED src="source.swf?var1=<?=$var1?>"...
...
</object>

I can get this to work if I use 'loadVariables ("flashhost.php?", this); but I want to be able to pass the variables from several files and therefore I can not code the movie with the name of the file which the variables are being passed from.

Can anyone help? thx

View Replies !    View Related
Passing Variables From PHP To Flash ...
I am trying to understand how to pass information from PHP to flash. My php code looks like the following:



$name = "Mark";

$address = "Seattle";

echo "name=".$name."&address=".$address;



In my flash file I am using a loadvars variable with the following call.



var c = new loadvars();

c.onload = information();



c.sendandload("test.php", c, POST);



But I don't know what to put in myinformation function to access the data that the php sends back. I assume that information will be in my loadvars variable, but I don't know where.



Please help!

View Replies !    View Related
Passing Variables To Flash-ASP Or XML
What are the benefits of passing values to flash using say and ASP page or XML. What kind of situation is best for each and what the drawbacks of each

Thanks

View Replies !    View Related
Passing Variables From The Url To Flash
I want to pass variables from the url to flash. For example, (webpage.htm?variable1=blue&variable2=5) will load variable1 and variable2 into flash and make it dynamic. How do I do this?

View Replies !    View Related
Passing Variables To Flash
Hey All,

I searched through the forums and didn't find anything that addresses this specific issue.

I want to pass a variable to flash from my html file. I know I can pass a variable inside of the <EMBED> and <PARAM> tags, but all the examples I've seen set the value of the variable at the same time.
I'm defining and setting the value in the url (i.e http://www.url.com?variable=value) then I want to pass the variable to my swf file and have it keep the value I define in the url.
It's currently not receiving the variable. If I define the variable and assign it's value inside the embed and param tags it works fine, though.

Thanks for any help.

Luke

View Replies !    View Related
Passing Variables (in Flash 4)
I know Guru would know this... Such a stupid an eternal question, i'm sorry about it...

IN FLASH 4, How can i pass variables from a loaded movie (level 1) to the main movie. Can i also do the opposite ??

View Replies !    View Related
Passing Variables To Flash
how do i go about passing a variable from an html file to a flash document embedded in it

lets say, I want to set a value of 'id' in flash

do I do it through the param tag?
<param name='id' value='80' />

i know this - but have brain freeze

cheers

View Replies !    View Related
Passing Variables In Flash?
I have a navigational movie which animates each time the user goes to a new page. I would like to make it so that the user only sees the nav animate once when they originally enter the site and not again after that. I know it can be done by creating and passing a variable but I dont know how. Can anyone tell me or give me another resource which will help?

Thanks

Neilb1969

View Replies !    View Related
Passing Variables Flash To Php
hi friends..

Please give me solution.

i am working with php and flash
my flash my.swf running in index.php

now i need to pass variables from my.swf to index.php without refreshing page. and dont want to open new page.

please help.

thanks in advance
mahesh

View Replies !    View Related
Passing Variables Flash To Php
hi friends..

Please give me solution.

i am working with php and flash
my flash my.swf running in index.php

now i need to pass variables from my.swf to index.php without refreshing page. and dont want to open new page.

please help.

thanks in advance
mahesh

View Replies !    View Related
Passing Variables From FLASH To PHP
I'm trying to pass simple variables from flash to php and vice versa. I have come accross so many different ways that i don't know which one to use.

I have a flash movie and i have a php script. I want variables to pass to the script a few times a second, then the php script sends the values to a MySQL database. But i have no problem with that. The problem is that i can not get the variables in flash to pass to php. I don't want the movie to do anything when a variable is passed either. So the getURL command is no good.

Does anyone know how i can do this?

Thanks.

View Replies !    View Related
Passing Variables From Flash To PHP
I have a problem when trying pass a variable (entered into an input textfield) from Flash to PHP. When the button is hit to activate the LoadVars object, the PHP script returns the error message:

Notice: Undefined index: years in /Users/phil/Sites/phpflash/campaign/calculation.php on line 2

Here's the Flash script:

var path:String = "http://localhost/~phil/phpflash/campaign/"

var dataOut:LoadVars = new LoadVars();

myBtn.onRelease = function() {
dataOut.years = years_txt.text;
dataOut.send (path + "calculation.php", "_blank");
//trace(years_txt.text);
};

And here's the PHP script (called 'calculation.php'):

<?php
$calculation = $_POST['years']*7;
echo $calculation;
?>

The trace function shows me that the value entered by the user is recognised and I've done all the usual checks (ie: checking the path names and instance names etc are all correct), but I'm still getting the Undefined index error.

Can anyone help?

View Replies !    View Related
Passing Variables To PHP From Flash
Hey guys,

If anyone could help with this, I'd be very happy!

I have my Flash5 movie embedded in the index.html page in:
http://www.dar.cam.ac.uk/mayball/smrtj/
(swf file location http://www.dar.cam.ac.uk/mayball/smrtj/smrtj.swf)

On each page after the intro, I have an "admin" button. (Note there is also an "admin" button on the intro page, but this doesn't yet have any AS).

On each page, which is actually a scene in my swf, the variable current is set to the name of the current page, juniors, say. The "admin" buttons have the following AS:

on (release) {
page = current;
getURL ("form.php", "admin", "GET");
}

So that brings up a new window (called "admin") and, from the juniors page, loads:
dar.cam.ac.uk/mayball/smrtj/current=juniors&page=juniors
into it.

The problem is, the PHP doesn't get the variables! The URL is in the address bar as shown here, but "Here, page should be: $page" doesn't show anything for the $page variable!

Can anyone clear this up for me???

Thanks a lot,
Chris

View Replies !    View Related
Passing Variables From Flash
hi,

i encounter problem when i want to pass variables to another file/program.

my situation:
to receive a variable (eg. id)
then pass this variable back when come to last frame.

how do i pass variable in this situation?
i tried using

var id=id;
getURL("test.asp", "GET");

is this correct?
the .asp page will open which i do not want. how do i just pass the variables only.


thanks very much.

View Replies !    View Related
[F8] Passing Variables In The Url To Flash
Is it possible to pass variables to a flash obect threw the url and how would the url look?

something like this?
http://critcore.wisc-online.org/crit...l?Objectid=183

then I would request the objectid in flash using send and load? Or how would I retrieve that?

Thanks for your help I appreciate it

View Replies !    View Related
Passing ASP Variables To Flash
hello I have a flash page which should needs to receive a value from an asp page, which I have attempted to set up like so:


Code:

<%@Language="VBScript"%>

<%
Response.Write "Uploaded est.jpg"

%>
the flash then needs to begin a fileRef download based on the value from the asp page (which is the target location of the file to d/l)


Code:

Get.onRelease = function()
{
var Location:String =loadVariablesNum("employee.asp", 0, "GET");
trace(Location);
}



Code:

var fileRef:FileReference = new FileReference();
fileRef.addListener(listener);
var url:String = "http://www.macromedia.com/platform/whitepapers/platform_overview.pdf";
if(!fileRef.download(Location)) {
trace("dialog box failed to open.");
}

if i hard code the location then the file downloads fine, can any1 suggest any help?

many thanks

View Replies !    View Related
Passing Flash Variables...
I know this can be done via the querystring and also with the param tags within the <object> tag, but those methods does not work in this case. The page I am creating this menu for uses ASP.NET Master Pages, I need the flash to recieve a variable from the page that is loaded to tell it which frame of the menu to display (there is a highlight on the buttons when one is selected, this variable will tell the flash which button to highlight on each page.)

Since the flash is embedded in the master page, I can not pass the variable to the flash from the <object> tag and really dont want the URL to display page.aspx?FlVar=Home, etc.

Is there a way I can include something in the other coding of my page, without having to use other external files?

View Replies !    View Related
Passing Variables From Php To Flash
Hi there

I have a problem using a very simple URLVariables script with php
The thing is this sample do works on some servers and doesn't on other:
Instead of having the correct values with trace, I get the php code itself.
That means I get the following string in trace():
<?php
$myresult = $_POST['name'];
echo "the result is ".$myresult;
?>
Here is the php code file called with URLRequest by flash

Code:
<?php
$myresult = $_POST['name'];
echo "the result is ".$myresult;
?>

Here is the actionscript that should display "the result is: foo"

Code:
var urlLoader:URLLoader = new URLLoader();

var urlRequest:URLRequest = new URLRequest("call.php");
urlRequest.data = new URLVariables("name=foo");
urlRequest.method = URLRequestMethod.POST;

urlLoader.addEventListener(Event.COMPLETE, dataloaded);
urlLoader.load(urlRequest);

function dataloaded(e:Event):void
{
var myresult = (e.target as URLLoader).data;
trace(myresult);
}



I know it comes from the php configuration on my server because I tested it on another server and it works, but I cant find what I must change in my php.ini file to get the good results in trace();

Do you have any idea? thanks

View Replies !    View Related
Passing Variables From Asp.net To Flash
Hi,
I'm have created a flash movie that what it does is that when you rollover a "state" on a map then it shows you the location of offices per state, and when you click on the state it displays the info on a asp.net page of all the offices. I have place the buttons under a movie clip per each state.

Code:
on (release) {
if (_root.ActiveState!="FL"){
getURL("test.aspx?state=FL", "_self");
eval("_root."+_root.Activestate).gotoAndPlay(1);
_root.Activestate="FL";
}
}

on (rollOver) {
if (_root.Activestate!="FL"){
gotoAndStop(2);
}
}

on (rollOut){
if (_root.Activestate!="FL"){
gotoAndStop(1);
}
}

Now my issue here is when from some other page (dropdownlist state) call the page (example:test.aspx?statecode=MN) where I have the flash movie with the offices and the flash movie is supposed to read the querystring and then display the state that was selected...
Searching on the net I found an example that works but with a txt file, when I change it to read the querystring it doesn't work... the code on my flash movie when it loads the movie is like this:

Code:
stop();
this.createEmptyMovieClip("state_var", this.getNextHighestDepth());
//here if I put loadVariables("test.aspx", state_var);then it doesn't read the variables... , if I use the txt page then it works just fine

loadVariables("params.txt", state_var);
//params.txt has stateCode="NY"function checkParamsLoaded() {
if (state_var.stateCode == undefined) {
trace("not yet.");
} else {
_root.Activestate= state_var.stateCode;
trace(state_var.stateCode);
clearInterval(param_interval);
//Also, one of my issues here is: How do I do I go from here to go to the state Movie Clip :
//if I use this code it doesn't work... _root.Activestate.gotoandplay(1);
//if I use the following line then it works fine...
NY.gotoAndPlay(1);}
}

var param_interval:Number = setInterval(checkParamsLoaded, 100);

the code in my test.aspx page is:

Code:
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0"
width="422" height="600" id="map" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="map.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<param name="FlashVars" value="stateCode=<%# Request.QueryString("stateCode") %>" />
<embed src="state.swf" FlashVars="stateCode=<%# Request.QueryString("stateCode") %>" quality="high" bgcolor="#ffffff" width="422" height="600" name="map"
align="middle" allowscriptaccess="sameDomain" type="application/x-shockwave-flash"
pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
Please any help with this is, I have been trying to work fora while now....

thanks

Jess

View Replies !    View Related
Passing Variables To And From Flash To C++
Hi

I'm having real trouble finding a clear explanation on how to pass variables between a .swf lash movie and a c++ program.
i want a user to be able to add a target on a flash movie embedded on a webpage and then click "go" and have it start up a c++ program and pass in the value and when the c++program is finished i like it to pas back a result.

Does anybody have any idea how to do it? I'd really appreciate if i could get some help on this. I'm trying to use flash as a front end for a genetic algorithm and neural network example and i really need to be able to send variables back and forth.

Thanks
Darthon

View Replies !    View Related
Passing Variables From PHP Into Flash
Hi,

Im new to PHP programming and I'm having a problem trying to pass a variable from a .php file into a flash movie.

Here's a simple example:

PHP Code:



<?php    $sometxt = "Connected to DB";    $link = mysql_connect('localhost', 'username', 'password');    if ($link) {        echo 'Connected to DB ' . $link;//1st echo line        echo "&dynBox_connStatus=$sometext";//2nd echo line :eek:    } else {        echo 'Error connecting: ' . mysql_error();        }?>




With the first "echo" line, i can perfectly output the message onto a browser, what i cant do with the second, is to pass the dynBox_connStatus value into flash movie. Inside flash movie, the output i get in the textbox is $sometext";.
I've checked all over the internet, and most of the examples are just like this one, but it doesnt seem to work for me ..

Am i missing something?

Thanx in advance.

cheers!

View Replies !    View Related
Passing Flash Variables To Php
Hello,
I'm new here and I have a question. I want to send a variable from flash to php, but I can't get it working.
This is my Actionscript3

ActionScript Code:
var loader:Loader = new Loader();
addChild(loader);
var number:Number = Math.ceil(Math.random()*4);
var request2:URLRequest = new URLRequest("test" + number + ".jpg");
loader.load(request2);


var request:URLRequest = new URLRequest("test.php");
request.method = URLRequestMethod.POST;
var variables:URLVariables = new URLVariables();
variables.number = number;
request.data = variables;
trace("sendToURL: " + request.data);
sendToURL(request)

My phpcode

PHP Code:



<?php
$number = $_POST['number'];
echo $number;
?>




When I run this in flash I see number=3 (or a different number) But when I put it on the server my flash works but I see nothing when I run my test.php.
Can anyone tell me what I'm doing wrong? Or does someone have an example for me to send the flash variable to php? I just can't get it to work and I can't find a good example/tutorial.
Thanks for the help in advance

View Replies !    View Related
Passing Variables From Php To Flash
Hi there

I have a problem using a very simple URLVariables script with php
The thing is this sample do works on some servers and doesn't on other:
Instead of having the correct values with trace, I get the php code itself.
That means I get the following string in trace():
<?php
$myresult = $_POST['name'];
echo "the result is ".$myresult;
?>
Here is the php code file called with URLRequest by flash

Code:
<?php
$myresult = $_POST['name'];
echo "the result is ".$myresult;
?>
Here is the actionscript that should display "the result is: foo"

Code:
var urlLoader:URLLoader = new URLLoader();

var urlRequest:URLRequest = new URLRequest("call.php");
urlRequest.data = new URLVariables("name=foo");
urlRequest.method = URLRequestMethod.POST;

urlLoader.addEventListener(Event.COMPLETE, dataloaded);
urlLoader.load(urlRequest);

function dataloaded(e:Event):void
{
var myresult = (e.target as URLLoader).data;
trace(myresult);
}

I know it comes from the php configuration on my server because I tested it on another server and it works, but I cant find what I must change in my php.ini file to get the good results in trace();

Do you have any idea? thanks

View Replies !    View Related
Passing Value Of Variables From Flash To Php
I have created a Input text box in flash and embedded into an HTML page. What I want is, when I open the HTML page, the user inputs some text into that Input text box and then by clicking on a button called Save, it should display the contents of the Input text box onto a php page.

I have created a flash file and wrote the following action script for the save button:

mytext is the var that I have defined for the input text box

on (release)
{
this.mytext = this.mytext_txt.text;

getURL("save.php", "_blank", "GET");
}


And php code that Ihave written is:

$mytext= $_GET['mytext'];
print "The text is ". $mytext . ".";

Please help me where I am going wrong.

I am getting the output as :

The text is undefined

View Replies !    View Related
Passing Variables From Flash To Asp
Hi. Is it possible to send just variable data from an swf to an asp file? I mean without using textfields etc. What I'm trying to do is save graphical data that is created by the user. No interaction with text fields etc is done. So what I need to do is take all that data and send it to an asp page that will then save the data.

Every time I try and do it the page won't display. If I use textfields to pass the data no problem. However, if I take my normal variable data and copy that into textfields at run time, it still doesn't work. I'm getting quite desperate.

Here is an example
from flash...

ActionScript Code:
for(i=1;i<10;i++){
    var1 += "name"+i+";";
}
//this concatenates all the data into one variable. This is necessary because I'm sending loads of data.

Then...

ActionScript Code:
myLoadVars = new LoadVars();
myLoadVars.testVal = var1;
myLoadVars.sendAndLoad("receive.asp",myLoadVars,"POST");
Then from asp...

HTML Code:
Dim receiveVal
receiveVal = Request("testVal")
valArray = Split(receiveVal,";")
This is supposed to receive the variable and split it into an array which can then be added to the database.

However, using this method, the variables aren't even passed to asp. What am I doing wrong?
Any suggestions very welcome

View Replies !    View Related
Passing Variables From C++ To Flash
Hey everyone,
I've been working on a flash movie embedded in an MFC dialog (or CView-derived class), using ShockwaveFactory ActiveX plugin. I need to send data to the movie in order to manipulate it from C++. I am designing a compass, and according to external GPS readings from a gps receiver, I want the compass needle to move north,south,etc..
Here are my problems.
1. I don't know how to pass the variables from C++ to the movie
2. I don't know how to structure my flash file so it will accept external variables.
PLEASE HELP !

PS: If somebody has done this before, and you know of a good tutorial, please post a link in your reply.

View Replies !    View Related
Passing Variables From ASP To Flash
I cannot upload any files as of yet but i am trying to get a site to pass variables from flash to asp to a database back to asp and then back to flash. So far i've gotten from flash to asp to the database back to asp but i cannot get the variables back into flash. strUserID and strPassword are entered in a login screen in a flash movie. The movie passes strUserID and strPassword to asp which checks for it in a database and validates a login. Then i try to send it to flash but don't know where to start.

In the second flash film I have a textbox with strUserID and in the first frame i have,...loadVariablesNum ("valid.asp", 0);and in valid.asp i have...<%

Option Explicit
Response.Buffer = TRUE
Response.Expires = -1500
Response.CacheControl = "Public"


DIM strUserID

strUserID = Request("strUserID")

%>
on the valid.asp i have it properly displaying the Value of strUserID so i know it is loaded on the ASP page.

If i can post the files soon i will im sure it will make more sense then my crummy explanations

View Replies !    View Related
Passing Variables To Flash
Hi, I have some navigation that needs to show what page is currently active e.g. by showing a pink dot. I am passing the variable to flash on the end of the swf e.g. picker.swf?tag=web

I then have a series of if statements to make the dots invisible/visible depending on the content of the variable. The problem i am having is that they are always visible. What am i doing wrong?

http://dev.westhill.co.uk/Westhill_2006/services/websites.htm

just click on the right panel, websites and cd roms only. You will see the two random dots, I will place these later. I also have a text box to track the variable.

The as I have used is:

if (_root.tag==web){

this.g_active1._visible=true;
this.g_active2._visible=false;



} else if (_root.tag==cdrom){
this.g_active2._visible=false;
this.g_active2._visible=true;

}

If anyone can tell me what I should be writing that would be great!

Cheers

Bex

View Replies !    View Related
Passing Variables To Flash
Hi, I have some navigation that needs to show what page is currently active e.g. by showing a pink dot. I am passing the variable to flash on the end of the swf e.g. picker.swf?tag=web

I then have a series of if statements to make the dots invisible/visible depending on the content of the variable. The problem i am having is that they are always visible. What am i doing wrong?

http://dev.westhill.co.uk/Westhill_2006/services/websites.htm

just click on the right panel, websites and cd roms only. You will see the two random dots, I will place these later. I also have a text box to track the variable.

The as I have used is:

if (_root.tag==web){

this.g_active1._visible=true;
this.g_active2._visible=false;



} else if (_root.tag==cdrom){
this.g_active2._visible=false;
this.g_active2._visible=true;

}

If anyone can tell me what I should be writing that would be great!

Cheers

Bex

View Replies !    View Related
Passing Flash Variables To ASP
Hello everyone,

New problem, I even read other peoples posts. I am working on a program that would send a subject to an .asp form, but the subject line doesn't want to pass.

The code that I have in my flash program in the last frame is:
mySendVars = new LoadVars();
mySendVars.Subject = "Subject Line";
mySendVars.send("mail.asp", "_self", "POST");

It is to open the mail.asp form, which it does, but alas, no subject line.

The script that I have to accept the subject line is:
<% @Language = "VBScript" %>
<%
Option explicit
Response.Buffer= true
Response.Expires = -1441


Session("Email")=("myemail@myemail.com")
Session("Subject")

%>
<html>

<head>
<title><% Response.Write (Session("Subject")) %></title>
<link rel="stylesheet" type="text/css" href="l.css">

<script LANGUAGE="JavaScript">
code to process if the form is filled out properly
<p align="center">You have successfully completed the <% Response.Write (Session("Subject")) %>Program.
To do the evaluation<a href="otherprogram.asp">click here</a>.</p>

The evaluation also opens, but there is no subject line....which isn't a surprise if the subject variable isn't passing.

Any help would be appreciated!

Thank you all in advance!

View Replies !    View Related
Passing Variables From PHP To Flash
I have a contact form that works. The user enters their info, hits submit, and their info is emailed to me. I need to figure out how to have the PHP script send back a confirmation that the email was actually sent. I can't get the php to echo just a "yes" or "no". Here is what I have so far:

Flash code to bring in PHP variable to notify user if mail has been sent or not:

function receive_response(e:Event):void
{
var loader:URLLoader = URLLoader(e.target);
var email_status = new URLVariables(loader.data).success;

if(email_status == "yes")
{
status_txt.text = "Success! Your message was sent.";
timer = new Timer(500);
timer.addEventListener(TimerEvent.TIMER, on_timer);
timer.start();
}
else
{
status_txt.text = "Send failed! Please email or call us";
}
}


and here is my entire PHP Code. The code in bold at the bottom is where it is supposed to pass the "yes" or "no" as the variable success

<<meta http-equiv="content-type" content="text/html;charset=utf-8">
<?php

// Create local PHP variables from the info the user gave in the Flash form
$senderName = $_POST['userName'];
$senderEmail = $_POST['userEmail'];
$senderMessage = $_POST['userMsg'];

// Strip slashes on the Local variables
$senderName = stripslashes($senderName);
$senderEmail = stripslashes($senderEmail);
$senderMessage = stripslashes($senderMessage);



$to = "info@*******.com";
// change this to reflect your site
$from = "contact@*********.com";
$subject = "Contact from ***********.com";
//Begin HTML Email Message
$message = <<<EOF
<html>
<body bgcolor="#FFFFFF">
<b>Name</b> = $senderName<br /><br />
<b>Email</b> = <a href="mailto:$senderEmail">$senderEmail</a><br /><br />
<b>Message</b> = $senderMessage<br />
</body>
</html>
EOF;
//end of message
$headers = "From: $from
";
$headers .= "Content-type: text/html
";
$to = "$to";



if (mail($to, $subject, $message, $headers))
{
echo “success=yes”;
}

else
{
echo “success=no”;
}


exit();
?>


Thanks

View Replies !    View Related
Passing Variables To Flash
Hey Everybody,

I'm new here, but I've used the site many times for flash research, so I thought I'd do the right thing and join up.

I've been having an issue using the Passing Variables to Flash tutorial inside a single frame flash document. The document itself contains a MC that works using the Preloader & Transition of Dynamic Files tutorial. I have used the _x and _y properties to movie an image Inside each of the preloaded movies.

The code for the first frame of the document I am trying to pass the variable to, is as follows:

if (movie=="" or movie==1) {
_root.section = "image1.swf";
}
if (movie==2) {
_root.section = "image2.swf";
}
if (movie==3) {
_root.section = "image3.swf";
}
else {
_root.section = "image3.swf";
}

However, when the movie is run, the code will always go to the else, no matter what the parameter specified in the URL is. I can only assume this has something to do with the fact that it is looping on the first frame.

Thanks in advance,

dreeft.

View Replies !    View Related
Passing Variables Flash To Php
hi friends..

Please give me solution.

i am working with php and flash
my flash my.swf running in index.php

now i need to pass variables from my.swf to index.php without refreshing page. and dont want to open new page.

please help.

thanks in advance
mahesh

View Replies !    View Related
Passing Variables From Flash To PHP?
Hi

Ive, just finished the excellent Photo Gallery using XML and Flash tutorial.
I am having a problem implementing it into my site though.

I have a projects page which is dynamically generated using php mysql. I want to have just one photogallery flash file on this page which dynamically draws in the correct images for any given project.

At the moment Im half way there. So far I have passed a variable (the ID of a project ) to the flash movie using the following code in the HTML:

<object type="application/x-shockwave-flash" data="gallery.swf" height="400" width="300">
<param name="movie" value="gallery.swf" />
<param name="FlashVars" VALUE="<?php echo $projectid ?>">
</object>

I want Flash to then pass this variable to a php file that will then produce the correct xml for the flash file.

Basically what I want it to do in the AS is this:

xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("images_xml.php?projectid=VARIABLE-HERE");


the php file will then output correct xml for that project

Im not sure how the passing of the variable is done in this instance.
Can anyone help?

Cheers
Jimmy

View Replies !    View Related
Passing Php Variables To Flash
Hello!

I have been working on this issue awhile and am stumped... I have tried several forums and haven't gotten a response...

I need to pass the following php information into flash...


Quote:




<?php
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
$link = "<img src ="$mosConfig_live_site/images/comprofiler/tn";
$link_gallery = "<img src ="$mosConfig_live_site/images/comprofiler/";
$imagewidth = 76;
$imageheight = 76;
$setwidth = "width="$imagewidth"";
$setheight = "height="$imageheight"";
$limit == "20";
$number = " 20";

echo "<center><table><tr>
";
$query = "SELECT user_id,avatar,hits FROM #__comprofiler WHERE avatarapproved=1 AND avatar IS NOT NULL ORDER BY hits DESC LIMIT $number";
$database ->setQuery ($query);
$results = $database->loadObjectList();

foreach($results as $result){

if(preg_match('/(jpg)/',$result->avatar)){
$query_name = "SELECT id,username FROM #__users WHERE id = ".$result->user_id;
$database ->setQuery ($query_name);
$usernames = $database->loadObjectList();
foreach($usernames as $username){
?>

<?php
$profileName = $link.$result->avatar.""border="0" alt="member image"$setwidth$setheight/>
<br/>$username->username</a></div>$result->hits<hr/>
";}
$profile .= "<div align="center"><a href="index.php?option=com_comprofiler&task=u serProfile&user=".$result->user_id."">$profileName";}
}
echo $profile;
echo"</table>
</center>";
?>




This php script displays the top 20 users from a database based on their hit count. The script passes their avatar (image), username and link, as well as total hits.

I wanted to create a flash file with one movieclip that would parse the php file and display the results in an i++ fashion, so that I could make changes to only one mc instead of 20, when needed.

I have tried making a dynamic text field an mc, and assigning the loadvars object to that mc... but can't get any information to display... and I know the php file works like a charm.

I have been hitting my head against the wall with this problem for awhile now, and any help would be extremely appreciated!

View Replies !    View Related
Passing Variables From ASP To Flash
Hi all,
I Need to know how to pass the variable from ASP to Flash..
If anybody knows please explain with 1 example or give me the tutorial links

View Replies !    View Related
Passing Variables In Flash...
What is the best way to pass variables between 2 different flash files?

View Replies !    View Related
Passing Php Variables To Flash
Hi, I juse signed up today, I've been looking high and low for an answer to this problem for ages and I can't seem to get anything, basically I'm trying to send variables to flash from php and I can but the problem is that instead of showing the value of the variable, its name is shown instead.

This is the php code that sends to flash:

echo "&response=".$response;
echo "&username=".$username;

and this is the actionscrip which should receive it:

status1.text = data.response+" "+data.username;

(the loadvars variable i used to send and received the vars is called data).

I really hope someone can help because I need this for a project I'm doing after consulting numerous books, I've come up with nothing. PLEASE HELP!!

View Replies !    View Related
Passing Variables From Php To Flash
Hi there

I have a problem using a very simple URLVariables script with php
The thing is this sample do works on some servers and doesn't on other:
Instead of having the correct values with trace, I get the php code itself.
That means I get the following string in trace():
<?php
$myresult = $_POST['name'];
echo "the result is ".$myresult;
?>
Here is the php code file called with URLRequest by flash

Code:
<?php
$myresult = $_POST['name'];
echo "the result is ".$myresult;
?>
Here is the actionscript that should display "the result is: foo"

Code:
var urlLoader:URLLoader = new URLLoader();

var urlRequest:URLRequest = new URLRequest("call.php");
urlRequest.data = new URLVariables("name=foo");
urlRequest.method = URLRequestMethod.POST;

urlLoader.addEventListener(Event.COMPLETE, dataloaded);
urlLoader.load(urlRequest);

function dataloaded(e:Event):void
{
var myresult = (e.target as URLLoader).data;
trace(myresult);
}

I know it comes from the php configuration on my server because I tested it on another server and it works, but I cant find what I must change in my php.ini file to get the good results in trace();

Do you have any idea? thanks

View Replies !    View Related
Passing Variables From PHP To Flash
I have never had a problem passing variables from PHP to flash until now. The difference is that I'm trying to pass an IP Address.


Action Script 3:

var url:String = "http://localhost:8888/TheTest.php";
var request:URLRequest = new URLRequest(url);
request.method = URLRequestMethod.POST;//select the method as post
var loader:URLLoader = new URLLoader();
loader.addEventListener(Event.COMPLETE, handleComplete);
loader.load(request);//send the request with URLLoader()

function handleComplete(event:Event) {
var loader:URLLoader = URLLoader(event.target);
var vars:URLVariables = new URLVariables(loader.data);
//Access data from the PHP file
trace(vars.ip);
}

PHP:

<?php

$ip = $_SERVER['SERVER_ADDR'];
echo "ip=$ip";

?>

When I test it it traces ::1
However if in the php file I change it to the following code I traces 1022545 as it should.

<?php

echo "ip=1022545";

?>


I even tried to set the dataType in php:

<?php

$ip = $_SERVER['SERVER_ADDR'];
settype($ip,"string");
echo "ip="$ip";

?>

I'm not sure why it's different. If anyone can help me with this one I would appreciate it.

View Replies !    View Related
Passing Variables To Flash
Hey Everybody,

I'm new here, but I've used the site many times for flash research, so I thought I'd do the right thing and join up.

I've been having an issue using the Passing Variables to Flash tutorial inside a single frame flash document. The document itself contains a MC that works using the Preloader & Transition of Dynamic Files tutorial. I have used the _x and _y properties to movie an image Inside each of the preloaded movies.

The code for the first frame of the document I am trying to pass the variable to, is as follows:

if (movie=="" or movie==1) {
_root.section = "image1.swf";
}
if (movie==2) {
_root.section = "image2.swf";
}
if (movie==3) {
_root.section = "image3.swf";
}
else {
_root.section = "image3.swf";
}

However, when the movie is run, the code will always go to the else, no matter what the parameter specified in the URL is. I can only assume this has something to do with the fact that it is looping on the first frame.

Thanks in advance,

dreeft.

View Replies !    View Related
Passing Variables Flash To Php
hi friends..

Please give me solution.

i am working with php and flash
my flash my.swf running in index.php

now i need to pass variables from my.swf to index.php without refreshing page. and dont want to open new page.

please help.

thanks in advance
mahesh

View Replies !    View Related
Passing Variables From Flash To Php
I have created a Input text box in flash and embedded into an HTML page. What I want is, when I open the HTML page, the user inputs some text into that Input text box and then by clicking on a button called Save, it should display the contents of the Input text box onto a php page.

I have created a flash file and wrote the following action script for the save button:

mytext is the var that I have defined for the input text box

on (release)
{
this.mytext = this.mytext_txt.text;

getURL("save.php", "_blank", "GET");
}


And php code that Ihave written is:

$mytext= $_GET['mytext'];
print "The text is ". $mytext . ".";

Please help me where I am going wrong.

I am getting the output as :

The text is undefined



PLzzzzzzzzzzzzzz help!!!!!!!!!!!!!!

View Replies !    View Related
Passing Asp Variables Into Flash
hi im trying to pass variables from a database in asp into flash.
Im using loadvariablesnum(url,level,method) in flash but it wont pick up the values of the variables that i pass from my asp script.

the below script works


Code:

response.write ("&number=10&")



but wen i try passing a variable instead of the 10 flash doesnt pick it up.

i am using the code below to pass a variable from the database:


Code:

<%
Dim objConn
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.ConnectionString = "DSN=scoreboard"
objConn.Open
%>

<%
Dim SQL, SQL_RESULT
dim testv

SQL = "SELECT player FROM scores ORDER BY score DESC"
Set SQL_RESULT = Server.CreateObject("ADODB.Recordset")
SQL_RESULT.Open SQL, ObjConn

testv = (SQL_RESULT("player"))

response.write ("&number="&testv& "&")

SQL_RESULT.Close
%>



when i open the script in teh browser it produces the same output as the working script above.

please if anyone can help.

View Replies !    View Related
Copyright 2005-08 www.BigResource.com, All rights reserved