Professional Web Applications Themes

Form does not work when it?s laying in a movieclip - Macromedia Flash Flashcom

I have isolated the problem and it?s seems to be concentrated to the path ?mcForm.skickat eq "yes" below: (the serverside script is done in Php) I t seems like the form not works when it?s laying in a movieclip called mcForm with a send button simply called ?send? I must place the form in a movieclip, because the form is doing a nice tweening made by Laco tweening method. Everything works fine if [bold]I don?t place[/bold] the form in a movieclip. Here?s a part of the actionscript in the main timeline navigation.swf: if (mcForm.skickat eq "yes") { gotoAndStop("labelFinished"); } Here?s ...

  1. #1

    Default Form does not work when it?s laying in a movieclip

    I have isolated the problem and it?s seems to be concentrated to the path
    ?mcForm.skickat eq "yes" below: (the serverside script is done in Php)

    I t seems like the form not works when it?s laying in a movieclip called
    mcForm with a send button simply called ?send?
    I must place the form in a movieclip, because the form is doing a nice
    tweening made by Laco tweening method.

    Everything works fine if [bold]I don?t place[/bold] the form in a movieclip.

    Here?s a part of the actionscript in the main timeline navigation.swf:

    if (mcForm.skickat eq "yes") {
    gotoAndStop("labelFinished");
    }

    Here?s the actionscript on the ?send? button in mcForm in navigation.swf:

    on (release) {
    loadVariables("http://www.homesit.se/phpmail.php", "", "GET");
    _parent.play();//This statement is not the problem.
    }

    The timeline in navigations.swf does never reach the label ?finished?

    This works fine if I don?t place the form in a movieclip in timeline
    navigation.swf:


    if (mcForm.skickat eq "yes") { //this path is the problem
    gotoAndStop("labelFinished");
    }

    Here?s serverscript in php:
    (I have no problem here)

    <?
    $headline = "Mail from your Homesite";
    $text = "$name has sent you mail from your homesite
    He/she wrote this:

    $message
    ";
    mail($mymail, $headline, $text,
    "From:".$email."\nReply-To:".$email);
    echo("send=yes");
    ?>

    What could possible be wrong

    I appreciate every answer.


    :smile;

    highlander_1 Guest

  2. #2

    Default Re: Form does not work when it?s laying in a movieclip

    The root of the problem (from looking at the code you posted) is that there is
    no event that determines what should happen when your data comes back from PHP.
    When using loadvariables, you'd need an onData event for mcForm, like:

    mcForm.onData=function(){
    // do something
    }

    The next problem I see is that the code on your main timeline is checking for
    the value of mcForm.skickat, but you don't seem to be defining that variable
    anywhere. The php script returns a variable named "send", but I don't see
    skickat anywhere. If it's not defined, it's value will always be "undefined".

    To make things more efficient, you really should be using loadVars and a
    reponsed handler instead of loadVariables. When you use loadVariables, all of
    the variables in the movie clip are being sent to your php script, which really
    just a waste of data transfer. By using loadVars, you'll specify which vars to
    send, making the whole process more efficient. See the docs... it's all in
    there (with examples).

    BTW... this is the Flash Media Server forum. In the future, you might want to
    post questions like this one in the general flash or actionscript forum, as
    you'll get more responses (more people read in on those forums)


    JayCharles Guest

  3. #3

    Default Re: Form does not work when it?s laying in a movieclip

    LoadVars,ok
    Sorry for posting in the wrong forrum
    :-)
    highlander_1 Guest

Similar Threads

  1. Laying Out Classifieds
    By Janelle_Evans@adobeforums.com in forum Adobe Indesign Windows
    Replies: 4
    Last Post: April 28th, 09:16 PM
  2. Button inside movieclip ... don?t work
    By Salau in forum Macromedia Flash Actionscript
    Replies: 1
    Last Post: February 14th, 06:08 PM
  3. MovieClip Buttons won't work
    By bojamels in forum Macromedia Flash Actionscript
    Replies: 2
    Last Post: February 14th, 05:20 AM
  4. trying to get a button to work within a movieclip
    By cyberdyn webforumsuser@macromedia.com in forum Macromedia Flash Sitedesign
    Replies: 2
    Last Post: November 27th, 01:20 AM
  5. Need help laying a film over an image
    By GTP webforumsuser@macromedia.com in forum Macromedia Fireworks
    Replies: 4
    Last Post: October 11th, 09:53 PM

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
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139