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




Var Sending And Receiving With Php



how do i send a variable to a php script and then have the php script send a variable to flash i'm hoping to make a user account thing with flash and php



ActionScript.org Forums > ActionScript Forums Group > ActionScript 1.0 (and below)
Posted on: 07-23-2004, 02:36 AM


View Complete Forum Thread with Replies

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

Variable Sending And Receiving With Php
how do i send a variable to a php script and then have the php script send a variable to flash i'm hoping to make a user account thing with flash and php

Receiving And Sending Variables
I have a dynamic text field which gets it text from the browser parameter value (tfResult)

import flash.external.ExternalInterface;

onLoad = function():Void{
var sAddressVar:Object = ExternalInterface.call("getQueryParamValue", tfVar.text);
tfResult.text = sAddressVar;
}

I also have a JS file to help it do this.

Not what I need to do is to use that value obtain from the parameter in the rtResult and incoperate it into this

myData.load("grabber.php?id=34");

(with this it loads entry 34 form the database)

instead of entry 34 from the database I need to specify it to be the rtReslult.
SO if the parameter is 59 it will then request that from the grabber.php
I tried

myData.load("grabber.php?id=tfResult");

But it didn’t work any idea how to specify the text from the rtResult here??

Sending / Receiving Variables
hi there,
I got a main.swf in which I load an other content.swf.
this works fine, but I also want to load a variable from the content.swf into the main.swf.

so I´ve tried:

loadMovie("content.swf", _root.somewhere, "POST");

and also

loadMovie("content.swf", _root.somewhere);
loadVariables("content.swf", _root.somewhere, "POST");

but it doesn´t work.
what´s wrong ?

cobo

Sending And Receiving Data
Hi everyone,

I am sending data by mail from flash using php. but i was wondering if i could send the same data to an html form which will then be sent by mail so the user will receive that data as an html format. Hope it makes sense..

If anybody can help me or guide me about that.

Thanks for any help.

Regards,

Jerome

[dir][swf][loadVariablesNum] Sending Receiving Var
ok, tried the 'tags'
my question

i've got a SWF within a Director file. the loadVariablesNum command doesn't work, i can guess why but does anyone know of a way Director can achieve the same result as the SWF, I can then pick up the response variable from an ASP script from the director file.

thanks

john cooper

Help With Forms - Sending & Receiving Data...
Hi,

I've been asked to create a form in Flash MX that enables visitors to a web site to input their details. When they press send, the info needs to go by email to the client AND to a database.

I don't know how to do this. Can you give us a clue or point me to a good resource that will show me in 'PLAIN BLOODY ENGLISH' my options and alternatives!

My brain hurts,

ofd.

Sending A Receiving From A Php Script Problems
I have not had any issues in the past of sending and receiving from a PHP script until now - my swf was hosted on another site and for some reason the swf cannot communicate with the scripts anymore.

I have tried allowing the domain through the security object but had no success - any ideas?

Sending/receiving Variable To Javascript
This may be in the wrong thread, not sure.

I have a frameset set up with two frames, top and main. I have a movie in the main frame that needs to send a variable to the top frame when a button is clicked. Then when I load a new movie into the main frame I need it to read the variable from the top frame.

I think I have to use fsCommand to send and receive the variable, but I'm not sure how to do it. Searching the web I have found how to send it to the same page, but not a seperate frame. Help, please?

Thanks in advance,
rhombusleech

Sending/receiving Variable To Javascript
This may be in the wrong thread, not sure.

I have a frameset set up with two frames, top and main. I have a movie in the main frame that needs to send a variable to the top frame when a button is clicked. Then when I load a new movie into the main frame I need it to read the variable from the top frame.

I think I have to use fsCommand to send and receive the variable, but I'm not sure how to do it. Searching the web I have found how to send it to the same page, but not a seperate frame. Help, please?

Thanks in advance,
rhombusleech

Question About Sending/receiving SWF Files
When I receive SWF files to my PC from my friend's MAC I get a blank screen.

How should he send them so I can view them?

Thank you,
Herman

Sending And Receiving Variables From A Text File
loadVariablesNum ("attemps.txt", 0, "POST");

I am using the above code to load a variable from a txt file in the same directory. Works OK.

If that variable changes in the flash file how do I update the txt file in the directory and load it back into flash.

Regards
Dogs Lipstick

Sending/receiving Vars Across Frames Using Javascript
Here's my dilemma:

I've got a frameset with two frames; top and bottom. In the bottom frame I have bottom1.html with a movie on it that needs to send a variable to the top.html which is in the top frame.

Then when I load bottom2.html into the bottom frame, I need the movie on it to load the variable from top.html in the top frame.

