A Flash Developer Resource Site

Page 2 of 2 FirstFirst 12
Results 21 to 35 of 35

Thread: php novice : without a clue

  1. #21
    Registered User
    Join Date
    Feb 2001
    Posts
    13,041
    Hi,

    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

    Musicman

  2. #22
    Hey, thanks for responding.

    So, this being the case, I should be ok leaving everything as is, now that all is working correctly <<< Correct?

  3. #23
    Official FK nice guy and MOD 3PRIMATES's Avatar
    Join Date
    Apr 2002
    Location
    Portland Oregon
    Posts
    1,645
    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..

    3PRIMATES

  4. #24
    Senior Member
    Join Date
    Apr 2003
    Posts
    105
    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
    im like a superhero with no powers or modivation

  5. #25
    Congats

    If you weren't tired now, just wait! Rest up!

    Again thanks!

    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!

    Again thanks!

    Congrats!!!!!!!!!!!!!!!!

  6. #26
    Official FK nice guy and MOD 3PRIMATES's Avatar
    Join Date
    Apr 2002
    Location
    Portland Oregon
    Posts
    1,645
    Hi,
    thanks...

    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

    Keep me informed

    3PRIMATES

  7. #27
    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.

  8. #28
    Official FK nice guy and MOD 3PRIMATES's Avatar
    Join Date
    Apr 2002
    Location
    Portland Oregon
    Posts
    1,645
    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.

    3PRIMATES

  9. #29
    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.

    This is the .fla Zipped

    Also, I've had to change the path to EmailStatus from the Print function in the php script to _root.mail.EmailStatus.
    PHP Code:
    Print "&mail_error=no&EmailStatus=Complete - YOUR QUOTE REQUEST HAS BEEN RECEIVED";

    //Changed to

    Print "&mail_error=no&_root.mail.EmailStatus=Complete - YOUR QUOTE REQUEST HAS BEEN RECEIVED"
    Thanks!

  10. #30
    Official FK nice guy and MOD 3PRIMATES's Avatar
    Join Date
    Apr 2002
    Location
    Portland Oregon
    Posts
    1,645
    Hi, ok...

    Well here it is. I made some changes to the PHP.

    Made changes to your FLA in several places.

    Added the OnEnterFrame loop.

    Added some background color to your text fields(thought you might like the way it looks).

    Removed your dropdowns from the _root and placed them in the mail MC.

    Re ordered the error and success frames, and added another frame called load_vars.

    Made some basic cganges to show you how others may do things.

    I know this works. I just used it, just the way it is..
    Place all the files in the zip on your server and load the html page.

    Have fun..

    3PRIMATES
    Attached Files Attached Files

  11. #31
    Thanks for taking a look.

    Are you working in FLASHMX.

    Can't open .fla file. I'm getting the Unexpected File Format message.

    I have V5

  12. #32
    Official FK nice guy and MOD 3PRIMATES's Avatar
    Join Date
    Apr 2002
    Location
    Portland Oregon
    Posts
    1,645
    Hi, LOL..
    No wonder it will not work for you, onEnterFrame functions do not work in flash 5..

    Ill see what I can do..
    Give me a bit..
    3PRIMATES

  13. #33
    What a boob I am!!!

    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.

  14. #34
    Official FK nice guy and MOD 3PRIMATES's Avatar
    Join Date
    Apr 2002
    Location
    Portland Oregon
    Posts
    1,645
    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..

    Hope it helps..
    Attached Files Attached Files

  15. #35
    I can't thank you enough!

    You help has been invaulable!

    If you're at all interested. This is a link to what I'm working on:

    Very incomplete<<<

    Again Thanks for your help!!!


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center