Send Info To Paypal
i made a shopping cart in flash that adds all the items.everything works perfect. now i need to send all the items to the paypal checkout page. for the customer to fill out there info. how do i do this? when i emailed paypal they gave me HTML code and told me to eddit it to work in flash. i tryed everything and im not getting anywhere. here is the code thy gave me. please see if you can help me.thank you...
<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post"> <input type="hidden" name="cmd" value="_cart"> <input type="hidden" name="business" value="stingweb@hotmail.com"> <input type="hidden" name="item_name" value="Bookshelf"> <input type="hidden" name="amount" value="50.00"> <input type="hidden" name="no_note" value="1"> <input type="hidden" name="currency_code" value="USD"> <input type="image" src="https://www.paypal.com/images/x-click-but22.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!"> <input type="hidden" name="add" value="1"> </form>
FlashKit > Flash Help > Flash General Help
Posted on: 09-26-2003, 01:19 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Send Info To Paypal
i made a shopping cart in flash that adds all the items.everything works perfect. now i need to send all the items to the paypal checkout page. for the customer to fill out there info. how do i do this? when i emailed paypal they gave me HTML code and told me to eddit it to work in flash. i tryed everything and im not getting anywhere. here is the code thy gave me. please see if you can help me.thank you...
<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="business" value="stingweb@hotmail.com">
<input type="hidden" name="item_name" value="Bookshelf">
<input type="hidden" name="amount" value="50.00">
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="currency_code" value="USD">
<input type="image" src="https://www.paypal.com/images/x-click-but22.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
<input type="hidden" name="add" value="1">
</form>
Passing Info To Paypal
I am trying to pass hidden variables to Paypal. When I use the getURL and Post to send the info, I get a login page from Paypal.
Additionally, when I try and create a var called add = "1", I get the following error:
Identifier expected var add = "1";
Below is the code I am using. What am I doing wrong?
on (release) {
getURL("https://www.paypal.com/cgi-bin/webscr", "_blank", "POST");
var cmd = "cart";
var business = "palms@mailsnare.net";
var undefined_quantity = "1";
var item_name = "Drivin CD";
var item_number = "FRCD-004";
var amount = "13.50";
var currency_code = "USD";
var lc = "US";
var add = "1";
}
Any help would prevent me from pulling out any additional hair.
Thanks
Rick
Passing Info To Paypal
I am making a site that sells T-Shirts in Flash 8. I am using Paypal as the payment method. How can I make it so the user gets to pick the color and the size and then send that information to Paypal? So when we see an order has been placed, we will also know the color and size that they ordered.
Here is the current code on my Paypal "buy now" button:
Code:
on(release){
var paypalObj = new Object();
paypalObj["add"] = 1;
paypalObj.cmd = "_cart";
paypalObj.business = "email1235@gmail.com"; //replace with your business name
paypalObj.item_name= T-Shirt stock number 123ABC "; //replace with your item name.
paypalObj.amount="14.95"; //replace with the price
paypalObj.page_style="Primary";
paypalObj.shipping="5.00";
paypalObj.cn="Comment";
paypalObj.currency_code="USD";
var sUrl = "https://www.paypal.com/cgi-bin/webscr?"
for (var o in paypalObj)
sUrl += o + "=" + paypalObj[o] + "&";
trace(sUrl);
getURL(sUrl,"_cart","POST");
}
[F8] Info From Flash To Dreamweaver To Paypal?
I have an ecommerce site with the main navigation and bulk of it in flash and then embedded in Dreamweaver html pages. I've set up radio buttons to place orders and my client has set up a paypal business account. I've just never gone from flash to dreamweaver. not quite sure where to go from here?
Can anyone point me to a tutorial that will walk me through this process. I'm code impaired
http://www.diamonddognewyork.com/WEB/index.html
thanks a ton
Send Info To LMS
Hello all,
What I want to do is create my own quiz/text and pass the info along to a LMS (Learning Management System) the same as if I used the stock Learning Objects that come with FlashMX.
Any suggestions will be appreciated.
Cheers!
Send Info To Database
Actionscript newbie here...
I want to collect inforamtion from users via my web site and send them to a database of some sort.
Right now, using PHP, I have the knowledge/ability to collect information such as Name, E-mail, Comments, etc. Once a "submit" button is clicked, it send the information to me via an e-mail.
This is fine if I only have a small handfull of submissions. On the other hand, if I have hundreds of submissions, keeping track of them will be time consuming.
Using PHP, how do I send this information to something like Access or Excel? My client is very computer illiterate and I'd prefer to make it as easy for her to read as possible.
If not PHP, what do I need to learn?
Thanks :-)
How To Send Info Into Flash ?
hello !
i have 1 swf file runnig on 5 different html pages.
i want that on each different page the flash will send a specific mc to play a secific frame.
for example :
on page named "about.html" the mc named "rasta" will play frame 13 !
on page named "pay.html" the mc named "doodle" will play frame 9 !
HOW ?
Send Checkbox Info
I have made a formmail in flash and needs the chechbox's (news) to be send along with the other informations.
My AS code is:
on (release) {
if (Firma eq "" or Firma == undefined) {
Status = "Venligst indtast firma navn";
} else if (Email eq "" or Email == undefined) {
Status = "Venligst indtast email";
} else if (Message eq "" or Message == undefined) {
Status = "Indtast venligst en besked";
} else {
lineAdapt();
loadVariablesNum("email.php", 0, "POST");
Firma = "";
Adresse = "";
Zip = "";
City = "";
Email = "";
News = "";
Message = "";
gotoAndStop("sent");
}
}
My php code is:
<?php
$sendTo = "klint@email.dk";
$subject = "Mail fra Hammers web-site";
// header information not including sendTo and Subject
// these all go in one variable. First, include From:
$headers = "From: " . $_POST["Firma"];
$headers .= "<" . $_POST["Email"] .">
";
// next include a Reply-To:
$headers .= "Reply-To: " . $_POST["Email"];
// now we can add the content of the message to a body variable
$message = "Firma: " . $_POST["Firma"]. "
";
$message .= "Adresse: " . $_POST["Adresse"]. "
";
$message .= "Zip: " . $_POST["Zip"]. "
";
$message .= "City: " . $_POST["City"]. "
";
$message .= "Email: " . $_POST["Email"]. "
";
$message .= "Nyhedsbrev: " . $_POST["News"]. "
";
$message .= "Message: " . $_POST["Message"]. "
";
mail($sendTo, $subject, $message, $headers);
?>
I just doesn't send the information where the checkbox is checked or unchecked.
Hope you can help me.
Send Info From Swf To Cfm File.How?
Hi!
I am using AS3.0 and I have a question.
I have an inputText where the user will fill in with his email address.
How do I catch his email address with a ColdFusion Script?
Can You send some example?
Thank You
How To Send Whichbutton Info To A MC
Nevermind I figured it out but here is some code for ya if you want to look at it.
basically I found this script online for public use and it works.. but it limited you to using it by itself and not with external movie clips.
so here is the code:
// A function to generate a progress bar to monitor the download of assets loaded into
// a MC on the main timeline named content.
// The loader MC should have a MC inside named bar which will act st the progress bar.
// Make sure the linkage name is "loader".
function showLoading() {
// Attach the loading bar MC from the library and poistion it at x:215, y:100
this.attachMovie( "loading", "loading", 100000, { _x:215, _y:100 } );
loading.bytes = 0;
loading.total = 0;
loading.percent = 0;
loading.bar._xscale = 0;
loading.onEnterFrame = function() {
this.bytes = content.getBytesLoaded(); // Get the number bytes currently loaded into content
this.total = content.getBytesTotal(); // Get the total number of bytes to be loaded into content
if ( this.total > 0 ) { // Check that total has a value before doing anything with it.
this.percent = Math.round( ( this.bytes / this.total ) * 100 ); // Calculate percent as bytes / total X 100 and round off to the nearest whole number
this.bar._xscale = this.percent; // Set the _xscale of the bar to percent
if ( this.percent == 100 ) { // When percent reaches 100 the load is finished
this.removeMovieClip(); // Remove this clip from the stage
}
}
};
}
// -- Button Actions to show images ---
function buttonClick( whichButton ) {
content.removeMovieClip();
showLoading();
if ( whichButton == "image00" ) {
content.loadMovie( "image00.jpg" );
} else if ( whichButton == "image01" ) {
content.loadMovie( "image01.jpg" );
} else if ( whichButton == "image02" ) {
content.loadMovie( "image02.jpg" );
} else if ( whichButton == "image03" ) {
content.loadMovie( "image03.jpg" );
} else if ( whichButton == "image04" ) {
content.loadMovie( "image04.jpg" );
} else if ( whichButton == "image05" ) {
content.loadMovie( "image05.jpg" );
} else if ( whichButton == "image06" ) {
content.loadMovie( "image06.jpg" );
} else if ( whichButton == "image07" ) {
content.loadMovie( "image07.jpg" );
}
}
This code created its own buttons. but I wanted to call the WHICHBUTTON function from an external movie clip button with something like:
this.app01.onRelease = function()
{
buttonClick( "image00" );
}
this got it to work...
-max
CGI To Send Info Via Submit Button
Hi
I have a form with synamic text fields, ready to be sent over the net via a submit button.
I know you need some back end script to make this work, does anyone have this script or know how t works.
Ta very much
Pedros
Send Info From One Part Of Stage To Another
Hey,
I am trying to send info from one part of my stage to another
I have an infoMC which is populated using cfc's and have text fields called productDescription, and unitprice (which are dynamic) and a quantity (which is an input)
I have a movie clip called cartMC which has 23 or so MC's which are called item1, item2 etc...with textfields called quantity, productDescription, subtotal, and .
How can I pass the info from the infoMC to teh cartMC and populate the fields one at a time. (Like when I add one thing, the info1MC is populated with the productDescription, the quantity No. and the subtotal from the UnitPrice*quantity) the second time you click the add button it would go into the item2MC.
Send ComboBox Info In E-mail
Hi all, I wanted to know if it was possible to send info from 3 comboBoxes in an e-mail. Please reply need to finish today.
PLEASE HELP How Do I Send Info From A Text Field To A Url
Hi,
I realy need some help here...
I have created a Flash .exe file that we use as a "portal" of sorts.
Upon launching this portal you are asked to login with your firstname, lastname and employee number
Flash then validates the lastname and employee number information with an xml file containing that information.
My problem is I have to also take the Firstname Lastname and employee number and send it to a url.
I attached a text file with my entire code so you can see what I did so far if it is not too much trouble could you make the changes their or just let me know how so I can do it my self.
Please help I fear my job may be riding on this project.
Thanks in advance.
Form Works But Won't Send Info..via PHP
i have been through every single tutorial on the internet i think--and i still can't get my flash form to work. im using php to send me the data, but when i fill it out, i never receive anything in my email! i have tried SO many different ways--a ton of different acrionscripts, and i can get none to work.
maybe I am not putting the code in at the right place, i have no idea... my form is located here if you want to take a look:
http://mandeieio.buildtolearn.com/contact.html
and the actual file in .fla format is here (if you want to look at it)
http://mandeieio.buildtolearn.com/brandnewcomments.fla
the code i have in my php file now is :
<?
$to = "maando@hotmail.com";
$msg = "$name
";
$msg .= "$message
";
mail($to, $url, $msg, "From: My web site
Reply-To: $email
");
?>
and the action code i used in the flash file was the stop() for both frames (frame 1 which was the comment form & for frame 2 which was the thank you part) and then for the submit button i used:
on (release) {
if (name eq "" or message eq "" or email eq "") {
stop ();
} else {
loadVariablesNum ("form.php", 0, "POST");
gotoAndStop (2);
}
}
if someone could PLEASE take a few minutes and help me out, i would really appreciate it. I am new at this, so please try to explain to me & be specific on where to insert things...half the webpages I've read I didn't understand where to insert the codes, etc....thanks!!!!!!!!
--and btw, i am using flash mx---
Forms That Send Info To My E-mail
alright, i'm almost finished with a project, and i need to create a form that will send whatever information that is submitted to the web-master in an e-mail format. any ideas? I would like to avoid using the "users" e-mail program to do it.
Send Info From Many Computers To One Server
i want to know what do i need to connect many computers in a classroom to a server, for every student to have a test made in flash and all the answers to get to my computer (the server), where all the answers of each student appear like:
student 1 answered:
q1=correct
q2=incorrect
q3=correct
i dont know can i send this answers from every student's machine to the server with a regular network connection, or is it that i need other type of network connection?
thanks
Email Form Doesn't Send Info
I created a form to collect email addresses and comments by following this tutorial: http://www.actionscript.org/tutorial...il/index.shtml
The only thing I changed was I removed the subject line. It sends to my email address but there is no info sent - I receive only a blank email.
What am I doing wrong?? I haven't changed anything else in the code.
Please help if you can!
Help Please. First Time Attempting To Send Info To Database Via .asp
Hi There
I could really use some help from you gurus out there.
I am trying to get a .asp example file from an actionscripting book to work, but it keeps telling me that there is an error trying to open the .asp page on my server
I uploaded the .asp file, and the access file onto my server, but it is not communicating.
Are there any browswer settings or web-hosting settings I should be aware of before I try to send and receive information from a database?
Also, I eliminated one variable. In another document, I was able to pull information from a text file from my web server without any problems.
If you have any insight, please let me know.
Thank you.
Sean
Form Info To Send Directly From Website
I have just finished watching a Total Training Video on creating a eMail form in flash. At the end of the video it has my own e-mail open to send the info. I want the form to send the info directly from the website. Can someone please look at my code below and help me finish it to get the info to work directly from the website? Pretty please.
Thanks so much,
flyfisher2
[code]
on (click) {
// these statements simply read the data from the input fields
// and print them to the output window for debugging
trace(this._parent.username.text);
trace(this._parent.company.text);
trace(this._parent.email.text);
trace(this._parent.phone.text);
trace(this._parent.comments.text);
// save the return email address
returnEmail = this._parent.emal.text;
// create an empty string variable to store the data
urlData = "";
// assemble the data from the fields into the new variable
urlData += "Name: "+this._parent.username.text+newline+" ";
urlData += "Company: "+this._parent.company.text+newline+" ";
urlData += "Email: "+this._parent.email.text+newline+" ";
urlData += "Phone: "+this._parent.phone.text+newline+" ";
urlData += "Questions: "+this._parent.comments.text+newline+" ";
// print url data to output window for debugging
trace(urlData);
// send email using user input data
getURL("mailto:markd@invisionequity.com?subject=In visionInfo&body="+urlData);
}
submit_btn.onRelease = function (){
getURL ("mailto:markd@invisionequity.com");
}
Help Please. First Time Attempting To Send Info To Database Via .asp
Hi There
I could really use some help from you gurus out there.
I am trying to get a .asp example file from an actionscripting book to work, but it keeps telling me that there is an error trying to open the .asp page on my server
I uploaded the .asp file, and the access file onto my server, but it is not communicating.
Are there any browswer settings or web-hosting settings I should be aware of before I try to send and receive information from a database?
Also, I eliminated one variable. In another document, I was able to pull information from a text file from my web server without any problems.
If you have any insight, please let me know.
Thank you.
Sean
LoadVars To Send Info To A Database Problem?
I am trying to capture some user input and submit it to a database. I can do it successfully providing I use the second argument i.e. (_parent, _self etc).
I don't want my users to suddenly be transported from the middle of a Flash movie to a _blank page etc just because they submit their information.
How do I get the information to submit to the database without interupting the user experience?
I have posted my code below:
CODEonClipEvent(load){
sendScores = function(userName, userEmail, userScore){
myVars = new LoadVars();
myVars.uname = userName;
myVars.email = userEmail;
myVars.score = userScore;
myVars.send("submitinfo.asp");
}
}
onClipEvent(mouseUp){
if (this.hitTest(_root._xmouse, _root._ymouse)){
userName = _root.uname.text;
userEmail = _root.email.text;
userScore = _root.score.text;
sendScores(userName, userEmail, userScore);
}
}
LoadVariables Vs Using A Button To Send Form Info
i have one layer with all my input text boxes and my button.
then on the action script i have:
Code:
on (release)
{
getURL("flash.php", "_blank", "POST");
}
this is sending all the info thats entered into the text fields to a php script i wrote, but i dont have any combo or radios..etc.. so i dont even know if it would work for those.
my question is and i dont know how to word it ive read two popular tutorials on forms but they not NOT specific when it comes to this:
is there one action script page to each scene? meaning i dont have a seperate action page for each button, label..etc on my scene instead i have one main action script page where i put all my functions and call them through each component?
if someone could help clear it up for me i can understand setting up the loadvariable form and understand it
Can HtmlText Href Links Send Info To Swf Variables?
Right now I have a movie clip with a basic on release function:
ActionScript Code:
home_mc.onRelease = function() {
global_button("HOME");
};
If I have a htmlText field in my movie with a href link - can it perform the same action? Can it send info to variables in the movie?
For instance, can something like this be accomplished?:
HTML Code:
<A HREF='global_button("HOME")'>click here</A>
Quis And Show Send Status And Controll Info
Hello Group!
I´m building a site applicaton (Quiz-Like), and when subbmitting my answers I POST them to a PHP page that puts my answers and contact information in a database, then nothing happens.
But I was woundering if there is a way to get Flash to tell that the information has been sent?
And my second question is if there might be a way to check if a user has filled out the contact form, and then check if there is a valid e-mail adress?
--------------------------------------
Kind regards;
HuggerFanta
Want Button To Send Info To Specific Php Script Depending On A Variable
So I have a form with a few fields that are mandatory, for which I'd like an error message (EmailStatus) to pop up if they are blank when the submit button is pressed. If all of the fields are filled in, the user can select to subscribe(wanna=1) or unsubscribe(wanna=0). When the submit button is pressed, I want it to check that all of the fields have been entered (if no: spit out the error message), and then check the subscribe or unsubscribe value, and send the info to the appropriate script (the script for subscribe is partAscript.php; unsubscribe is remove.php). Below is the code I have made for my submit button which does not work. Please help!
on (release) {
if (!enterEmail.length || enterEmail.indexOf("@") == -1 || enterEmail.indexOf(".") == -1) {
EmailStatus = "Please enter an E-mail address";
} else if (!FirstName.length) {
EmailStatus = "Please enter your first name.";
} else if (!enterPhoneA.length) {
EmailStatus = "Please enter your telephone number.";
} else if (!enterPhoneB.length) {
EmailStatus = "Please enter your telephone number.";
}else if (!LastName.length) {
EmailStatus = "Please enter your last name.";
} else if (!enterCity.length) {
EmailStatus = "Please enter the city in which you live.";
}
if (wanna=1) {
loadVariablesNum ("partAscript.php", 0, "POST");
EmailStatus = "Sending form";
output = "I would like to enter";
} else {
loadVariablesNum ("remove.php", 0, "POST");
EmailStatus = "Sending form";
output = "I would like to be removed";
}
}
Thanks in advance for any help.
Local Connection Question - 2 Swfs To Send & Receive Same Info To Each Other -
All of the tutorials I have found re: local connections seem to outline 1 swf sending info & the other swf receiving.
Is it possible to have two swfs using exactly the same action script for their variables to effect each other?
I've got two swfs with 2 different sets of buttons who react the same way on roll over. Once a button is selected it remains highlighted.
I want to know if I can have a button in swf 1 highlighted but un-highlight when a button in swf 2 is selected?
Anyone done this before?
Where do I start?
Specific Size Window With "Paypal Send Variables Using POST"
I know that through Javascript you can control a popup window using javascript.
But I need to control a window, with or without javascript, but using the POST method such as:
code:
_lv["send"]("https://www.paypal.com/cgi-bin/webscr
return="+return_str,"_BLANK", "POST");
The reason being is that i have fairly complicated variables to send to paypal, and from the looks of it, I cannot use variables by using getURL like below:
code:
getURL("javascript:javascript:
openNewWindow
('https://www.paypal.com/cart/add=1&business=order@myaccount.co.uk
&item_name=anyname&amount=21.99
&return=http://www.mywebsite.co.uk&cancel_return=http://www.paypal.com','paypal',
'width=600,height=400,scrollbars,location,resizabl e,status');void(0);");
Unless that is, someone knows different, if so how would I substitute a fixed price (for example) with a price that is currently a variable in the flash movie.
Localconnection Challenge: Send Info Through <a Href="bla">?
've got two frames, in each frame is an SWF. They chat using LocalConnection.
In the recieving HTML file I have this in my SWF
Quote:
var incoming_lc:LocalConnection = new LocalConnection(); incoming_lc.connect("lc_example"); incoming_lc.methodToExecute = function(param:String):Void { gotoAndPlay(param); };
In the sending HTML file I have this in my SWF
Quote:
<the name of my button>_btn.onRelease = function(){ frameName = "<the name of the frame the other swf should play>"; outgoing_lc.send("lc_example", "methodToExecute", frameName); };
This piece of code is repeated several times as I have several buttons that need to tell the other swf to jump to different frames.
The above works perfectly. Now my question:
Is it possible to also use a regular <a href="bla"> in the HTML file to tell the other movie to go to and play a framename, and if yes, what would that look like?
Gr. Roy
Javascript And Flash - Send Info Into Flash Using The Gotolink
hi!
i just finished a flash website and would like to be able to find the different sites in google. as it is done in one flash file i heard that it is possible to add javascript to the html file like:
<param name="gotolink" value="home"/>
<param name="gotolink" value="menu1"/>
etc...
and then with a certain code in flash directly be able to link to the specific part (like menu1, home, etc.)
so for example the navigation i've got has about 7 sections plus some sub menues. as the one flash file can be found in google with meta tags i wanted to find out if it is possible to add meta tags to google regarding the sub content of the site. lets say now if i find the page in google i come to the home menu. but if i look for another name i would like to specifically be able to link to that part of the flash site. so i would need to tell flash that if i come to a specific value in google it has to link to submenue two for example.
it's just that i got told that what i have to do is add the param name in javascript with the gotolink function to a specific value and then let flash understand if that specific value is called then it has to jump to this specific part of the application - not using any buttons.
so summed up (and i know this thread is quite long already...) if i type in x in google and i've got x within my application as a submenu of the navigation and you click on the link of google you get to the wanted part within the flash application...
i hope any of these things make sense as i am absolutely clueless of what to do!
thanks lots!
Paypal-flash How Do I Add A Drop Down For Paypal
Ok I am putting a paypal store in flash.
I have the buttons working but one of items I am selling is a t-shirt and they come in different sizes. Is there a way to add a drop down menu or radio button that will work with my paypal button.
Paypal-flash How Do I Add A Drop Down For Paypal
Ok I am putting a paypal store in flash.
I have the buttons working but one of items I am selling is a t-shirt and they come in different sizes. Is there a way to add a drop down menu or radio button that will work with my paypal button.
Info Needed On Passing Info To SQL DB
I'm trying to write a Flash message board, and would like to know how to get Flash 5 to chat to a SQL Database.
I understand this needs to be done via ASP, not a problem, but how do I pass the variables to the ASP page for storage?
I've seen mention of loadVariables, but would like to know exactly how this communicates to the ASP page.
Many thanks
Wydget.
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.
Send "net Send" Messages By Clicking A Flash Button
Is it possible to send "net send" messages by clicking a flash button?
I want to send a message to another computer on the intranet to register that a certain button has been clicked.
I think the easiest way to do this is to create a batch file and run that on mouse release of the button, does that mean i need to have the flash file as an exe? Or is there an easier way to net send via a flash button.
Thanks.
MJ
Send "net Send" Messages By Clicking A Flash Button
Is it possible to send "net send" messages by clicking a flash button?
I want to send a message to another computer on the intranet to register that a certain button has been clicked.
I think the easiest way to do this is to create a batch file and run that on mouse release of the button, does that mean i need to have the flash file as an exe? Or is there an easier way to net send via a flash button.
Thanks.
MJ
Paypal
anyone get paypal to work on flash5
yet?
Or can it only be used wwith dreamweaverMX
Know Of Any Other Than PayPal?
Hi all, I want people to be able to purchace from my website but am not too keen on using Paypal, does Anyone know of any other company/service that offers online secure credit card processing for purchaces made from sites like Paypal?
Please let me know if you know of any or if you have a website that uses a service that enables people to purchace from the site.
Thanx in advance
Riff
Paypal?
hi guys,
anyone using paypal?
what is their service like?
read some horror stories but someone out there must like them as they are still in business....lol
any experience of other systems?
gary
PayPal
Can I make buttons in a flash movie that control a PayPal shopping cart?
I'd like to do this WITHOUT using the "PayPalFlash101.mxp" file that's prescribed by PayPal.
After endless attempts to map that file through my mac's extension manager, I realize that it just does not work on my machine.
Help?!
Paypal
Below is the code use for pay pal- how would I modify the code to add tax and shipping. Also my clients product is in English pounds and European euros. USA dollars would be the same as the euros.Is this going to be okay with pay pal?Thanks
on (release) {
getURL ("https://www.paypal.com/cart/add=1&business=digitalinspirations%sbcglobal.net.c om&item_name=Dead+Fish+S&item_number=FN+03&amount= 16.00&image_url=http%3A//digitalinspirations.net", "_blank");
}
Paypal
Has anyone ever used Flash with Paypal?
Michael
www.twofortap.com
Paypal?
I really want to get my swish, ASAP - I don't use credit cards but i have paypal - is there anyway I can pay for swishlite through paypal???? please??? anyone????
MX & Paypal
does any know anything about flash mx and paypal ??
im using ..
on (release) {
cmd ="_cart";
business = "my email address login";
item_name = _parent.theItem;
amount = _parent.price
no_note ="1"
currency_code = "GBP"
lc ="GB"
//add = "1"
loadVariablesNum("https://www.paypal.com/cgi-bin/webscr",0, "GET");
getURL("https://www.paypal.com/cgi-bin/webscr",0, "GET");
}
but nowt happens ???
ive tried that MX component that says it does it... but it dont work..
any one got any ideas ??
|