Anyone have any suggestions? I know I need to use fscommand, but I can't find any documentation on using frames and different html pages.

Thanks in advance,
rhombusleech

Sending/receiving Vars Across Frames Using Javascript
Here's my dilemma:

I've got a frameset with two frames; top and bottom. In the bottom frame I have bottom1.html with a movie on it that needs to send a variable to the top.html which is in the top frame.

Then when I load bottom2.html into the bottom frame, I need the movie on it to load the variable from top.html in the top frame.

Anyone have any suggestions? I know I need to use fscommand, but I can't find any documentation on using frames and different html pages.

Thanks in advance,
rhombusleech

Sending To And Receiving Data From Server Side Script
Back to theory...I want to send variables (values) to server side script. Server side script receives them as querystrings.It uses them to collect the right data from database and then creates XML. Flash then reads the XML

In Flash the values are sent from one swf and xml is loaded into other swf, which is loaded into the swf, from which the values are sent.

I'd appriciate if someone could tell me, how to do that? Do there have to be involved any event handlers? I don't need a code, just a short summary. THX.

ps-i'm working on that now for 7 days and no progress. PLEASE, help

Local Connection Question - 2 Swfs Sending/receiving Same Variable?
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?

Receiving Variables
OK, I've struggled with this for long enough, now its time to seek help!

I've got two movies of a different size, the first movie asks you to enter your name. I then load a new URL (an html page that contains the second movie) and I want to display the name inside that movie. When loading the second movie I am using the "get" method which attaches all the correct variables into the queryString - I just can't figure out how to read these variables back into the second movie. All the tutorials show how to load variables from a text file and not from the QueryString.

Please help me!

Thanks.
Rob

Receiving Warning
I downloaded the trial of version 2 and got right into putting some cool stuff together.

Then I started getting this message box that says:

Your system resources are very low.

it goes on to say something about saving my work and then shutting down other applications.

What exactly does this error mean? and will following the warning fix it completely?

thanx

Receiving POST?
is there any way to receive a POST in Flash?

Receiving Parameters From DB
hi all!
I need some help. I'm working on this page in a data-based site. There's a form where the user chooses between several items and then has another radio button choice between 5 items. When he clicks "enter" a short flash demo loads to the page according to the second choice, which is as far as I got. I need that demo to receive a parameter from the DB regarding the user's first choice and to load another mc into the demo to be the movie's soundtrack.
I'd probably be able to put a mute/play in the parent movie, but I'm not sure how receiving the initial parameter from the DB works- what commands do I need put inside the movie and where, is there a special format, what the DB side code should be , and so on.
I'd appreciate any help from you guys.
Thanks!

Receiving ASP Variable
Hi, my name is Dave Birch. I'm working on a flash training website which consists of a series of html pages with flash embedded. We are trying to save where the user is in progress by using ASP. The idea is that flash interacts with ASP, with a "Continue where I left off" function that will take you back to the flash slide you were on in your last session. Flash will also update your current frame and html number. We've created a variable "lastPage.asp" which holds a series of numbers concatonated with a ",". The format is this. "htmlNumber,frameNumber".

The problem I am running into is that although my document is sending out the updated variable to lastPage.asp it isn't receiving the lastPage.asp when you click continue where I left off.

I have this code in the first frame of my movie. Pretty simple. I am attempting to check and make sure the variable is loaded first of all, and then to check that the current htmlNumber equals the htmlNumber in lastPage.asp. If not, it should go to the first frame. Finally, if current htmlNumber is correct it should gotoAndStop(frameNumber).

Is my code correct. Please help. I am at a loss for why this is not working.

Thanks

Dave Birch

---actionscript code follows---


Code:
lv = new LoadVars();
lv.load("lastPage.asp");
lv.onLoad = function(success){
if(success){
trace("Variables Loaded");
if(lastPage.substr(0,1) == "2"){
var frame=parseInt(this.lastPage.substr(2,3));
_root.compaccountmc.gotoAndStop(frame);
}
}
else
{
trace("Error loading variables");
}
};

Re: Email Receiving.
Im trying to obtain a simple email form receiver , Ive been trying to make it with actionscript only and this is what i got so far.

