Skip to main content
January 8, 2008
Question

Using Flash .swf/sendmail.php

  • January 8, 2008
  • 1 reply
  • 327 views
In what has become an endeavor of epic proportions, I am still trying to find ANY effective and logical way of sending a basic email to a hardcoded email account from a Captivate .swf file. I just want my users to enter their name and email address in a text field and click a Submit button to send an email to a hardcoded email account.

I have had no luck in achieving this functionality using Captivate solely, but I have discovered one glimmer of hope...using a Flash .swf object that calls a sendmail.php page on my web server. As a test, I have uploaded the .swf and sendmail.php files to my personal web server (which runs PHP) and it works great. However, if I take that same Flash .swf file and import it into a Captivate project, export to .swf, and copy the exported Captivate .swf (containing the Flash .swf) and sendmail.php file to my server, the Flash .swf doesn't work at all. Any thoughts? Could it be that the Captivate .swf can't find the required sendmail.php file?

Thanks,
Brian
    This topic has been closed for replies.

    1 reply

    Participating Frequently
    January 8, 2008
    When importing SWF files, code in the imported movie often fails for one of two reasons:

    1) The code in the imported SWF doesn't expect to be a sub-movie inside another movie, meaning references to the internal structure of the movie are incorrect.

    If that's the case and you don't have access to the SWF source code (in .FLA format), your only hope may be to not import the SWF and instead find a way to call the SWF on it's own, possibly via the Open URL or file option on the next to last slide of your project.

    2) The Captivate movie may not support one or more add-on Flash components needed by the imported SWF to do it's thing.

    For example, Flash lets you import enhanced functionality from external Flash libraries and is smart enough to include that extra functionality when you compile to SWF. Captivate knows nothing about the special needs of imported SWFs, so when compiling your project those enhanced components may not be supported.

    If you're stumped, I suggest you take a look at the following Developer Center article.

    http://www.adobe.com/devnet/captivate/articles/store_cpresults.html

    Since you already have a PHP page that sends an e-mail, you might be able to adapt the technique shown in the first few pages of the article to pass the e-mail data directly to the PHP page without needing an embedded SWF.
    January 8, 2008
    jb,

    Thanks for the great info. I will most likely just link to the separate .swf file from Flash since that seems to work best. I will take a look at the link provided as well.

    Brian