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




[F8] Send Vars To PHP



I have the following in my F8 AS 2.0:


PHP Code:



getURL("email.php?sName=" + _root.form.contactName.text +
               "&subject=" + _root.form.contactSubject.getSelectedItem().data +
               "&email=" + _root.form.contactEmail.text +
               "&message=" + _root.form.contactEmail.text,"_blank","POST");






and this in my php:

PHP Code:



$name = $_POST['sName'];
    $email = $_POST['email'];
    $subject = $_POST['subject'];
    $message = $_POST['message"'];





but when I echo teh variable names, I get noghing.



FlashKit > Flash Help > Flash ActionScript
Posted on: 08-23-2007, 05:20 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

POLL: Best AS3 Send Vars And Load Vars Method
Hi Guys,

Can you help me decide which way to go with as3 to php and back again.

I generally use sqlite, xml or mysql for a database. I don't know if that matters. And sometimes (rarely) I don't use a database at all.

In the past (with as2) I always went custom. Im not sure If id be better off doing something else.

If you have another suggestion please let me know.

Send Vars To Another Swf?
Hello guys. Although i am an old timer of fk i never posted enough messages to be known around...
anyway, to my thoughts.

I have a movie, which contains the main site. In this movie, i have an email form, which communicated with the formmail script.
As many of you probably know, formmail has the option to send your visitor to any page you want after the emai has been sent.
Handy for custom output pages!
BUT, here is my thoughts. How can i send the NAME variable to the second swf file, located to another html page (or even loaded by itself in the new window- without the html) so i can have a dynamic textfield that prints the sender's name?

Lets explain that better:
1) You (john doe) decide to send me an email. You send the message using the form, having typed 'JOHN DOE' as your name in the name text field.
2) After the message is sent, a popup window loads a swf document, either alone or embedded in html (i dont care) to inform the user that the message has been sent.
3) A text field outputs something like this : 'THANKS JOHN DOE FOR SENDING EMAIL TO US'.

thats the tricky part.
If anyone can help me send this variable to the other swf, it would be great!
Thanks
George