on (click) {
// these statements read the data from the input fields
// and print them to the output window for debugging
trace(this._parent.username.text);
trace(this._parent.email.text);
trace(this._parent.days.selectedItem.label);
trace(this._parent.gondola.selected);
trace(this._parent.art.selected);
trace(this._parent.museum.selected);
trace(this._parent.murano.selected);
trace(this._parent.travel.selectedData);
trace(this._parent.comments.text);
// save the return email address
returnEmail = this._parent.email.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 += "Email: "+this._parent.email.text+newline+" ";
urlData += "Staying: "+this._parent.days.selectedItem.label+newline +" ";
urlData += "Gondola Tour: "+this._parent.gondola.selected+newline+" ";
urlData += "Art Gallery pass: "+this._parent.art.selected+newline+" ";
urlData += "Museum Pass: "+this._parent.museum.selected+newline+" ";
urlData += "Murano Tour: "+this._parent.murano.selected+newline+" ";
urlData += "Mode of Travel: "+this._parent.travel.selectedData+newline+" ";
urlData += "Comments: "+this._parent.comments.text+newline+" ";
// print url data to output window for debugging
trace(urlData);
// send email using user input data
getURL("<A href="mailto:little_master_73@hotmail.com?subject= VeniceInfo&body="+urlData">mailto:little_master_73 @hotmail.com?subject=VeniceInfo&body="+urlData);
}
I have tryied other emails liike a @yahoo.com but it does not work and when i test it's html it opens op my Outlook exPress.Please help me and if you have another way of obtaining this simple email receive form ill be happy to try it.

Receiving External Events
I am writing a program that uses flash as the gui. My question to the experienced flash designers is, what kind of events should I send to notify flash that something has changed? Currently I am using TGotoLabel("/" , _event_) to 'tell' flash that _event_ has happend. For example TGotoLabel("/", "URLChanged"). I am curious what people prefer. May be TCallLabel('/', 'moon') instead?

Thanks

Eric
[Edited by DraconPern on 09-16-2002 at 05:36 AM]

Receiving Vars Passed In A URL?
I'm sure this is simple, but I can't find how it's done in the Flash help manual.

How do I receive and use variables passed in a URL (i.e. GET)? So if I passed www.somesite.com/flashpage.php?var=hello , how would I get a dynamic text box to display 'hello'?

Cheers all.

Flash Receiving Query From Php?
ex: site.php?id=123

to print id on flash

How do i do that?

Trouble Receiving E-mail
I have a flash form connecting with a php script and I am pretty sure I got everything correct but It does not send the form when I press the submit button. I have included all of my files.

Receiving Form Info
I have made a simple form in flash with 3 input fields 'name' 'contact' and 'enquiry' and 1 submit button.
I have also a thank-you screen further down the timeline for when the submit button is pressed.

How do I send this info so that it comes back to me in an email???

I know nothing about asp or cgi....so please explain fully...

Thanks

Receiving An Array Into Flash From A Cfc...
Hi, I am trying to pass an array into flash from a cfc. I can pass a single var fine.

In my cfc I am using:


Code:
<cfcomponent>

<cfscript>
News = ArrayNew(1);
News[1] = StructNew();
News[1].Title = "22 Jul 2003";
News[1].Text = "We will be moving into office premesis within the next 2 weeks, details will be available shortly.";
News[1].link = "/index.cfm";
</cfscript>
<!--- <cfset Passed = FLASH.params[1]> --->

<cffunction name="getNews" access="remote">
<cfreturn "News">
</cffunction>

</cfcomponent>
and in my flash movie:


Code:
function Result()
{
//receives data returned from the method
this.onResult = function(result)
{
this.News = new Array();
this.News = result;
trace("Data received from server : " + this.News[1].title);
}

this.onStatus = function(error)
{
trace("Error : " + error.description);
}
}
What am I doing wrong?

M@)

Receiving FSCommand In ActionScript
I am using FSCommand in ActionScript to send out my own messages from my .swf :
fscommand("NotifyLoaded",mycommand);
and my .swf file works fine in c++ VB JavaScript... but I don't know how to receive the events within FlashMX ActionScript itself,
ie.
MENU: Insert > New symbol ; clip , then drag in my object from the library. In the ActionScript i do a
obj1.loadMovie("myObject.swf");

Last thing I would also like to try it in directorMX but again i have no idea how to receive events.
Cheers

Receiving Variables From Php Using Flush()
Hi,
I have a php page on our intranet that contains many complicated queries.
The front end is a "flash mx" interface.

What I am trying to do is to echo-ing variables back from php to flash using the php-flush() function because I would like the user to see the progress of the page, as opposed to sending it at the very end, after all the queries are executed.(the php-page itself takes about 2 minutes to run).

In flash I am using loadVariables to access the page; but somehow flash only accepts new variables if the whole php-page is loaded completely, and ignores the flushed variables in between.(while they are echo-ed correctly)

My question:
1) How does flash know when a file is loaded completely?
2) Can variables be send the way I described it?
3) Could using XMLSocket provide a solution?

