Professional Web Applications Themes

variable question - Macromedia Flash Flashcom

Variable Question i am trying to make a mail list subscribe form. This is the code I currently have for the submitForm() code: function submitForm () { sender.email = email_txt.text; sender.name = sender_txt.text; sender.pw = pw_txt.text; sender.pw-conf = pw-conf_txt.text; sender.digest = 0; ("http://mail.myeyesfail.com/mailman/subscribe/myeyesfailnews_myeyesfail.com","n ewWindow", "post"); } this should work, but I am getting a variable error on the line of: sender.pw-conf the error is as such: Left side of assignment operator must be variable or property. sender.pw-conf = pw-conf_txt.text; is a dash (-) invalid for variables? With the script I am working with, I need that variable to have a ...

  1. #1

    Default Variable Question

    Variable Question i am trying to make a mail list subscribe form. This is the
    code I currently have for the submitForm() code:


    function submitForm () {
    sender.email = email_txt.text;
    sender.name = sender_txt.text;
    sender.pw = pw_txt.text;
    sender.pw-conf = pw-conf_txt.text;
    sender.digest = 0;

    ("http://mail.myeyesfail.com/mailman/subscribe/myeyesfailnews_myeyesfail.com","n
    ewWindow", "post");
    }

    this should work, but I am getting a variable error on the line of:

    sender.pw-conf

    the error is as such:
    Left side of assignment operator must be variable or property.
    sender.pw-conf = pw-conf_txt.text;

    is a dash (-) invalid for variables? With the script I am working with, I need
    that variable to have a dash inside of it.

    Thanks

    - Webservant

    YuccaWeb Guest

  2. #2

    Default Re: Variable Question

    In action script - means subtract. Maybe if you put the variables name in quotes, like "think-smart"
    NSurveyor Guest

  3. #3

    Default Re: Variable Question

    In action script - means subtract. Maybe if you put the variables name in quotes, like from
    think-smart=34 to "think-smart"=34
    NSurveyor Guest

  4. #4

    Default Re: Variable Question

    I tried that before, and it comes up with an error,

    sender.'pw-conf' = pw_txt.text

    comes up with this error,

    Symbol=MailList, Layer=actions, Frame=1: Line 9: Expected a field name after
    '.' operator.



    YuccaWeb Guest

  5. #5

    Default Re: Variable Question

    try:
    sender.pw_conf = pw_txt.text;
    dk_says_hey Guest

  6. #6

    Default Variable question

    Hey,

    I'm trying to define a variable that has a variable in it, can this be
    done and what would be the syntax.

    I read the PHP manual section on variable variables but this is not what
    I'm looking for.

    This is what I'm trying to do:

    I'm loading values into an array and I need to define various different
    name arrays that have a common part in the name.

    $myarray1$variable[] = ( x value );
    $myarray2$variable[] = ( x value );

    Thanks,

    Carlos

    Carlos Ramirez Guest

  7. #7

    Default Re: Variable question

    On 2004-03-02, Carlos Ramirez wrote:
    > Hey,
    >
    > I'm trying to define a variable that has a variable in it, can this be
    > done and what would be the syntax.
    >
    > I read the PHP manual section on variable variables but this is not what
    > I'm looking for.
    >
    > This is what I'm trying to do:
    >
    > I'm loading values into an array and I need to define various different
    > name arrays that have a common part in the name.
    >
    > $myarray1$variable[] = ( x value );
    > $myarray2$variable[] = ( x value );
    >
    > Thanks,
    >
    > Carlos
    >
    Does this help?

    <?php
    $myarray1 = "array_one";
    $myarray2 = "array_two";

    $variable = "_var";

    ${$myarray1.$variable} = array(1, 2, 3);
    ${$myarray2.$variable} = array('a', 'b', 'c');
    $this_var1 = $myarray1.$variable;
    $this_var2 = $myarray2.$variable;

    print_r($$this_var1);
    print_r($$this_var2);
    print_r($array_one_var);
    print_r($array_two_var);
    ?>

    --
    Mike Peters
    mike [-AT-] ice2o [-DOT-] com
    [url]http://www.ice2o.com[/url]
    Mike Peters Guest

  8. #8

    Default Re: Variable question

    Carlos Ramirez wrote:
    > Hey,
    >
    > I'm trying to define a variable that has a variable in it, can this be
    > done and what would be the syntax.
    >
    > I read the PHP manual section on variable variables but this is not what
    > I'm looking for.
    >
    > This is what I'm trying to do:
    >
    > I'm loading values into an array and I need to define various different
    > name arrays that have a common part in the name.
    >
    > $myarray1$variable[] = ( x value );
    > $myarray2$variable[] = ( x value );
    >
    > Thanks,
    >
    > Carlos
    $prefix = '$myarray';
    $suffix = $variable;
    $code = $prefix . $suffix . "[] = ($value);"; // don't forget that ';'
    eval($code);

    Check here, this is good:
    [url]http://www.php.net/manual/en/function.eval.php[/url]

    --
    Nelson Menezes
    [url]http://burninghorizons.net[/url]
    Nelson Menezes Guest

  9. #9

    Default variable question

    well my last post went unanswered but I was able to answer 2 out of the three
    questions i had..now i just need to know one thing...how do i store the value
    of the following variable in a remote shared object...var0 = 1;

    could somebody plz help me...i can create the shared object and use it just
    fine so if you just give me the code for storing the variable it would be
    greatly appriciated.

    calmchess333 Guest

  10. #10

    Default Re: variable question

    I just answered my own question so consider this post closed......a tutorial on
    RSO comeing soon. nobody should have to go through what i went
    through.......there is so little layman information on the internet about
    writing RSO's that its pathetic and the books available are also sourly
    incomplete....hell maybe i'll write a book.

    calmchess333 Guest

Similar Threads

  1. Variable Creation Question
    By FusionRed in forum Macromedia ColdFusion
    Replies: 5
    Last Post: March 18th, 09:45 PM
  2. operand variable question
    By 3702 in forum Macromedia Flash
    Replies: 0
    Last Post: January 28th, 04:00 AM
  3. PHP Session and variable question...
    By Rob @ Home in forum PHP Development
    Replies: 6
    Last Post: November 13th, 05:34 PM
  4. Global variable question question
    By Jason Giangrande in forum PHP Development
    Replies: 3
    Last Post: July 23rd, 08:27 PM
  5. Simple variable question.
    By Dave Anderson in forum ASP
    Replies: 1
    Last Post: July 18th, 12:39 AM

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