CANT SEND VARS:(
Hey guys, I really appreciate the help that you provide for everyone on here. It is always curteous and thurough. I would appreciate any help you can provide me with. Here is the situation:
I am trying to pass vars through my swf to an asp page, to have them saved to an mdb. I have declared me vars, my asp page seems correct , as it opens the database, I just dont get any info in my mbd fields It auto numbers a new row every time i submit info, I just dont see the results in the fields.

I am using this code for submission:
on (press) {
formData = new LoadVars();
formData.name = "";
formData.date = "";
formData.wo = "";
formData.info = "";
loadVariablesNum("processForm2.asp", 2, "POST");
}

PLEASE HELP. This project is due in 4 days. Thanks!
Cam
p.s. I am also using 3 comboboxes, but I havent plugged in vars to those yet... simply because I cant figure out how.
thanks for any ideas!

Can't Send VARS:(
Hey guys, I really appreciate the help that you provide for everyone on here. It is always curteous and thurough. I would appreciate any help you can provide me with. Here is the situation:
I am trying to pass vars through my swf to an asp page, to have them saved to an mdb. I have declared me vars, my asp page seems correct , as it opens the database, I just dont get any info in my mbd fields It auto numbers a new row every time i submit info, I just dont see the results in the fields.

I am using this code for submission:
on (press) {
formData = new LoadVars();
formData.name = "";
formData.date = "";
formData.wo = "";
formData.info = "";
loadVariablesNum("processForm2.asp", 2, "POST");
}

PLEASE HELP. This project is due in 4 days. Thanks!
Cam
p.s. I am also using 3 comboboxes, but I havent plugged in vars to those yet... simply because I cant figure out how.
thanks for any ideas!

Send Vars To Php
hi have just been looking for a simple solution to send vars to php.
I have found a lot of threads that have problems but no results.
I hope that someone can give me a quick fix..
or is this just a mission.

cheers brndn

Code:
send_button.onPress = function() {
form.sendAndLoad("email.php", "POST");
trace(form);
}

stop();

var form:LoadVars = new LoadVars();
form.namer = "brndn";
form.messager = "hi";
form.emailer = "me";

CANT SEND VARS:(
Hey guys, I really appreciate the help that you provide for everyone on here. It is always curteous and thurough. I would appreciate any help you can provide me with. Here is the situation:
I am trying to pass vars through my swf to an asp page, to have them saved to an mdb. I have declared me vars, my asp page seems correct , as it opens the database, I just dont get any info in my mbd fields It auto numbers a new row every time i submit info, I just dont see the results in the fields.

I am using this code for submission:
on (press) {
formData = new LoadVars();
formData.name = "";
formData.date = "";
formData.wo = "";
formData.info = "";
loadVariablesNum("processForm2.asp", 2, "POST");
}

PLEASE HELP. This project is due in 4 days. Thanks!
Cam
p.s. I am also using 3 comboboxes, but I havent plugged in vars to those yet... simply because I cant figure out how.
thanks for any ideas!

Send Vars To Parent From A Swf In A Pop Up
I can't seem to get the syntax right to target back to my parent window with vars I put into a Load Vars object. Can ne one help??

I set my vars object here:

Code:
Dates = new loadVars();
Dates.StartDate = _root.MyStartDate;
Dates.EndDate = _root.MyEndDate;


I know this is wrong but here is my trouble is, I TRY to send it to the parent window.

Code:
function onSubmit() {
Dates.send("index.cfm", "parent", "Post");
}


I can get it to open it in a new window or in itself but not back to the parent window...


BTW this is in FlashMX
Thanks for any help.

Can I Send Vars To Excel?
I'm creating an experiment for my cognitive research group, and I'm creating a projector file to collect data from subjects. I want to have a subject answer questions, and send the data to either a text file or preferably an Excel spreadsheet.

Can someone point me in the right direction? I guess it would use the same principle as an online guestbook, but I just need the variables sent to a local spreadsheet/text file on the hard drive.

Thanks for any input.

Send Vars Problem
i've a send vars problem, on a button i've got the follow script
code: on (release) {
sendVars = new LoadVars();
sendVars.inputid = '1';
sendVars.onLoad = function() {

};
sendVars.send("test.php", "_blank","POST");
}


in the php file i am testing if the var is sent just has


PHP Code:



<?php echo $inputid ?>




the thing is that nothing gets echo'd out in the php window

Actionscript: Send Vars To CGI
this time in actionscript:

i need to send few vars including e-mail address into cgi form.
the cgi demands a long sentance that include also "" marks.
for ex: <input type=hidden value="mail@address.com">
to set a var i need to use also " " marks.
what makes flash get out of use and it will look :
"input type=hidden value="mail@address.com">", what flash
can not take ...

how can i solve it ?

Best Regards.
the form is located at: http://www.netvision.net.il/cgi-bin/mailto.cgi

Send Vars - Quick Help Please
i am able to communicate with a server script using send or send and load
but when i test in a browser, it actually goes to this page which doesnt display anything

how do i make it send to this file but not actually go there?

thanks

Send Vars URL Too Long -- HELP
I'm sending xml text to a php page so that it saves that text into an xml file using URLVariables.. It was working, but now, when I send it, in the html file on the status bar it says error, and in the safari activity it says it couldn't load because the url is too long...

Anyone know why/how to fix this??

Thanks!

Send And Load Vars
I have been trying to get get a variable from the server but its just not working for me.


Code:

var listener:Object = new Object();

listener.onSelect = function(file:FileReference):Void {


if (!file.upload("http://www.xxxx.com/printCards/uploadPhoto.aspx")) {
trace("Upload dialog failed to open.");
tester.text = "Upload dialog failed to open.";
} else {


////
request = new LoadVars();
result_lv = new LoadVars();
result_lv.onLoad = 1;
date = new Date();
request.sendAndLoad("http://www.xxxx.com/printCards/lastPhotoUpload.aspx?noCache="+date.getTime(),result_lv,"post");
objResultss = result_lv.resultss;
/////
tester.text = objResultss+" "+file.name;
//objResultss = undefind
}
};




on http://www.xxxx.com/printCards/lastPhotoUpload.aspx


Code:
resultss=userImages/1000/00/10000035_613200810385.jpg

I Can Send Vars To Php But Not Load
My AS2 script:

var sen = new LoadVars();
sen.nam = "mycont";
sen.wor = "test";
myvar = sen.wor;

And I got a button with the script:
on (release){
_root.sen.sendAndLoad("this.php", _root.sen, "POST");
}

And a textbox with the var "myvar".

My PHP content is:
<?php
$myf = "that.html";
$cont = $_POST['nam'];
$write = fopen($myf,"w+");
$wor = fread($write, filesize($myf));
$vars = "wor=" . $wor ;
echo $vars;
fwrite($write, $cont);
fclose($write);
?>

When running it the send is succesfull because I can see that it edits my file.

But nothing is get into my textbox.

Whan is the problem? I try to fix it two hours already.

Thank yo for your help...

Help Me Send Vars From Flash To Php
I'm trying to send one variable from flash to php and the see it again in flash but still can't get it work

here is my FLA

and the php code is exactly like this:


PHP Code:



<?php


// Receiving the variables.
$nome1 = $_POST['estados'];


// Printing out the variables.
print "&nome2= $name1";

?>




Thanks for any help

Send Vars Then Retreive
Hi, i was wondering how you would send some vars to a php page from flash, the php does something, then flash retrevies the answer??

like a calculator for instance.

i dont know where to go!!

::php code::

<?php
//calc test
$n1 = $HTTP_POST_VARS[num1];
$n2 = $HTTP_POST_VARS[num2];

$res = $n1 + n2;

echo "&res=".$res;
?>

flash .fla
http://webrevolt.tycooneden.com/gaming/calc.fla

im stuck

PS, whats the difference between print & echo?

and whats printf and the like do??




Thanx

Martin

Computing help and info:

http://webrevolt.tycooneden.com

Send Vars Problem
Hi, i have the following code, but it doesn't seem to be working. can anyone tell me why??

code for movieclip:
CODEonClipEvent (enterFrame) {
    if (Key.isDown(Key.UP)) {
        this._y -= _root.speed;
        _root.sendPosition(this._x, this._y);
    }
}

Send Vars To A Site..
Hi...Almost happy newyear

I want to open a site from a link in an email, and send vars with it at the same time. I guess this should be done by POST, and php...but what i want to know is: how do I get the to be opened flashfile to read the sended vars?

Never done anything like this..

thnx..

Send Vars From FLASH To PHP
Ok, i'm trying to make a flash form that will submit it's data to a php page. Then the php page will submit it to a database. I've done hundreds of php/mysql databases so i know that part it correct. I've even made an html form to test, and the php and mysql are working correctly. The part I can't seem to get right is the flash.

Ok, I made 3 Input Text boxes and gave them var names of:
firstname
lastname
email

I then made a button and gave it this code:


Code:


on (press, keyPress "<Enter>")
{
loadVariables("insert.php", "GET");
}



When I press the button, it says sending information in the status bar of the browser and doesnt change, BUT it does insert a blank record into the database. Here's my insert.php:


Code:


<?php require_once('Connections/flash.php'); ?>
<?php

mysql_select_db($database_flash, $flash);
$query = "INSERT INTO auth (first,last,email) VALUES ('$firstname','$lastname','$email')";
$result = mysql_query($query) or die(mysql_error());
?>



I've tried changing the var names in php to $_GET[] and i've tried using POST but same results. Any input or need more info?

Send Vars To Txt File?
I can load variables from a text file easily enough. But can I send new vaiables back to the text file to replace the old ones, or need I turn to databases?

Forcing POST To Send Specified Vars?
There are several http calls that my application makes that requires authorization data to be passed back to the server. This data is located in an authorization object. i currently have a string that appends to the http request but i'd like to know if there is a way to tell POST to send only certain variables, i'd just like to avoid having the auth info passed through as a url string.

Can't Send Vars Frrom Swf's In Frameset
I have a movie that I'm trying to send a bunch of variables to a php script from. It works fine when simply embedded in a web doc, but as soon as I put it in a frameset (necessary unfortunately) it doesn't work. The php page comes up, but none of the variables seem to transfer.

This is the line I'm using to send the variables:

printResults.send("printLayout.php","_blank","POST ")

It's intended to take a bunch of info and create a page that is formatted for printing.

Again, works fine when directly embedded in the base page, but in a frameset it fails. Does anyone have any way to work around this???

Deadline today, client already getting dodgy, need help!

Thanks,

Dan

How To Send Vars To ASP Session Object
hi all,

i want to send a variable from flash to an ASP page while clicking a button in flash, using the session object in ASP.

in the ASP, i have the Session("myVar")="null"

now, when i push the button in flash, i want to change the Session("myVar") to "one".

i tried using

myClip.myVar = one;
myClip.send("URL of ASP page"), but this doesn't work.

any ideas?

Send Vars To Attached Movieclip
hi peeps. its been a while since i've posted on flashkit but im REALLY stuck.

I'm jus doing a thing jus for a bit of fun like the computer shell thing. Like start menu, taskbar etc in flash. Well once i've opened a new 'window' (attached it) i cant seem to send variables to and from it. This is the code i have got on a button that 'opens' the windows (attachs the 'window' movieclip):

code:
on (press) {
num ++;
//blank is just a blank movieclip
blank.attachMovie( 'window', 'window'+num, num );
//this bit works ok.
wname = 'window'+num;
//this bit wont work. There's a dynamic textbox in the new movieclip called 'myname' just to see if it displays the name of the window....
wname.myname = 'window'+num;
}



please can somebody help, as im COMPLETELY stuck!!




?


jag

Q: Send Vars From Flash To Page And Then Go There
I have a Flash header on a website. When you click a button I want to go to that page but also send variables to it so they display dynamically depending on what button you press. I'm having problems figuring out how to do it.

I pretty much want to take the variable, myVar, send that to test.php, and then go to test.php and have the variable there.

The only thing I want to avoid is adding the variable to the end of my URL and accessing it via GET.

Any ideas? Thank you!

Send Vars From JavaScript TO Flash 6
Is there any simple way to do this?

http://blog.deconcept.com/swfobject/

I've use swfObject which works amazing, but is not compatible with the PSP. I just need to be able send 1 var to flash using JavaScript.


Code:
<script type="text/javascript">
// <![CDATA[
function changeFlashPage(pageNumber){
//load flash
// pass variable to flash
// write flash to HTML
}

changeFlashPage(0);
// ]]>

</script>

Send & Load Vars Problem In IE
Hi everyone, I am doing my dynamic image gallery where the user type the url. with the help of the scrapping methods in php it fetches images and store it as a XML file eg: gallery.xml then i am fetching the images from gallery.xml and displaying it in flash as a gallery. I am using send & load Vars method for sending and loading the images. My code is as below


Code:
var send_lv:LoadVars = new LoadVars();
var result_lv:LoadVars = new LoadVars();
send_lv.name = name;
//trace("hi");
send_lv.sendAndLoad("http://www.wikivideo.com/MEDIA/scrap_links1.php",result_lv,"POST");


result_lv.onLoad = function(success:Boolean) {
if (success) {
//trace("hi")
xmlData.load("http://www.wikivideo.com/MEDIA/gallery.xml");
// myPhoto.load("http://www.wikivideo.com/MEDIA/gallery.xml");

}
};
In Mozilla, there is no issues, but in IE 6.0 i am typing the url it display the images in the gallery, when i am typing a different url again it shows the same previous images result and not the new ones. My applicaton is working perfectly in Mozilla and Safari but not in IE6.0 , Pls help me out of this problem and To see my Application in action please visit http://www.wikivideo.com/MEDIA/Media_new.html and then goto the images tab, then go to the url tab then type the url and hit the search button which populates some images please type in this format: http://www.youtube.com and as for now please type the you tube url only and then type a different url ex: http://www.yahoo.com, it populates different images respective to the yahoo site in Mozilla and Safari but in IE 6.0 it shows the previous searched images that is you tube images, please check and try to help me out of this issues
Advance thanks for ur help!

Send Vars From Frameset To New Window
hello.
i'm trying to pass a number of variables out of flash to a new window, where PHP will receive and process the vars.

it works successfully when sending from a stand alone PHP page.

however, due to client reasons, the PHP sending page needs to be nested into a frameset. when the sending PHP is inside a frameset, all the variables are stripped out before arriving at the receiving PHP.

here's my AS:
varstoWrite.variable1 = var1;
...
varstoWrite.variable20 = var20;
varstoWrite.send("FOLDER/receiving.php", "_blank", "POST");


i'd appreciate any help, or just confirmation of this as a known bug...

if found a few other people w/ the same problem, but no one has posted a solution:
http://www.actionscript.org/forums/a...3/t-80148.html
http://www.actionscript.org/forums/s...eset+variables
http://board.flashkit.com/board/showthread.php?t=425647

Send Vars From Frameset To New Window
hello.
i'm trying to pass a number of variables out of flash to a new window, where PHP will receive and process the vars.

it works successfully when sending from a stand alone PHP page.

however, due to client reasons, the PHP sending page needs to be nested into a frameset. when the sending PHP is inside a frameset, all the variables are stripped out before arriving at the receiving PHP.

here's my AS:
varstoWrite.variable1 = var1;
...
varstoWrite.variable20 = var20;
varstoWrite.send("FOLDER/receiving.php", "_blank", "POST");


i'd appreciate any help, or just confirmation of this as a known bug...

if found a few other people w/ the same problem, but no one has posted a solution:
http://www.actionscript.org/forums/archive/index.php3/t-80148.html
http://www.actionscript.org/forums/showthread.php3?t=77228&highlight=frameset+variables
http://board.flashkit.com/board/showthread.php?t=425647

Send & Load Vars Problem In IE
Hi everyone, I am doing my dynamic image gallery where the user type the url. with the help of the scrapping methods in php it fetches images and store it as a XML file eg: gallery.xml then i am fetching the images from gallery.xml and displaying it in flash as a gallery. I am using send & load Vars method for sending and loading the images. My code is as below


Code:
var send_lv:LoadVars = new LoadVars();
var result_lv:LoadVars = new LoadVars();
send_lv.name = name;
// trace("hi");
send_lv.sendAndLoad("http://www.wikivideo.com/MEDIA/scrap_links1.php",result_lv,"POST");


result_lv.onLoad = function(success:Boolean) {
if (success) {
//trace("hi")
xmlData.load("http://www.wikivideo.com/MEDIA/gallery.xml");
// myPhoto.load("http://www.wikivideo.com/MEDIA/gallery.xml");

}
};
In Mozilla, there is no issues, but in IE 6.0 i am typing the url it display the images in the gallery, when i am typing a different url again it shows the same previous images result and not the new ones. My applicaton is working perfectly in Mozilla and Safari but not in IE6.0 , Pls help me out of this problem and To see my Application in action please visit http://www.wikivideo.com/MEDIA/Media_new.html and then goto the images tab, then go to the url tab then type the url and hit the search button which populates some images please type in this format: http://www.youtube.com and as for now please type the you tube url only and then type a different url ex: http://www.yahoo.com, it populates different images respective to the yahoo site in Mozilla and Safari but in IE 6.0 it shows the previous searched images that is you tube images, please check and try to help me out of this issues
Advance thanks for ur help!

Q: Send Vars From Flash To Page And Then Go There
I have a Flash header on a website. When you click a button I want to go to that page but also send variables to it so they display dynamically depending on what button you press. I'm having problems figuring out how to do it.

I pretty much want to take the variable, myVar, send that to test.php, and then go to test.php and have the variable there.

The only thing I want to avoid is adding the variable to the end of my URL and accessing it via GET.

Any ideas? Thank you!

Load Send Vars HELP1
I have 2 moveis.
main.swf and contact.swf
main load contact as built in movie.
in contact.swf i have mail form. Problem is:
When i publish contact.swf - i can send variables to script (mail.php),
but when i run it from main.swf - i cant send. _root dont see variables.
What to do? what is wrong?

Here is a code:

if (String(name) == "") {
yes._alpha = 0;
no._alpha = 100;
} else {
if (String(company) == "") {
yes._alpha = 0;
no._alpha = 100;
} else {
if (String(phone) == "" && String(email) == "") {
yes._alpha = 0;
no._alpha = 100;
} else {
if (String(message) == "") {
yes._alpha = 0;
no._alpha = 100;
} else {
no._alpha = 0;
yes._alpha = 100;
myLoadVars = new LoadVars();
myLoadVars.name = name;
myLoadVars.company = company;
myLoadVars.phone = phone;
myLoadVars.email = email;
myLoadVars.message = message;

myLoadVars.send("http://localhost/scripts/mail.php", "POST");
;
}
}



Please, please PLEASE. HELP! Send me all answers to xenao@mail.ru

MANY MANY THANKS!!!!

[MX04] Vars.send Stopped By Pop Up Blocker
The code below causes IE7's and Firefox's pop up blocker to trigger. I don't so much care that 'Information Bar' appears in IE, allowing the user to either allow or keep blocking pop ups from my site, what I have a problem with is that if the user right clicks the 'Information Bar' and chooses 'allow popup' then my swf reloads taking the user back to the homepage! With firefox, when the user clicks 'allow popup' the swf does not reload, which is what I want for IE.


Code:
home.SubmitPaypal.onRelease = function():Void{
Vars.send("https://www.paypal.com/cgi-bin/webscr", "_blank", "POST");
}
Thanks.

Using The Post Method To Send Vars To Php Actually Sends Get ?
Ok i have a site where people can send large amounts of text through to a mysql db from flash it goes from flash to php to mysql. here is the flash code

Code:
var senderLoad = new LoadVars();
sender.onRelease = function()
{

senderLoad.theName = testiname.text;
senderLoad.theEmail = testiloc.text;
senderLoad.theMessage = testimsg.text;
senderLoad.objtype = "testimonial";
trace("Sending... " + senderLoad.theName + " " + senderLoad.theEmail);
senderLoad.send("sendflash.php",senderLoad,"POST");



}
Now this all goes to the sendflash.php which gets the variables using the $var=$_GET['theName']; etc. Yes that is Get but in my code i have POST for some reson it is not sent POST ?? but get i can see it in my browser after i hit the sender button it makes all the vars go into the url. Why dose it do this ? as you all already know sending large amounts of text through the get method is not a very good way to go about things anyone know why this code works this way ? I have tried putting get into the actionscript and i think if memory serves it didnt post anything ??
thanks in advance

oh if it helps the original tutorial where i got this code was from gotoandlearn it had a senderLoad.sendAndLoad("sendflash.php",receiveLoad ); this dose not even pass the variables for some reason i even tried all the original code with the original php file he supplied in the tutorial and it just sent blanks to php. It was a send email form so i made it work the only way i could get it to and made it into a insert message to db form.

Send Vars Securely And Safely To Php MySQl Db
Hi all,

i was making a game in flash that sends the final score to a db threw php mySQL. But since i know that flash actionscript can be red i need a safe way to send data to my php.

anyone know how to achieve this ?

thx a lot
!

Geturl Failing To Send _root Vars
hey everyone! :)

lets see, goes like this ( deep breath...)

a pop up with an iframe with another iframe with an instance of geoff stearns swfobject embed that embeds a preloader that loads in a bigger swf which does a bunch of stuff before putting a bunch of vars on the _root (plus backup duplicates on the mc in the preloader that the main bigger swf loaded into) and then FINALLY runs this not especially complicated line:

getURL( destination, "_self", "POST" );

destination in this case being a relative url with a few GET params on the end. for example:

/bagpussy/web/publish_test/lmf/new/section0?media=43&mfopath=adaptamation/web/Browsable%20Gallery/Test/CrocSnot/menuPRE_CrocSnot.swf&mode=writeback&verb=edit&z=f.swf

when we get to this url... there are no POST params. all we get are the few GET params in the URL shown in the above url.

any ideas why people? :)

Send Flash Vars To Popup ASP Window
how can I send data from a flash webpage to an ASP page which has to open in a popup window.

I can do them both seperatly, but how to integrate those 2 in 1....

Here's my script...


Attach Code

function PlaceOrder(){

SEND DATA TO MY ASP PAGE

var oFTransmit:LoadVars = new LoadVars();

oFTransmit.lang = _level0.languague;
oFTransmit.firstname_sender = _root.form_tofriends_mc.firstname_sender_txt.text;
oFTransmit.name_sender = _root.form_tofriends_mc.name_sender_txt.text;
oFTransmit.email_sender = _root.form_tofriends_mc.email_sender_txt.text;
oFTransmit.firstname_receiver1 = _root.form_tofriends_mc.firstname_receiver1_txt.text;
oFTransmit.email_receiver1 = _root.form_tofriends_mc.email_receiver1_txt.text;
oFTransmit.firstname_receiver2 = _root.form_tofriends_mc.firstname_receiver2_txt.text;
oFTransmit.email_receiver2 = _root.form_tofriends_mc.email_receiver2_txt.text;
oFTransmit.firstname_receiver3 = _root.form_tofriends_mc.firstname_receiver3_txt.text;
oFTransmit.email_receiver3 = _root.form_tofriends_mc.email_receiver3_txt.text;


oFTransmit.send("

Send Vars To External Text File
hi,

Can I send variables from flash movie to external text file.

For example:

I have one Flash file: in that I have a text field with instance name "content" . I will load some text from the external text file which has got the varialbe name "content".

Now my doubt:

in flash movie if I type some text in the text field and click on the button, can I send this text to the external text file?

is there any way of doing it by using pure inbuilt scripts of flash without the combination of coldfusion or javascript.

Thanking you,
Prathap

Send Vars To External Text File
hi,

Can I send variables from flash movie to external text file.

For example:

I have one Flash file: in that I have a text field with instance name "content" . I will load some text from the external text file which has got the varialbe name "content".

Now my doubt:

in flash movie if I type some text in the text field and click on the button, can I send this text to the external text file?

is there any way of doing it by using pure inbuilt scripts of flash without the combination of coldfusion or javascript.

Thanking you,
Prathap

Send Vars & Redirect Broweser To Php Page
Hi,

I need to send 3 variables from flash to a php page, for which ive seen plenty of explanations, but I need something slightly different.

I need to send some variables from flash to a php page, but at this point I want the browser to redirect to the php page to process payments/send emails etc.

Ive tried using
loadvariables("getvars.php","POST")
getURL("getvars.php")

but no joy....
With asp i would load the vars into a page which then loads those variable into session variable so when i redirect i can still access the data. (but this didnt work too well).

Any help would be most appreciated.
Cheers

Send.Vars To Server To Update Database - No Worky
I am trying to update a count in a database by using the send or sendAndLoad method to a ColdFusion script.

This script will not work in "stealth" or "silent" mode. Meaning whenever a browser window IS NOT opened, the CF script is not acted upon therefore not updating the database count.

However, anytime i ask flash to open up a blank window, the script works fine.

Any help on getting this script to work (and update the database count) without having to open up a browser window would be muchly appreciated

Thanks.

Converting ALL Vars Of A Clip To Global Vars -possible?
I wonder if it is possible to convert ALL variables set within a movie clip to global variables, using a self-defined prototype like movieclip.varsToGlobal or something like that. Here's the code I tried:


Code:
for (z in this) {
if (typeof (this[z]) != "movieclip") {
eval("_root."+z) = eval(z);
}
}


This seems to work, it copies ALL items found in the clip (excepted movie clips) to the root. But I am not sure WHAT things are duplicated to the root exactly. Just the variables? Or anything else I don't expect?

Mike
x-pressive.com

Local Vars Versus Class Vars
Hey guys, if a function gets call alot of times, such as a collision detection function in a game, will it be quicker to run if the variables for the function are declared and initialised outside the function as class variables? Or should they are declared and initialise inside the function as local variables everytime it is called, for good software engineering?

Usig Buttons To: Send Me An E-mail / Send Data From A Feedback Form?
As the title may suggest, i need some way of making an email button, and also feedback form buttons; both submit and reset. i thought this would be fairly standard stuff but didnt get any answers in the general help forum... its all for the last page of my site at www.geocities.com/jamesmbrannan if you would like to take a look

thx for any help/ advice
lev

How To Send To Send An Action Between Browser Frames
my doubt may look silly. but pls help me.

I have a left frame with a swf movie containing buttons. And when when I click the buttons I want the movie in the right frame to go and play a particular frame.

how do I do this?

Send Real Fax/send Pdf In Mail, Using Flash
Hi, I am a moderate flash designer and mostly make animations. I don't work with actionscript too much so I really need your guys' help. I need 2 things.

First: I am making an internet fax demo where I want someone to enter their email in a simple text box, click send, and it will email a pdf document to the email address (a sample fax).

Second: In the same demo, there will be another text box, where a user would enter a fax number, hit send, and it will fax them the pdf (or the stuff in the pdf in any other format) to their fax machine.

is this doable using flash? I don't even mind if i have to use a php or a xml file. but in that case, i also want to know what to write in the actionscript to call those files.

I would really appreciate if someone could please help me out with this. I had been searching all night, i found some actionscripts but have no clue what they mean.

LoadVars.send Doesn't Send..
Hi people, It's a LONG time since my last Flash application, I'm just catching up.
I'm trying to build a Flash "driver" for a serverless chat client (this means I'm making it work with a database and a php script, but no socket server, as I don't have the money to have such a hosting that let's me use one).

Anyway, what I'm trying to do is to get Flash to query the php script, sending some data (like channel id, user id etc..) and retrieve the new messages.

I have debugged the php script and I can assure the problem is not there.
The script prints whatever request arguments it recieves into comments in the response page.

What I'm doing in flash is:

code:
Request = new LoadVars();
Request.my_var = "foo";
Request.send("http://blablabla....php", "_blank", "POST");


The darn thing doesn't send anything to the php script.
I've already seen that it is possible to add variables to the url string, and they get passed to the script, but I don't want to get so dirty...plus I want to use POST, because of potentially long messages being passed.

Does anyone know anything about this?

Gosh I have it when Flash comes to such stupid problems.
Php rules!

If I don't get it right within a few hours, I'll just build the whole thing in Javascript. I just don't want to have to build it for each and every browser on the web...

Cheers!

Send Xml 2 Class >>> Send Result 2 Swf
Hello, I am actually discovering Classes.
I try to make a class that reads out an XML file and than converts it into arrays.
the array is well created in the class file, but I can't send it back to the swf correctly: it only duplicates the first item of the array in an infinite loop, but when I trace it into the class the output displays it right..
Can someone help me with this issue?

with this code I call the class:

Code:
var myProduct:Product = new Product("gallery.xml");
this.onEnterFrame = function() {
trace(myProduct.getArray());
if (myProduct.getArray() != undefined) {
delete this.onEnterFrame;
}
};
and this is the class I use:

Code:
class Product {
public var productsXml:XML;
public var catArray:Array = new Array();
public var myArr:Array = new Array();
function Product(targetXmlStr:String) {
var thisObj:Product = this;
var prodXml:XML = new XML();
prodXml.ignoreWhite = true;
prodXml.onLoad = function(success:Boolean) {
if (success) {
thisObj.productsXml = this;
thisObj.getArray();
} else {
trace("error loading XML");
}
};
prodXml.load(targetXmlStr);
}
function getArray() {
var i:Number;
var j:Number;
var fNnum:Number = this.productsXml.firstChild.childNodes.length;
var mItemArray:Array = new Array();
for (i=0; i<fNnum; i++) {
var itNum:Number = this.productsXml.firstChild.childNodes[i].childNodes.length;
catArray.push(this.productsXml.firstChild.childNodes[i].attributes.name);
mItemArray.push(this["itemArray"+i]=new Array());
for (j=0; j<itNum; j++) {
var titleName:String = this.productsXml.firstChild.childNodes[i].childNodes[j].attributes.title;
var picPathName:String = this.productsXml.firstChild.childNodes[i].childNodes[j].attributes.main;
var thumbPathName:String = this.productsXml.firstChild.childNodes[i].childNodes[j].attributes.thmb;
mItemArray[i].push({tit:titleName, pic:picPathName, thumb:thumbPathName});
if (j == itNum-1) {
return catArray.length
}
//if
}
//for
}
//for
}

}

Page 2 - LoadVars.send Won't Send
It occurs to me that 'send' is not as useful and rarely better to use than 'sendAndLoad'. Even if you do not intend to use any returned variables, the 'sendAndLoad' method will notify Flash that your server side script has processed the information correctly.

Just check this commented code out and I think you will agree this is much better...


Code:


// Success/Failure function sends user on to new frame when called
test = function (success){
if (success){
gotoAndPlay("loaded");}
else{
gotoAndPlay("failed");
}
};

update=new LoadVars(); // create new LoadVars object called 'update'
update.data="value"; // assign the variable 'data' to the new LoadVars object
update.onLoad=test; // call the test function when the transfer is complete
update.sendAndLoad("update.php", reply, "POST"); // begin the transfer
stop(); // stop the movie (continues on calling the 'test' function)



In my example above is the 'sendAndLoad' line:

update.sendAndLoad("update.php", reply, "POST");

1. 'update.sendAndLoad' sends our 'update' LoadVars object.
2. 'update.php' is our script.
3. 'reply' is the LoadVars object any results will be returned in.
4. 'POST' is our method.

...as you can see, if the script processes the data correctly it will return a successful operation to Flash, where you can then continue your movie. It will also return a non-successful operation and allow you to forward to a Flash frame with some form of error message (which I think should be a requirement of any data transfer).


That would be the best advice I could offer, but if you are adamant about using just a 'send' command... try using your LoadVars object instead of a window target, as I think its is very odd the same object is apparently using different methods...

data.send("save2.pl", data, "POST");

Yeah, btw surely its 'POST' not 'GET' ...some data send/load objects will not work with the 'GET' method, so its wise to stick to 'POST' unless its necessary not too.

Copyright © 2005-08 www.BigResource.com, All rights reserved