kind regards
Patrick

Php Mailer With 2 Emails Receiving Pls.
Hi I dont know how to get the php script to send to more than one person at one time.
Can anyone help?
I have tried:
$adminaddress = "aaa@aaa.com,www@ww.net,rrr@rrr.com,hhh@hhh.co m";
but no good.

any one help me pls?
shaf

[F8] Flash Receiving Variables?
I have no idea if thats even what it is called. But this is what I want to do. I have a flash banner at the top of the site Im making that says what page your on heres a link www.greyfilmpro.com/test.html . The sites not done its just an image right now but you get the idea. Right under the Flash Banner Ill have my navigation which isnt going to be flash. Lets say your on the "News" page and you want to go to the About page, And when you click the About button I want the banner to do exactly what it did when the words "Alethiea Christian" appeared (go to the link to see what Im talking about). So pretty much you'd click "About" and the lighthouse banner thing that already says "News" would blind you with the light and then it would say like "About Us" when the light pass by. How would I do this? I dont want the whole page to be flash, I just want that banner to be.

Receiving Multiple Mc's From One Button
when I hit my "home" button I want the home movie clip to be one of 8 possibilities. I figure I should be creating an array to handle this but I don't know how to go about it. any help is appreciated. thanks!

Receiving All But One Querystring Variable
Hi. I have a flash 8 movie that is getting passed these vars:

MYURL.swf?bandid=7&instanceid=ea897df58655977f988a a8a7e70ddfd2&cur_instanceid=9ae6787d0a29af22c1206e dd111fb391&affiliateid=0&autoplay=1

All the vars are being received by Flash except for cur_instanceid. I thought maybe the underscore was causing the problem (though underscores are legal in variable names), so I changed the var to currentid. But no matter what I do, that var has a value of undefined. The ones before and after it are fine.

Problem With Receiving LoadVars In AS3
Hey There!

I am testing a simple application where I am trying to send back to flash (AS3) some variable values from coldfusion. It works just fine when I assign the value in CF "by hands" i.e.

<cfsetting enablecfoutputonly="YES">
<cfset Return = "&Numbers=456&">
<cfprocessingdirective suppresswhitespace="Yes">
<cfoutput>
#Return #
</cfoutput>
</cfprocessingdirective>

Then flash accepts the value of variable Numbers of 456.

Now I ran into a problem, when I need instead of steady 456 pass the VALUE of CF variable. I was trying the following way:

<cfsetting enablecfoutputonly="YES">
<cfset x = 123>
<cfset Return = "&Balls=&">
<cfprocessingdirective suppresswhitespace="Yes">
<cfoutput>
#Return#=#x#
</cfoutput>
</cfprocessingdirective>

