Flash+Email_No PHP Whatsoever

Hi, I've built a site entirely on flash. The site needs a
section for emails. I am pretty much a newbie so I would like to be
explained on detail how to automatically send an e-mail, basically
composed by 2 ID fields (name and email) and a body Message. I want
the name to be part of the message body, but that I can do it.
As the title implies, the solution may not depend on the use
of other languages.

that's correct. if doesn't open your email client it may be
because you have a security issue (put your swf on the internet and
retest) or you don't have a default email client.

Similar Messages

  • Values from Flash to PHP

    I am using AS2 and passing some values from flash to php,  flash files is on page file1.php   values are passing fine , it pass values when user click button
    when button is pressed {  var myVal:LoadVars = new LoadVars(); myVal.flieName = "fileid1 "; myVal.send("file1.php", "_parent", "POST"); }
    Problem: when it pass the values , it refresh the page and Flash File is also refreshed and Flash file start from frame 1 and all the values on flash becomes default  in other words when user click "file1.php" is sumbitted , so the page is refreshed What is the solution , that after passing values the page remains or flash reamins as it is ( not refresh the contents )

    use:
    var receiveLV:LoadVars=new LoadVars();
    receiveLV.onData=function(src){
    var myVal:LoadVars = new LoadVars(); myVal.flieName = "fileid1 "; myVal.sendAndLoad("file1.php", receiveLV,"POST"); }

  • LoadVars-using send to pass a variable from flash to php

    For the life of me, I've tried everything:
    I've researched LoadVars on Adobe forum, used David Powers'
    books, googled 'flash to php', LoadVars, etc. and tried
    sendAndLoad, send, and using $_POST, $_GET, $_REQUEST.
    $HTTP_POSTVARS but I keep getting this same error. any advice
    please?
    I have a Unix server running Apache/PHP 4 - LoadVars worked
    to load name-value pairs into an array -see thread)
    My goal with this simple app is to prototype being able to
    pass a variable from flash to a variable in php.
    Parse error: syntax error, unexpected T_VARIABLE in
    flash_to_SQL.php on line 5
    Actionscript 2.0 code:
    var c :LoadVars = new LoadVars();
    c.testing = "123FOUR";
    c.send ("
    http://127.0.0.1/flash_to_SQL.php","_self","POST");
    php code: (I also tried $_POST, $_GET, $_REQUEST.
    $HTTP_POSTVARS)
    <?php
    //mysql 4.1.2, php 4 , NO mysqli
    ecbo $_REQUEST ['testing'];
    /?>

    var formData:LoadVars = new LoadVars();
    formData.fname = "Name";
    formData.send("
    http://www.website.com/flash_php.php",
    formData, "POST");
    <?php
    $name = $_POST['fname'];
    echo $name;
    ?>

  • Embedded Flash in PHP - Need help!

    Hello everyone!
    We're having problems embedding Flash-files into our .php-files, so I thought the best place to ask for help would be the official Flash-forums :-) First of all, I'll let you know what exactly we're doing....
    We have a few flash-files which you should only be allowed to view once you're logged in and authenticated to our "portal". You can only view those files over some sort of JavaScript-Popup-Flashplayer thing (personally not too much into JS). The JS-Player requires the flash-files to be available over an exisiting URL (such as http://page.domain/flash/file.swf) - And this is where the whole problem begins...
    After hours of research and conversing with my collegues and the project-management, we decided to use the following technique to still keep those URLs for the JS-Player while preventing the user from simply accessing our "top secret flash movies" by typing in the URL in their browser...
    We move the Flash-folder to a location outside of our document root -> Flash-files can't be randomly accessed or downloaded via the URL.
    We use an Apache-plugin called "mod_rewrite" to rewrite/redirect URLs that look similar to http://page.domain/flash/*.swf to a PHP-file -> We can work with REQUEST_URI to see which flash-file the user wanted to view. Now, inside that PHP file we check wether the user is authenticated or not and either embed the flash-file into the PHP-file or redirect him to an error-page. In theory, the user could still view the flash-file over the URL (without even noticing PHP, since the URL stays http://page.domain/flash/file.swf, hence a perfect fake, no? ;-) ) and everything actually works exactly the way we wanted..........IN FIREFOX!
    Now we went live with our application and we had to realise that one of the only things we haven't tested in other browsers (this being one of them) don't work the way we want and instead of viewing/playing the film, we get to see a white window in the JS-Player, while it's trying to download a file called "filename_swf" (underscore instead of dot?) when you access the movie over the URL (http://page.domain/flash/file.swf).
    How we embed Flash into PHP:
    Headers + outputting the flash-files content....
    header('Content-Type: application/x-shockwave-flash');
    header('Expires: Thu, 01 Jan 1970 00:00:00 GMT, -1');
    header('Cache-Control: no-cache, no-store, must-revalidate');
    header('Pragma: no-cache');
    echo file_get_contents($request);
    As I said, this works just fine in Firefox, however we're sure most of our users will be using IE, in which it doesn't work at all. I personally believe we're missing some sort of header or we have to set a different header depending on the browser...so I thought the best place to ask about Flash Headers would be the actual flash forums. Maybe I'm even totally wrong and missing out something crucial and someone can point me in the right direction...
    Thanks!

    Thank you for your help.
    I have uploaded the skin to the same directory as the video.
    It's now showing. Do I have to reference it on the code?
    http://www.custommlmleads.com/test.html
    skin :
    http://www.custommlmleads.com/VIDEO/SkinUnderPlaySeekStop.swf
    Thank you

  • Flash and PHP for login status

    Hello and thank you in advance for taking the time to read my question.
    I currently have a login utility that is the front end of a multi page site. The individual logs in and is then granted access to what ever their "authorization level" is.
    I wish to have my Flash website, request the users "authorization level" from our PHP server side script.
    I have already constructed a three page timeline, where depending on their "authorization level", they will be forwarded to the page that's matches that level however I'm having a heck of time finding a reasonable place to start.
    I have included a visual map of what i'm looking to accomplish as I've always found it easier to see what's being discussed.
    Again, thanks in advance for anyone that might be able to help. Additonally, i have attached the image to assist with review as well.
    Cheers

    You will need to send variables to PHP which will in turn send it to MySQL and check for the authorization level and then send back the result to Flash via PHP... I have a very general idea of this whole thing so I won't be able to help you much (I'm still a beginner in AS3), but you can check these places for some good video tutorials on the subject:
    http://www.developphp.com/Flash_tutorials/
    htttp://www.gotoandlearn.com
    and there's also some good tutorials on Cartoon Smart.
    Good luck!

  • High Score Table: Writing a Simple Text File with Flash and PHP

    I am having a problem getting Flash to work with PHP as I need Flash to read and write to a text file on a server to store simple name/score data for a games hi score table. I can read from the text file into Flash easily enough but also need to write to the file when a new high score is reached, so I need to use PHP to do that. I can send the data from flash to the php file via POST but so far it is not working. The PHP file is confirmed as working as I added an echo to the file which displayed a message so I  could check that the server was running PHP - the files were also uploaded to a remote server so I  could test them properly. Flash code is as follows:
    //php filewriter
    var myLV = new LoadVars();
    function sendData() {
    //sets up variable 'hsdata' to send to php
    myLV.hsdata = myText;
    myLV.send("hiscores.php");
    I believe this sends the variable 'myText' to the php file as a variable called 'hsdata' which I want the php file to write into a text file. The mytext variable is just a long string that has all the scores and names in the hiscore. OK, XML would be better way of doing this but for speed I just want to get basic functionality working, so storing a simple text sting is adequate for now. The PHP code that reads the Flash 'hsdata' variable and writes it to the text file 'scores.txt' follows:
    <?php
    //assigns to variable the data POSTed from flash
    $flashdata = $_POST["hsdata"];
    //file handler opens file and erases all contents with w arg
    $fh = fopen("scores.txt","w");
    //adds data to file
    fwrite ($fh,$flashdata);
    //closes file
    fclose ($fh);
    echo 'php file is working';
    ?>
    Any help with this would be greatly appreciated - once I can get php to write simple text files I should be ok. Thanks.

    Thanks for your help.
    I have got Flash working to a certain extent with PHP using loadVars but have been unable to get flash to receive a variable declared in PHP. Here's my Flash code:
    var outLV = new LoadVars();
    var inLV = new LoadVars();
    function sendData() {
    outLV.hsdata = "Hello from Flash";
    outLV.sendAndLoad("http://www.mysite.com/hiscores/test23.php",inLV,"post");
    inLV.onLoad = function(success) {
    if (success) {
      //sets dynamic text box to show variable sent from php
      statusTxt.text = phpmess;
    } else {
      statusTxt.text = "No Data Received";
    This works ok and the inLV.onLoad function reports that it is receiving data but does not display the variable received from PHP. The PHP file is like this:
    <?php
    $mytxt =$_POST['hsdata'];
    $myfile = "test23.txt";
    $fh = fopen($myfile,'w');
    //adds data to file
    fwrite($fh, $mytxt);
    //closes file
    fclose ($fh);
    $mess = "hello there from php";
    echo ("&phpmess=$mess&");
    ?>
    The PHP file is correctly receiving the hsdata from flash and writing it to a text file, but there seems to be a problem with the final part of the code which is intended to send a variable called 'phpmess' back to Flash, this is the string "hello there from php". How do I set up Flash and PHP so that PHP can send a variable back to Flash using echo? Really have tried everything but am totally baffled. Online tutorials have given numerous different syntax configurations for how the PHP file should be written which has really confused me - any help would be greatly appreciated.

  • Array data between Flash and PHP

    As the title suggests, I'm trying to find a good way of
    getting an ActionScript/Flash dynamic array into PHP, so I can
    serialize it and store it in a DB, then simply give back that same
    array when it's called. Are there any popular techniques? The array
    will always be a different size, containing different values -
    which is why I'd like to keep the array in tact, to minimise the
    amount of parameter transfers. If there's no good solution, I
    suppose I could pass in parameters and read them in, create an
    array and serialize that... but I'd much rather find a way of
    having my flasher serialize his own array and pass me the
    byte-code. Is this possible?
    PHP doesn't need to read the contents of the array, simply
    store it in a DB, so if there's some kind of flash method for
    serializing an array into bytecode that it can unserialize and read
    back later, that would be awesome.
    Thanks. =]
    [edit]
    I found this:
    http://sourceforge.net/projects/serializerclass/
    a serializer class. Is this the best method?

    Sorry, I should have explained, we already use XML for data
    transfers (though I personally find JSON much nicer with less
    overhead). So, in this project, we use XML for data transfer
    between flash and PHP/Database. The reason I wanted this
    functionality, is because the flash array, in this one case, will
    be completely dynamic and the PHP doesn't need to know the contents
    of the array at all. In fact, in this instance, PHP is just the
    mechanism used for storing the data. Becuase of the nature of the
    data, I wanted to serialize the flash array, store it in the
    database as Bytecode, then when the flash needs that information
    again, I can pass back the same bytecode, which can then be
    unserialized back into the original array.
    I think I've found the solution, the one I linked in the
    original post. I should know if it's as effective as I want it to
    be in the next couple of days when my flasher gives it a try. =]
    Thanks for the responses. If anyone has any other ideas,
    please throw them in here.

  • Flash, AS3, PHP, & Query Strings

    I think what I am after is pretty simple but unfortunately, I
    don't know much php. Basically what I am looking for is this.
    I want to pass a query from the browser address to a flash
    document.
    For Example, if someone visits.
    http://www.whatever.com/tour?mls=123456789
    (or tour.php?mls=123456789, whatever is easiest)
    A document opens, resizes the browser (optional but would be
    nice), and loads a flash SWF. It also passes the mls=123456789
    string into flash to a variable mls.
    Any ideas?
    Thanks!
    Drew

    Try: URLLoaderDataFormat.VARIABLES

  • How to overwrite  the xml file by  flash using Php

    Hi
    i am creating getting data from the xml file ... and i am
    doing some Alteration in the xml file by flash after that flash
    producing the xml file i finished upto this process...
    nw i neeed to overwrite the xml file.... using Php.....
    can any one give me some idea ... to solve this issue
    ~~SK

    Flash Player cannot write XML files at all. but using
    php+flash we could do it .

  • Flash - XML - PHP together.....

    How to get xml data created by php in flash file (Action script 3).....?

    You would use a URLLoader in as3 and the as3 XML object which parses the XML text.
    check out:
    http://livedocs.adobe.com/flash/9.0/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=Liv eDocs_Parts&file=00000132.html#wp118987
    in the place of the Sample3.xml you just use your php script (which needs to generate correctly formatted xml)

  • Loading FLV in Flash using PHP

    Hello,
    I am using flash CS3 and am trying to load a flv using PHP.
    I have a PHP webpage with a SWF in it. In that SWF is a
    FLVPlayback component. I would like to be able to set the source
    for the FLV using a php URL e.g.
    http://www.example.com/index.php?v=12345
    I have searched for hours but still have not come up with a
    way of how to do this.
    Does anyone know. Any help would really, really be
    appreciated.
    Thankyou

    Is the problem in the actionscript or in the PHP?
    IE - did you trace out the "video" variable to know that it
    is getting there?
    If the variable is getting into the Flash, then trace out the
    contentPath of myFLVPlayer after it is set to make sure that things
    are working correctly. (To trace out on the server, I usually place
    a dynamic text box in the swf and set its .txt = what I want to
    see)
    If contentPath doesn't work, you can always use the
    myFLVPlayback.load() function - IE myFLVPlayer.load(video);
    If things are getting set correctly, then you are having a
    pathing issue, and need to make sure that the path for the load is
    set correctly.... IE contentPath = "path/to/flv/"+video;

  • Setting Parameters flash from php

    Hi my name is guy.
    I would like to set these parameters in flash using a
    php/mysql database :
    button1.maxQuantity
    button1.name
    button1.option1Name
    button1.option1Value
    button1.price ;
    How would I go about doing that?
    Thank You
    Guy
    Text

    1. The link seems to show what looks like a DataGrid
    component. In any case you have a multi dimensional set of data you
    need to attach to the send_lv. When the user selects an action to
    send the data to the server, you need to assemble it from the
    places you have it saved and attach to the send_lv.
    2. I am confused about button1. I do not think Flash
    Component Button component allow you to add variables. Plus the
    name does not seem to mean anything so I cannot correlate it to the
    screen. Is it the submission button? Are these the add to cart
    buttons?
    I think your problem is not so much sending data to PHP it is
    more being able to have the data you need to send to PHP available
    when the user takes that action. So perhaps you need to work on
    displaying what you want to send in the Flash output window and
    then worry about getting it to PHP. The LoadVars part is fairly
    straight forward.
    In general looking at the screen, you have items added to a
    list display which represents a shopping cart. At some point the
    user will interact to send the data to the server. The data needs
    accessed in a way you can attach to the send_lv. Perhaps you can
    simply loop through the display list. Or you could keep an internal
    array of objects where each object defines the items and this array
    is updated when add, edit and delete actions are taken by the user.
    For example in the array of object scenario looping a list of
    items we will be able to code like this:
    send_lv.totalItems = cart.length;
    for (var i:Number; i <= cart.length;i++)
    send_lv["productId" +i]. = cart[1].productId;
    send_lv["price" +i]. = cart[1].price;
    send_lv["quantity" +i]. = cart[1].quantity;
    On the PHP side you would have in $_POST or $_REQUEST
    something like this
    totalItems
    productId1
    price1
    quantity1
    productId2
    price2
    quantity2
    productId3
    price3
    quantity3
    But if the data is in a nice display component, looping
    through the display component will save the overhead of an
    additional storage place.
    So are we seeing a List component or a DataGrid for the
    shopping cart? That will help determine the code to pass the data
    to send_lv.

  • Flash and PHP contact form.

    Hi, I created a simple web site in flash cs4 with a contact form, however, when I press submit, no email is sent even though my site says it was successfully sent.  If anyone could give any advice on what I could possibly being doing wrong that would be great.
    Thanks, Anthony.
    Here is my actionscript and PHP:
    function submit(e:MouseEvent):void
    var variables:URLVariables = new URLVariables();
    variables.fromname = nameText.text;
    variables.fromemail = emailText.text;
    variables.frommessage = messageText.text;
    var req:URLRequest = new URLRequest("contact.php");
    req.data = variables;
    req.method = URLRequestMethod.POST;
    var loader:URLLoader = new URLLoader();
    loader.dataFormat = URLLoaderDataFormat.VARIABLES;
    loader.addEventListener(Event.COMPLETE, sent);
    loader.addEventListener(IOErrorEvent.IO_ERROR, error);
    loader.load(req);
    statusText.text = "Sending...Please wait.";
    function sent(e:Event):void
    statusText.text = "Your email has been sent.";
    nameText.text = emailText.text = messageText.text = "";
    function error(e:IOErrorEvent):void
    statusText.text = "Error, please try again.";
    sendButton.addEventListener(MouseEvent.CLICK, submit);
    PHP:
    <?php
    $sendTo = "[email protected]( I am aware this needs to be different)";
    $subject = "Email from Web site";
    $name = $_POST['fromname'];
    $from = $_POST['fromemail'];
    $message = $_POST['frommessage'];
    $message = stripslashes($message);
    $content = "Name: " . $name . "\n";
    $content .= "Email: " . $from . "\n\n";
    $content .= $message;
    if (mail($sendto,$subject,$content))
    echo 'response=passed';
    else
    echo 'response=failed';
    ?>

    I had the correct case in my code, so that was not the problem.  It appears that the there is no communication with the server.  Do you have any other ideas as to why the send button would not actually being contacting the server?
    Thanks for the help

  • Flash and PHP

    Hi, let's say I have a dynamic text field (variable name is "txt") that I wanted to read from a PHP file and output the contents from there.
    My AS code is:
    var myPHP:LoadVars = new LoadVars();
    myPHP.load("variables.php"); //my php file
    myPHP.onLoad = function(success:Boolean){
              if (success) {
                        txt= myPHP.msg; //displaying contents from php
    PHP code in variables.php:
    <?php
    // Define Variables
    $msg = ($_GET['msg']);
    // Send it to Flash
    echo "msg=$msg";
    ?>
    If I key in the url as follows and send something to the msg:
    variables.php?msg=Hello
    It will echo "msg=Hello", but the text field inside flash turns out to be empty, not undefined or anything. If however I hardcode the php file with:
    $msg = "Hello";
    It will still echo "msg=Hello" but the flash file will display the text accordingly.
    Can anyone tell me why? Thanks!

    if you want to read data, you'll use the load part of sendAndLoad.  and, if you're not sending any data, you'll need to hardcord your variables.  how else will you php assign variable values?
    but i'm pretty sure you want to be able to do both send variables and receive variables.
    so, use:
    var sendLV:LoadVars = new LoadVars();
    var receiveLV:LoadVars = new LoadVars();
    sendLV.send_msg="some message";
    sendLV.sendAndLoad("variables.php",receiveLV,"POST"); //my php file
    receiveLV.onLoad = function(success:Boolean){
              if (success) {
                        txt= this.return_msg; //displaying contents from php
    <?php
    // Define Variables
    $msg = ($_POST['send_msg']);
    // Send it to Flash
    echo "return_msg=$msg";
    ?>

  • Flash and PHP Code Alter

    I have a php code that talks back to my flash movie on "post"
    however I have recently added a more advanced feature and need some
    help altering the code to work.
    Right now the code is as such and works great because the
    message var. is located in the root of the movie:
    $message = $subscribe_message;
    But now I need the script to look in a MC called "newsPop"
    for the message var. I used a code similair to flash as such but
    did not work.
    $newsPop.message = $subscribe_message;
    Can someone please help me alter the code to work and look in
    the MC for the Var - remeber this is PHP code.
    Thanks in advance!

    don't change your php script.
    you can change your flash so your movieclip checks the _root
    timeline for the variable or change the way you call your php
    script so the variable is defined on your movieclip's
    timeline.

Maybe you are looking for