Flash CS3

Free tutorials and scripts for all

Sometimes members don't get their activation email.
This happens because it gets deleted by accident, your spam folder gets it ... lots of reasons.
To Resend the account activation code you need to do two things:
1. Go here: Resend your activation email
2. Enter the email address you used when you signed up and click "Email activation codes"
3. When the email arrives in your inbox, be sure to click the link to activate your account.

Simple Email Form Problem

This is a discussion on Simple Email Form Problem within the PHP | mySQL | Flash CS3 forums, part of the Flash CS3 eng category; Hi.. I currently have this written in my flash page for an email form linking to an external php form. ...


Go Back   Forum Flash CS3 > English Forums > Flash CS3 eng > PHP | mySQL | Flash CS3

Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read
  1 links from elsewhere to this Post. Click to view. #1 (permalink)  
Old 19-04-08, 14:15
Junior Member
 
Join Date: Mar 2008
Posts: 3
Rep Power: 0
chosendesigns is on a distinguished road
Simple Email Form Problem

Hi.. I currently have this written in my flash page for an email form linking to an external php form. It should be that when you click the submit button (submit) the email.php script is run and it goes to page 2 of my flash site giving a confirmation message.

Here is my flash code:

PHP Code:
submit.addEventListener(MouseEvent.CLICK,function():void {

var
emailform:URLRequest = new URLRequest();
emailform.url = "email.php";
gotoAndStop(2);
}
);



Ive tried my php script with a standard html form and it works just fine so my php code works its just I dont understand how to link php to flash properly.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #2 (permalink)  
Old 26-04-08, 10:28
tem's Avatar
tem tem is offline
Moderator
 
Join Date: Jan 1970
Posts: 435
Rep Power: 39
tem is on a distinguished road
Re: Simple Email Form Problem

Hi!
you need to use a method like this one:

Code:
private function inviaDati():void
		{
			var variables:URLVariables=new URLVariables();
                        //here I set the variables to send to the php
			variables.fieldOne=my_var1;
			variables.fieldTwo=my_var2;
			variables.fieldThree=my_var3;
			var richiesta:URLRequest=new URLRequest();
			//cambia l'url del file php in base a dove lo metti  :))
			richiesta.url='http://www.miosito.com/mioFile.php';
			richiesta.method=URLRequestMethod.POST;
			richiesta.data=variables;
			var loader:URLLoader=new URLLoader();
			loader.dataFormat=URLLoaderDataFormat.VARIABLES;
			addListeners(loader);
			try 
			{
				loader.load(richiesta);
			} 
			catch (error:Error) 
			{
				trace('Unable to load requested document.');
			}
		}
		
		private function addListeners(d:IEventDispatcher):void
		{
			d.addEventListener(Event.OPEN,inizio);
			d.addEventListener(ProgressEvent.PROGRESS,inProgresso);
			d.addEventListener(Event.COMPLETE,completato);
			d.addEventListener(SecurityErrorEvent.SECURITY_ERROR,securityError);
			d.addEventListener(HTTPStatusEvent.HTTP_STATUS,httpStatus);
			d.addEventListener(IOErrorEvent.IO_ERROR,ioError);
		}
		
		private function inizio(e:Event):void 
		{
			debug_txt.text='Connecting to the server...';
		}
		
		private function inProgresso(e:ProgressEvent):void 
		{
			debug_txt.text='Sending...';
		}
		//if the php file sends back an echo "answer=ok";
		private function completato(e:Event):void
		{
			var loader:URLLoader=URLLoader(e.target);
			var vars:URLVariables=new URLVariables(loader.data);
			if(vars.answer=='ok')
				debug_txt.text='Thank you the message has been sent';
			else
				debug_txt.text='Sistem Error please try again';
			
		}
__________________
http://www.thetconcept.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads

Thread Thread Starter Forum Replies Last Post
Email Form PRO Flep FlepStudio utilities 29 27-08-08 17:16
Email Form PRO Flep Utilità di FlepStudio 32 23-08-08 17:37
Email form con Flash CS3 e PHP Flep Utilità di FlepStudio 87 30-07-08 10:19
Email form Flep FlepStudio utilities 20 06-07-08 19:05
Flash CS3 email form AS2 seokutsa Flash CS3 | PHP | mySQL 1 15-02-08 10:06


All times are GMT. The time now is 19:18.


Powered by vBulletin versione 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC4
Forum SiteMap

FlepStudio
by Filippo Lughi
P.IVA 03605860406