In this case I receive no value in flash assigned to Balls ;(

Can anyone please let me know that is the proper way to pass VALUES of CF variables using flashvars?
Or maybe you know where to find a tutorial showing how that was done.

Thank you

Problem Receiving Xml Nodename
Hi

I have one XML file and one flash class and one flash file. In flash file create the object of class and send the path of xml file to class. but I can not see the node name of my firstChild.


XML FILE
================================================== ========
<?xml version="1.0" standalone="yes"?>
<Flash_Template>
<UserInterFace>
<Sign_In>
<txtfield txtname="Shahzeb" depth="0" x_axis="100" y_axis="100" width="50" height="100" />
<txtfield2 txtname2="Password" depth="1" x_axis="50" y_axis="18" width="120" height="18" />
</Sign_In>
</UserInterFace>
</Flash_Template>

================================================== ========

Flash FILE
================================================== ========
import XMLMenu;
var filename:String = "flashtemplate.xml";
var xmlmenu:Object = new XMLMenu(filename);

================================================== ========


Flash Class
================================================== ========
class XMLMenu extends XML
{
public function XMLMenu(XMLFileName:String)
{
super();
this.load(XMLFileName);
}

public function onLoad(success)
{
if (success)
{
trace("file loaded");
trace(this.parent.firstChild.firstChild.nodeName);
//parse data if needed
//notify display objects that data has loaded
}
else
{
error();
//handle file load error
}

}

public function error()
{
trace("Xml not loaded")
}

}

================================================== ========

Anyone plz help me....
I am awaiting to ur reply

Problem Receiving Xml Nodename
Hi

I have one XML file and one flash class(XMLMenu) and one flash file. In flash file create the object of class and send the path of xml file to class. but I can not see the node name of my firstChild.


XML FILE
================================================== ========
<?xml version="1.0" standalone="yes"?>
<Flash_Template>
<UserInterFace>
<Sign_In>
<txtfield txtname="Shahzeb" depth="0" x_axis="100" y_axis="100" width="50" height="100" />
<txtfield2 txtname2="Password" depth="1" x_axis="50" y_axis="18" width="120" height="18" />
</Sign_In>
</UserInterFace>
</Flash_Template>

================================================== ========

Flash FILE
================================================== ========
import XMLMenu;
var filename:String = "flashtemplate.xml";
var xmlmenu:Object = new XMLMenu(filename);

================================================== ========


Flash Class
================================================== ========
class XMLMenu extends XML
{
public function XMLMenu(XMLFileName:String)
{
super();
this.load(XMLFileName);
}

public function onLoad(success)
{
if (success)
{
trace("file loaded");
trace(this.parent.firstChild.firstChild.nodeName);
//parse data if needed
//notify display objects that data has loaded
}
else
{
error();
//handle file load error
}

}

public function error()
{
trace("Xml not loaded")
}

}

================================================== ========

Anyone plz help me....
I am awaiting to ur reply

Receiving Blank Forms
I have mentioned this before but have still not been able to sort it out.
I have a flash form on my site that is coded to ensure that all fields are filled in before being sent. It is also coded to allow only certain characters to be entered and also to ensure that a correct email address is entered, i.e. there must be an @ and a period.

It would appear from the blank email that someone is just pressing the space bar in each field and clicking 'send' however the fact that the @ and period are required over rules that.

Does anyone have any ideas how I can prevent blank emails arriving? Is it something to do with differing versions of Flash - Action script? I've attached my script below as text.
Thank-you, appreciate any help I can get.

Selection.setFocus("name_txt");
name_txt.restrict = "A-Z a-z \- .";
street_txt.restrict = "A-Z a-z 0-9 ,\- .";
city_txt.restrict = "A-Z a-z \- . ,";
country_txt.restrict = "A-Z a-z \- .";
postcode_txt.restrict = "A-Z a-z 0-9 \- .";
phone_txt.restrict = "0-9 ";
fax_txt.restrict = "0-9 ";
email_txt.restrict = "A-Z a-z _ 0-9 @ \- .";
comments_txt.restrict = "A-Z a-z 0-9 \' . ,";

submit_btn.onRelease = sendMessage;

name_txt.tabIndex = 1;
street_txt.tabIndex = 2;
city_txt.tabIndex = 3;
country_txt.tabIndex = 4;
postcode_txt.tabIndex = 5;
phone_txt.tabIndex = 6;
fax_txt.tabIndex = 7;
email_txt.tabIndex = 8;
comments_txt.tabIndex = 9;

error1_txt.autoSize = true;
error2_txt.autoSize = true;
error3_txt.autoSize = true;
error4_txt.autoSize = true;


function checkForm():Boolean {
// this checks whether required fields have been filled in
// initialize missing flag on assumption everything OK
var missing:Boolean = false;
// clear all error text fields
error1_txt.text = error2_txt.text = error3_txt.text = error4_text.text = error5_txt.text = "";
// check each field
// if problem is encountered, display message
// and set missing flag to true
if (name_txt.text == "") {
error1_txt.text = "Please enter your name";
missing = true;
}
if (street_txt.text == "") {
error2_txt.text = "Please enter your full address";
missing = true;
}
if (city_txt.text == "") {
error2_txt.text = "Please enter your full address";
missing = true;
}
if (country_txt.text == "") {
error2_txt.text = "Please enter your full address";
missing = true;
}

if (phone_txt.text == "") {
error3_txt.text = "Please enter your phone number";
missing = true;
}
if (email_txt.text.indexOf("@") == -1 | email_txt.text.indexOf(".") == -1) {
error4_txt.text = "Please enter a valid email address";
missing = true;
}



// if missing is true, return false
// otherwise return true
return missing ? false : true;
}
function sendMessage():Void {
// check whether form has been correctly filled in
var formOK:Boolean = checkForm();
// if no problems, process the form and send variables to PHP script
if (formOK) {
// Form processing goes here
message.name = name_txt.text;
message.street = street_txt.text;
message.city = city_txt.text;
message.country = country_txt.text;
message.postcode = postcode_txt.text;
message.phone = phone_txt.text;
message.fax = fax_txt.text;
message.email = email_txt.text;
message.comments = comments_txt.text;

message.sendAndLoad("individualmembership.php?ck=", messageSent);
// display message informing user that email is being sent
gotoAndStop("sending");
}
}
function backToForm():Void {
// send playhead back to the main form
gotoAndStop("theForm");
}
// initialize LoadVars to send form data
// and receive response from the PHP script
var message:LoadVars = new LoadVars();
var messageSent:LoadVars = new LoadVars();
// load date from PHP
messageSent.onLoad = function() {
if (this.sent == "OK") {
gotoAndStop("acknowledge");
} else {
gotoAndStop("failure");
failure_txt.text = this.reason;
}
};
gotoAndStop("theForm");

Problems Receiving Variables...
Hi,

I'm wondering if anyone can be of some assistance, I'm trying to upload a flash site
that contains a contact page with three fields people can enter there details into:
Name, Email & Message. Now we've written some script so that the page shows
a message to user saying that 'email sending is in progess', so there aware
something has happened!

Everything seems to be fine, message appears when sending, all details are sent
/received both locally and on our test sever, but when we upload our site to
the hosted UNIX environment, for some reason we stop receiving any messages
that have been written into the field. We only receive the person's name and e-mail
address with an empty e-mail.

When all that is being changed within our Flash is the variables address...

Does this sound familiar to anybody? anybody have any ideas as to how this maybe
remedied? A Big pre-thanks to anybody that might be able to help!!!

Below is the flash code:

--------------//----------------

on(rollOver){
this.gotoAndPlay("s1");
}
on(rollOut, releaseOutside){
this.gotoAndPlay("s2");
}
on (press)
{
// send variables in form (the textfields)
// add to the end of message the details of the name
_parent.t4_2 = _parent.t4_2 + " By " + _parent.t2_2
// to email asp page which will send the mail
_parent.loadVariables("cust-bin/mailtest.pl?action=Send", "POST");
_parent.t2_2 ="Email";
_parent.t3_2 ="Sending";
_parent.t4_2 = "In Progress";
}
on (release) {


//pause for a few seconds
var i:Number
var p:Number
for (y=0; y<500000; y++)
{
p++;
}
_parent.t1_2="";
_parent.t2_2="Your Name:";
_parent.t3_2="Your E-mail:";
_parent.t4_2="Message:";
}

--------------//----------------

This works fine until we change the load-variables address to our "sendmail2.asp"
Below the sendmail2.asp which is also working fine.

--------------//----------------

<%
' Put your SMTP Mail server here. If you do not know, ask your network administrator
smtpServer = "217.170.190.152"
smtpPort = 25

' ---
dim smtpServer, smtpPort


Set message = CreateObject ("JMail.Message")
'message.ServerAddress = smtpServer & ":" & smtpPort
message.From = Request.Form("t3_2")
message.FromName = Request.Form("t2_2")
message.Subject = "Web Site Enquiry"
message.AddRecipient "richard@lanworks.co.uk", "Richard"
message.ContentType = "text/html" ' or you can put 'text/plain' for plain text emessage
message.ISOEncodeHeaders = false
message.ContentTransferEncoding = "8bit"
message.Body = Request.Form("t4_2") & vbnewline & "From : " & Request.Form("t2_2")

' 1 - highest priority (Urgent) ' 3 - normal ' 5 - lowest
message.Priority = 3


' Add sender's IP address (not required, but useful for web-based emessage)
'message.AddHeader "Originating-IP", Request.ServerVariables ("REMOTE_ADDR")

'Send the e-mail
message.Send(smtpServer & ":" & smtpPort)
Response.write "success=1&timeDate=" & Server.URLEncode(message.Date) & "&end=1"
set message = nothing
%>

--------------//----------------

Hope someone can help!!
Thanks you!

Si

Receiving ERROR Messages
In testing my movie, I am receiving the following error messages:

======================================
**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 1: Statement must appear within on/onClipEvent handler
var cycle:Number = 0;

**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 2: Statement must appear within on/onClipEvent handler
update();

**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 3: Statement must appear within on/onClipEvent handler
onEnterFrame = update;

**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 4: Statement must appear within on/onClipEvent handler
function update()

Total ActionScript Errors: 4 Reported Errors: 4
==============================================

Here is the code:









Attach Code

var cycle:Number = 0;
update();
onEnterFrame = update;
function update():Void
{
var angle:Number = Math.sin(cycle) * 90;
cycle += .05;

seg0._rotation = angle;
seg1._rotation = seg0._rotation + angle;

var radians:Number = seg0._rotation * Math.PI / 180;
seg1._x = seg0._x + Math.cos(radians) * 120;
seg1._y = seg0._y + Math.sin(radians) * 120;
}

Receiving A Response From A Url Call
I need to figure out a way to receive the response of a url call in flash verses the bowser. I need to make a call to a ctrl api that lives in local host. If I use the getURL method it returns a response but in a browser window. I need it to return this value as a string back to the flash object I have tried loadVars and xml with no success.

When I submit a string it will return json unless specified xml. Here is y attempt.








Attach Code

var a_lv = new URL();
var response_xml = new XML();
//response_xml.addRequestHeader("Content-Type", "text/xml");
//
this.createTextField("response_txt",this.getNextHighestDepth(),15,15,275,200);
response_txt.multiline = true;
response_txt.wordWrap = true;
response_txt.selectable = true;
response_txt.border = true;
//
this.createTextField("http_txt",this.getNextHighestDepth(),200,200,60,60);
http_txt.multiline = true;
http_txt.wordWrap = true;
http_txt.selectable = true;
http_txt.border = true;
//
a_lv.onHTTPStatus = function(httpStatus:Number) {
this.httpStatus = httpStatus;
if(httpStatus < 100) {
this.httpStatusType = "flashError";
http_txt.text = "flashError";
}
else if(httpStatus < 200) {
this.httpStatusType = "informational";
http_txt.text = "informational";
}
else if(httpStatus < 300) {
this.httpStatusType = "successful";
http_txt.text = successful;
}
else if(httpStatus < 400) {
this.httpStatusType = "redirection";
http_txt.text = "redirection";
}
else if(httpStatus < 500) {
this.httpStatusType = "clientError";
http_txt.text = "clientError";
}
else if(httpStatus < 600) {
this.httpStatusType = "serverError";
http_txt.text = "serverError";
}
}
a_lv.onData = function (success) {
if (success == undefined) {
http_txt.text =">> " + this.httpStatusType + ": " + this.httpStatus;
this.onLoad(false);
response_txt.text = "this did not work maybe you should try agian.";
} else {
http_txt.text =">> " + this.httpStatusType + ": " + this.httpStatus;
this.loaded = true;
response_txt.text = response_xml;
}
}

// This does return a response but to the browser
//getURL("http://localhost:45367/ctrl/act?url=http://domain.com/action/flash-preview.flv", "_blank");

// This is what I want to do but get no response
a_lv.load("http://localhost:45367/ctrl/act?url=http://domain.com/action/flash-preview.flv", response_xml, "GET");

























Edited: 08/24/2007 at 11:35:26 AM by breez11

Problem Receiving Variables
I apologize for opening a new thread covering that topic, but i really tried to work it out on my own and just can't. I searched at sephiroth.it and other sites but could not find help for my problem:

I need to sendAndLoad variables from Flash to php. The problem is, that Flash doesn't stop executing the code if the data is being received. So I get a new browser window, saying:

&postCount=1&post0Author=derphilipp&post0Date=09%2 F01%2F05+15%3A51&post0UserTitle=Code+Junkie&post0M essage=nachricht&result=Okay

So all works out fine in php but the values are not returned to flash but printet out by the browser.

Can anyone help?
Kind regards.
Philipp

Receiving Email Form
receive E-mail Form
Hello i also posted this in actionscript forum i really need help. im trying to make a simple email form that when users fill it out it sends the information to my email. this is the actionscript im using

on (click) {
trace(this._parent.username.text);
trace(this._parent.email.text);
trace(this._parent.days.selectedItem.label);
trace(this._parent.gondola.selected);
trace(this._parent.art.selected);
trace(this._parent.museum.selected);
trace(this._parent.murano.selected);
trace(this._parent.travel.selectedData);
trace(this._parent.comments.text);
returnEmail = this._parent.email.text;
urlData = "";
urlData += "Name: "+this._parent.username.text+newline+" ";
urlData += "Email: "+this._parent.email.text+newline+" ";
urlData += "Staying: "+this._parent.days.selectedItem.label+newline +" ";
urlData += "Gondola Tour: "+this._parent.gondola.selected+newline+" ";
urlData += "Art Gallery pass: "+this._parent.art.selected+newline+" ";
urlData += "Museum Pass: "+this._parent.museum.selected+newline+" ";
urlData += "Murano Tour: "+this._parent.murano.selected+newline+" ";
urlData += "Mode of Travel: "+this._parent.travel.selectedData+newline+" ";
urlData += "Comments: "+this._parent.comments.text+newline+" ";
getURL("<A href="mailto:little_master_73@hotmail.com?subject= VeniceInfo&body="+urlData">mailto:little_master_73 @hotmail.com?subject=VeniceInfo&body="+urlData);
}

as u see im using alittle bit of everything , checkboxes , RadioButtons, text ,etc. and im putting all this action on the send button it does not gives me any errors when i test it but it does not send me any email ,also when i test it's html and press the send button it opens up my Outlook Express. Please help me. If you know other way of obtaining this i would also be happy to learn it.

Problem Receiving Variables
I apologize for opening a new thread covering that topic, but i really tried to work it out on my own and just can't. I searched at sephiroth.it and other sites but could not find help for my problem:

I need to sendAndLoad variables from Flash to php. The problem is, that Flash doesn't stop executing the code if the data is being received. So I get a new browser window, saying:

&postCount=1&post0Author=derphilipp&post0Date=09%2 F01%2F05+15%3A51&post0UserTitle=Code+Junkie&post0M essage=nachricht&result=Okay

So all works out fine in php but the values are not returned to flash but printet out by the browser.

Can anyone help?
Kind regards.
Philipp

Receiving And Displaying Variables From PHP
Hi, can anyone tell me why I can't get the variables returned by the php page to display in the 'feedback_txt' textfield. It just reads 'undefined'. I checked List Variables in the test window and I can see that flash is receiving them but not sure why I can't display them in the textfield.

Thanxs in Advance


FLASH PAGE:

var rData:LoadVars = new LoadVars();

var sData:LoadVars = new LoadVars();

sOut_btn.onRelease = function() {
sData.from = name_txt.text;
sData.phone = phone_txt.text;
sData.email = email_txt.text;
sData.country = country_txt.text;
sData.sendAndLoad("http://localhost/php5flash/formInfo.php", rData);
};

r.Data.onLoad = function() {
feedback_txt.text = this.output;
}


PHP PAGE 'formInfo.php'

<?php

$fr = $_POST['from'];
$ph = $_POST['phone'];
$em = $_POST['email'];
$cn = $_POST['country'];

$output = urlencode("$fr <br/> $ph <br/> $em <br/> $cn");
echo 'output=' . $output;

?>

Receiving Data Within The URL String
Is there a way to make flash to receive data that is coming from the URL String?

Ex.: http://www.mydomain.com/photo.cfm?id=1234

Need flash to read the data that is in the id. How do i do that? What is the actionscript/code i should use in flash mx?

Flash Not Receiving PHP Info?
I've got a contact form that sends information to my php script, which should then send an email and return a value back to flash so that flash will play the third (last) frame.

The email part of things works fine, but I can never get flash to play that third frame.

The actionscript for my submit button:


Code:


on (release) {
form.loadVariables("email.php", "POST");
gotoAndPlay(nextFrame);
}



The actionscript on the 'nextFrame' (as mentioned in the above code):


Code:


//Check for return var
if(retval=="1"){
gotoAndStop(3);
}else{
gotoAndPlay(1);
}



My PHP code:


PHP Code:





<?php
 
$sendTo = "me@me.com";
$subject = "comments";
$headers = "From: " . $_POST["fullname"] ."<" . $_POST["email"] .">
";
$headers .= "Reply-To: " . $_POST["email"] . "
";
$headers .= "Return-path: " . $_POST["email"];
$message = $_POST["message"];
 
mail($sendTo, $subject, $message, $headers);
 
// Why oh why isn't the next line working?

echo 'retval=1'; 

// I've also tried "retval=1", 'retval="1"', and "retval == 1"
?>







I should also mention that if I hit the submit button and look at the status bar, it hangs on "Transferring data from mydomain.com".

What am I doing wrong here? Help?

Receiving Variables From Php Using Flush()
Hi,
I have a php page on our intranet that contains many complicated queries.
The front end is a "flash mx" interface.

What I am trying to do is to echo-ing variables back from php to flash using the php-flush() function because I would like the user to see the progress of the page, as opposed to sending it at the very end, after all the queries are executed.(the php-page itself takes about 2 minutes to run).

In flash I am using loadVariables to access the page; but somehow flash only accepts new variables if the whole php-page is loaded completely, and ignores the flushed variables in between.(while they are echo-ed correctly)

My question:
1) How does flash know when a file is loaded completely?
2) Can variables be send the way I described it?
3) Could using XMLSocket provide a solution?

kind regards
Patrick

Sending Variables To PHP, Checking, And Then Sending Back
ok heres the deal:

Im making this email form in flash 2004, and I can get it to send emails and all and great so now im going back and making it error check... so basically it sends out my variables to the PHP file, checks to see if the email is from a real domain among other things, and then depending on what it sends back it will do a certain action... I can get it to send my variables but not sure how to load the variables back in to flash after the calculations are done...this is like my first flash that uses all this so im quite a n00b at it.. thanks

Receiving Form With Text Specifications
I made a form in flash an everything is working good
but when i receive it in my mailbox
flash send also the specifications of the inputtext
like:

name: <TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="Arial" SIZE="12" COLOR="#000000">the name</FONT></P></TEXTFORMAT>


How can i prevent this so i receive a mail only with the data i need
name: the name



can anybody help me?

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