A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Sending from Flash MX

  1. #1
    Junior Member
    Join Date
    Oct 2002
    Posts
    10

    Sending from Flash MX

    People,

    I have made a form in Flash with a "send" button, to send an e-mail. I use this code to send the e-mail on the send buttonclick:
    Code:
    on (release) {
    var c = new LoadVars();
    c.naam = naamval;
    c.bedrijf = bedrijfval;
    c.adres = adresval;
    c.pcplaats = pcplaatsval;
    c.telefoon = telefoonval;
    c.email = emailval;
    c.ik_wil_een_abonnement = _level5.ik_wil_een_abonnement.getValue();
    c.stuur_brochure = _level5.stuur_brochure.getValue();
    c.uitnodiging_seminar = _level5.uitnodiging_seminar.getValue();
    c.papierinfo_over_proefone = _level5.papierinfo_over_proefone.getValue();
    c.send("sendmail.asp","newwindow","POST");	
    gotoAndPlay(2);
    }
    This works fine, the ASP file sendmail.asp does actually send the e-mail. But.... it opens a new window, which I don't want. But if I let the c.send post to self, it overwrites the flash file itself...

    On the ASP file I have put a "self.close();" javascript, but that asks the user if its ok to close the window.

    Is there another way of doing this so that it sends the e-mail but not open up a new window, or overwrite the flashfile.

    I don't know where to look.

    Best,
    Jaron
    -- Jaron
    Check out my playground @ www.sindono.com

  2. #2
    Developer
    Join Date
    Sep 2001
    Location
    The Bluegrass State Will Flash For Food
    Posts
    3,789
    Try this:
    Code:
    on (release) {
    	var c = new Object();
    	c.naam = naamval;
    	c.bedrijf = bedrijfval;
    	c.adres = adresval;
    	c.pcplaats = pcplaatsval;
    	c.telefoon = telefoonval;
    	c.email = emailval;
    	c.ik_wil_een_abonnement = _level5.ik_wil_een_abonnement.getValue();
    	c.stuur_brochure = _level5.stuur_brochure.getValue();
    	c.uitnodiging_seminar = _level5.uitnodiging_seminar.getValue();
    	c.papierinfo_over_proefone = _level5.papierinfo_over_proefone.getValue();
    	c.loadVariables("sendmail.asp", "POST");
    	gotoAndPlay(2);
    }

  3. #3
    Developer
    Join Date
    Sep 2001
    Location
    The Bluegrass State Will Flash For Food
    Posts
    3,789
    Or this:
    Code:
    on (release) {
    	var c = new LoadVars();
    	var cc = new LoadVars();
    	c.naam = naamval;
    	c.bedrijf = bedrijfval;
    	c.adres = adresval;
    	c.pcplaats = pcplaatsval;
    	c.telefoon = telefoonval;
    	c.email = emailval;
    	c.ik_wil_een_abonnement = _level5.ik_wil_een_abonnement.getValue();
    	c.stuur_brochure = _level5.stuur_brochure.getValue();
    	c.uitnodiging_seminar = _level5.uitnodiging_seminar.getValue();
    	c.papierinfo_over_proefone = _level5.papierinfo_over_proefone.getValue();
    	c.sendAndLoad("sendmail.asp", cc, "POST");
    	gotoAndPlay(2);
    }

  4. #4
    Junior Member
    Join Date
    Oct 2002
    Posts
    10
    Hi GSolo,

    Thanks for the suggestions, but the don't really work..

    The first one, still opens a new window, the last one does overwrite the current window with sendmail.asp

    Anyone any other suggestion?
    Best,
    Jaron
    -- Jaron
    Check out my playground @ www.sindono.com

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