A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: Trying to execute simple .php from flash

  1. #1

    Trying to execute simple .php from flash

    Hello, I have a flash video on the first frame of my project. Once the video is finished, it is set to go to the 2nd frame and stop. That part works great. I'd like to set it up to send an email notification on that 2nd frame. Don't worry, this isn't a low-brow type of thing. (The presentation is going to one person and the email will go to him as well.) Anyway, I've created a .php file that will automatically fire the email off when the page is loaded, but I'd like to be able to execute that .php file from my flash presentation. I don't want to launch a pop-up window or anything if I don't have to.


  2. #2
    Senior Member calmchess's Avatar
    Join Date
    Sep 2006
    Use loadVars to execute that php script no popup window necessary.

    PHP Code:
    var myLoadVars:LoadVars = new LoadVars();
    myLoadVars.onLoad = function(success) {
        if (
    success) {

  3. #3
    Senior Member
    Join Date
    Oct 2008
    PHP Code:
    submit.onRelease = function(){
    sendMail = function(){
    mail_content:LoadVars = new LoadVars;
    reciever:LoadVars = new LoadVars;
    mail_content.senderName nameInput.text;
    mail_content.senderMessage messageInput.text;
    mail_content.senderEmail "thereciever@domain.com";
    reciever.onLoad = function(){
    sendCompleted = function(){
    sendStatus "The message has been sent";

    PHP Code:
    $message $_POST[senderMessage];
    $name $_POST[senderName];
    mail($sendTo,"Mail from "$name,$message);
    That should work

  4. #4

    Thanks for your help!!!

    Thanks so much for your help guys!!! I greatly appreciate it.

  5. #5

    Another question on this subject

    I was able to add this script to my 2nd frame:

    var myLoadVars:LoadVars = new LoadVars();
    myLoadVars.onLoad = function(success) {

    if (success) {


    It works great. Now, to make it more confusing, is there a way to apply this script so it occurs at a specific point during the video (which resides in my 1st frame). I guess what I'm asking is can I make a cue point trigger this action? I've not worked with cue points before, but I have to think that there is a way to assign some sort of action (or this specific script) to a cue point. I just don't know how to do it. Any suggestions greatly appreciated. Again, thanks so much for your help! You guys are awesome!

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