first the thory: if you used the print instead of die, and both mails were failing, the result would be
&mail_error=yes&EmailStatus=...&mail_error=yes&Ema ilStatus=...&mail_error=no&EmailStatus=Complete
Flash waits for the entire message and then reads it left to right, so the result would indicate delivery
now real life: on most systems mail just accepts mail for delivery and is always successful if there is still some space left on the server disk to store the mail - the only possible error occurs if the mail function is not allowed, or if the server has changed the mail function to send only to specific addresses. It is possible to check the existence of the destination domain, but you would do that in your script
Hello again,
things are a bit hectic here.. I just found out Im going to be a daddy..:o) So needless to say, my mind has been a bit boggled..LOL
Ok, now back to what we were doing.
Before I left, I wrote a message and told you what you needed to do in oder for your MC to recieve the variables from PHP.
You can remove the
EmailStatus = "Blah blah blah";
in the error and success frames and replace it with this:
EmailStatus = _root.EmailStatus;
This will call the message that was sent by PHP on error or success..
I myself like to load all variables into the _root timeline then call them when needed from other clips.
You have a variable called EmailStatus within your mailMc.
You also have a varialbe called EmailStatus on the _root timeline that contains the err/succes data returned from PHP.
EmailStatus within mailMC does not know about the EmailStatus var on the root timeline..
In order for the emailMC EmailStaus var to contain the returned PHP messages, you have to point it in the right direction.
If you put this line in like I quoted above, it means that the EmailStatus varialbe in mailMC is now equal too and contains the data of the returned EmailStatus varialbe on the _root timeline.
EXAMPLE:
EmailStatus = _root.EmailStatus;
All of your variables are on the _root timeline and have to be called from the _root from your other MC's..
You may be asking:
Why not just declare the location of the varialbes directly from PHP, like this:
Print "&mail_error=no&_root.mail.EmailStatus=Complet e - YOUR QUOTE REQUEST HAS BEEN RECEIVED";
Well what if you move your movie clip? Or add somemore routines?
By loading your vars into the root it gives you the freedom to call them absolutely. There postion will not change and the vars are always available no matter what you name your MC or how deep it is buried in other clips.
If you would like, I will put up your script and flash on my site and show you that it was working on my *nix server..
just wait till your kid turns 2 then boggled turnes to sheer terror
but congats anywho
dont feel bad about being a begginer at php as your not the only one
but hey your moer advanced than me i only an hour ago got hosting that has php and mysql so i hope to script my first php soon
I now understand what was causing my problem. No EmailStatus on my root timeline. This makes all the difference huh?
Never the less, with a few minor changes to the actionScript, I do have this working! I will go back at try to impliment those items I left out and see if I can get it working. I'll let you know!
Its not that you dont "HAVE" an EmailStatus on the _root, you do. You dont need to declare it becuase its a variable being returned from PHP.
The problem is that you need to tell the EmailStatus variable within your mailMC that it is supposed to be the one on the _root.
EmailStatus = _root.EmailStatus within your mailMC will make the EmailStatus variable within mailMC contain all the data that the one on the root contains.
I think you are over thinking it a bit.
Any variable that is on the _root or anywhere else can be called from anywhere with the right targeting.
I dont want to say much more or I think I will confuse you even more..LOL
You might be right about the over-thinking part!! <<at myself
Funny you should mention this. I know that at the begining of this process I had my EmailStatus variable (in my mailMC) pointed towards EmailStatus =_root.EmailStatus. The actionScript loop was set up to have EmailStatus look back to the _root time line for the variable passed from php. I was unable to get this working - I'm sure due to something I was not doing.
Question about theroy:
When passing varaibles from php back to FLASH's _root timeline, am I understanding correctly that FLASH will simply take these variables in, even if those variables are not declared on _root; giving them a place to park before called on?
I'll be giving this a go later today!
Last edited by hothousegraphix; 04-29-2003 at 06:50 AM.
Hi,
when you "load" the variables into flash it makes them available.
Why dont you send me your current FLA and mail form and Ill see if I can get it working on my server. This will make it a bit easier to to debug if we are bothing working on the same version.
This .fla is performing all the mail functions. For this to function from my server, I've placed the loadVariables action on the submit button and eliminated the loop searching for mail_error from php which was in frame 2.
I thought sometime ago that it might be a good idea to let you know that little piece of information.
I might just go ahead and upgrade. Let me see what I can find online.
Hey, I like the BG color of the text fileds - very nice touch!
I did notice something though, I seem to be getting the "symbol no available" symbol in place of the intended ">>>" and ":" in the .swf
you zipped.
The font I'm using is "hooge 05_53". It seems to be right there in what you sent, but, the special symbols aren't.
This was obviously not occuring on my machine prior to viewing this updated version. I was using static text.
I'm not quite sure why this is occuring. When I look at the form I uploaded to my server, on another machine, that does not have the font installed; I still see the intended ">>>" and ":".
Any Ideas?
Last edited by hothousegraphix; 04-30-2003 at 03:18 PM.
Hi,
well I have always had that problem with my hoog fonts, non of the special characters show up. I thought it was just that way cause it was free..lol
Ok, I modified the looping to flash 5 style and resaved as flash5 compatable..
It works, as I just tested it on my server..