Welcome to TalkGraphics.com
Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Hybrid View

  1. #1
    Join Date
    Apr 2001
    Location
    Northern Ireland
    Posts
    788

    Default

    So far...

    1) I built a form.
    2) I created the 'hidden' variables as good old vars
    eg:

    submit_to = "me@my_address.com";

    3) I created a variable input box and gave it a name.

    4) Then I added a submit button with the action:

    on (release) { getURL("../cgi-bin/my_mail_form.cgi","_blank","POST");

    But the mail form does not seem to receive any variables??

    Everything I read on the help pages and web seems to indicate that Flash will send all variables set in the movie to the cgi script - but it does not seem to see any :-(

    The script has all the right permissions and works, becase my old HTML page uses the cgi just fine.

    Is there something that I'm missing?

    Turan

    PS the script is being called - so it is finding it, but the lines that check the fields have been filled out are being displayed eg: 'No submit_to value entered'
    IP

  2. #2
    Join Date
    Dec 2000
    Location
    andalucía · españa and lower saxony · germany
    Posts
    2,125

    Default

    <BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR> on (release) { getURL("../cgi-bin/my_mail_form.cgi","_blank","POST"); <HR></BLOCKQUOTE>

    A clean form would look like this:

    On (Roll Over)
    Begin Tell Target ("mailer interactive01")
    Go to and Stop (3)
    End Tell Target
    End On
    On (Press)
    If (email eq "")
    Begin Tell Target ("mailer interactive01")
    Go to and Stop (4)
    End Tell Target
    Else
    Set Variable: "param_recipient" = "your_mail_account@your_server.com"
    Set Variable: "param_subject" = "message from whatever"
    Set Variable: "param_order" = "name,email,message"
    Set Variable: "param_database" = "flash_yourfilename.txt"
    Get URL ("http://your_server.com/cgi-bin/your_forms.cgi", window="_blank", vars=POST)
    Play
    End If
    End On
    On (Roll Out)
    Begin Tell Target ("mailer interactive01")
    Go to and Stop (1)
    End Tell Target
    End On

    But this is only part of it. Keep in mind that you need to "collect" your data first, that means the variables you have specified start at the beginning of the scene and stay until the last frame of the scene.

    OK, let's say the users have to fill in 'name'. The name variable MUST exist until you trigger the form data to be sent to your cgi. Many people clear the data of the variables too soon, that means you should give some 10 frames extra after triggering the data, because of the delay while the browser opens up.

    In addition you need a JavaScript that enables your FLASH to open up a new window in your browser (but only for online forms, not for offline forms).

    It's very tricky, I know, but I hope this helps a bit.

    jens g.r. benthien
    designer
    http://www.sacalobra.de

    ----------//--
    If you don't know how to dream you'll never be a designer.
    ----------//--
    --------------------//--
    We can't solve problems by using the same kind of thinking we used when we created them.
    --------------------//--
    IP

  3. #3
    Join Date
    Apr 2001
    Location
    Northern Ireland
    Posts
    788

    Default

    I tries this:

    form_id = "FORM_CONTACT";
    myLoadVars = new LoadVars();
    myLoadVars.send("../cgi-bin/test.txt");

    Hoping that the form_id variable would be sent to a file called test.txt.

    But this does not work either.

    Can anyone tell me if there is anything wrong with this script?

    I was hoping I could get somewhere if I could just send a variable out of FLASH into a file!

    Turan
    IP

  4. #4
    Join Date
    Apr 2001
    Location
    Northern Ireland
    Posts
    788

    Default

    no joy

    I'm getting to the point were I'll have to call an html page with the form in it - but it will spoil the look of the flash site.

    I've changed from getURL to loadvars.send and created a 100 frame delay. but nothing

    The script is being called from FLASH so I know I'm very close. I know the script works when called from HTML so I know it is not something about the host machine sending data to the cgi script. I just can't seem to get the variables out of FLASH and into the script.

    Any suggestions?

    Turan
    IP

  5. #5
    Join Date
    Apr 2001
    Location
    Northern Ireland
    Posts
    788

    Default

    I give up - I will blame it on the hoster

    I just checked that the variables were being set by creating dynamic text boxes in the MC.

    So I know that inside flash the data variables ARE being set. I've used both getURL and loadVars.send and nothing seems to work.

    But many many thanks for trying to help. I think I will tinker with it over time - but I must have spent 3+ complete days just chaning things - uploading trying and back to changing with no joy.

    Turan
    IP

  6. #6
    Join Date
    Dec 2000
    Location
    andalucía · españa and lower saxony · germany
    Posts
    2,125

    Default

    <BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR>I tries this:

    form_id = "FORM_CONTACT";
    myLoadVars = new LoadVars();
    myLoadVars.send("../cgi-bin/test.txt");

    Hoping that the form_id variable would be sent to a file called test.txt.

    But this does not work either.

    Can anyone tell me if there is anything wrong with this script?

    I was hoping I could get somewhere if I could just send a variable out of FLASH into a file!

    Turan<HR></BLOCKQUOTE>

    huh. That's tough. Which FLASH version are you using? If it's 4 or 5, I can continue to help.

    How do you know that the cgi does receive your data?

    Something else: I guess you've transferred your *.cgi via ftp to the server. This **must** be done as a textfile, not as binaries or anything else.

    Once on the server - provided that the cgi actually does receive the data - you should do a chmod. Either with your ftp if it can handle these commands, or with telnet or you should ask your provider.

    chmod 755 my_form.cgi

    or whatever your cgi name will be.

    Reason: the file on the server must be able to read and write. Usually all files transfered to your server's cgi-bin are not 755 or 777, so they can't write - which they must if you need an output, because the cgi will send the data to the mail server.

    Did you check the path to your cgi? Some providers don't disclose it, so /mydomain.com/cgi-bin is not always true. In addition you need to know where your sendmail is located on the server.

    I'll attach a 'helper' cgi for you to check your server. Instructions are included.

    jens

    jens g.r. benthien
    designer
    http://www.sacalobra.de

    ----------//--
    If you don't know how to dream you'll never be a designer.
    ----------//--
    Attached Files Attached Files
    --------------------//--
    We can't solve problems by using the same kind of thinking we used when we created them.
    --------------------//--
    IP

  7. #7
    Join Date
    Dec 2000
    Location
    andalucía · españa and lower saxony · germany
    Posts
    2,125

    Default

    here is another cgi to control your server.

    upload it to your cgi-bin directory, open it with your browser -> http://your_domain.com/cgi-bin/genie.cgi

    go to the 'command line' and issue the chmod commands as posted above. Don't forget to close the window.

    jens

    jens g.r. benthien
    designer
    http://www.sacalobra.de

    ----------//--
    If you don't know how to dream you'll never be a designer.
    ----------//--
    Attached Files Attached Files
    --------------------//--
    We can't solve problems by using the same kind of thinking we used when we created them.
    --------------------//--
    IP

  8. #8
    Join Date
    Aug 2000
    Location
    Toronto, Ontario, Canada
    Posts
    432

    Default

    Question: are you using Flash MX?

    Are you using the LoadVars object?

    For the getURL thing, try changing POST to GET, and see if the vars are actually being passed. If they're not being sent by GET (you should see them in your query string in the browser address bar), then you know the problem is with the Flash movie. If the variables are being sent by GET then it's 99% sure they're being sent by POST as well, and the problem lies in your CGI script. Can you dump what you're receiving when the script is invoked? For example, if you're using PHP, you'd just do a print_r($_POST); to see what's being sent...

    Let us know...


    hth,
    Deep (just a guy)
    <font face="arial" size="2">
    Pradeep Kumar Nair, B.Math
    Content Manager
    9 Story Entertainment
    http://www.9story.com
    ICQ: 39102360
    </font>
    hth,
    Deep (just a guy)
    --
    Pradeep Kumar Nair, B.Math
    CTO
    9 Story Entertainment
    http://www.9story.com
    IP

  9. #9
    Join Date
    Apr 2001
    Location
    Northern Ireland
    Posts
    788

    Default

    I get this (attached pic) I I remove the checks

    At the end of the day, data_required is just a variable like submit_by.

    While data_required is hidden and set by me in the FLASH file and submit_by is an input text box set by the user when the FLASH is run both are just bits of data sent to the cgi script (or should I say SHOULD be sent).

    So as suspected, if data_required variable is not being sent then submit_by will not be sent either.

    Turan
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	result.gif 
Views:	951 
Size:	4.0 KB 
ID:	12073  
    IP

  10. #10
    Join Date
    Apr 2001
    Location
    Northern Ireland
    Posts
    788

    Default

    The cgi runs fine. If I call it from an HTML page. It works and receives all data required.

    The cgi is called also from flash. However there is a data_required variable that I send to the cgi script. It lists what the user must enter (leaving out what is optional).

    The script runs ok, but when it gets to the point were it checks this variable it outputs to the _blank window that that variable is not set! Hence in giving me a run time error I know it is running!!

    So I know the cgi is working that the permission have been set etc (becase (a) it runs when called frmo HTML and (b) that it also runs when called from FLASH, but it just does not recevie the variables.

    Check out www.sldi.co.uk/new.htm (click on contact)as you can see I resorted for now to the html form but I really wanted a FLASH form.

    If you look at the current (non-flash) site www.sldi.co.uk you will see that the form works fine there.

    Turan
    IP

 

 

Bookmarks

Posting Permissions

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