FURTHER DIFFICULTIES

Ask a Question related to Macromedia Flash Actionscript, Design and Development.

  1. #1

    Default FURTHER DIFFICULTIES

    ok...i must confess...this is all to create a PAYPAL button....i need to add an item to a shopping cart on PAYPAL.com. another problem has cropped up.

    ADD is a reserved word in actionscript, so i can't properly ADD an item to my paypal shopping cart because code like this causes an error:

    mySubmit = new LoadVars();
    mySubmit.add = 1; //<----this line causes the problem

    WHAT CAN I DO?? i will keep trying other methods, but things are looking pretty bleak.




    sneakyimp webforumsuser@macromedia.com Guest

  2. Similar Questions and Discussions

    1. TextArea difficulties
      Flex doesn't have an out-of-the-box component that does this. The Text field (not an input field) can grow as text is added to it. The only...
    2. Printing difficulties?!?
      Hello, newbie here with a quick question. My GF has a Epson Stylus Photo 1290 that is fantastic! However we have recently been having an odd printing...
    3. New guy having difficulties
      I can maximize an image window, but I can't seem to minimize the image window later. Is there a "minimize" button somewhere? Also, I cannot seem...
    4. Form Difficulties
      I'm running Access 95 (is this too old of a version to get help with here? hope not). The first form I create is visible in the database windows....
    5. Importing difficulties
      On page 69 of the macromedia fireworks mx training from the source book that I am working with says I can import FreeHand 7, 8, 9, and 10 files as...
  3. #2

    Default aha! CRACKED IT

    after much trial and error, i think i got it down :)
    you can use 'array-style' referencing to create the lvars object. even though 'add' is a reserved word in ACTIONSCRIPT, you can still do this:

    lvMySubmit["add]"=1;

    this works...

    // create variables to contain item data.
    lvMySubmit = new LoadVars();
    lvMySubmit.cmd = "_cart";
    lvMySubmit.business = "foo@foo.net";
    lvMySubmit.item_name = "1 Dozen Mens Left Handed Sport Gloves";
    lvMySubmit.amount = "60.00";
    lvMySubmit.no_note = "1";
    lvMySubmit.cs = "1";
    lvMySubmit.currency_code = "USD";
    lvMySubmit.on0 = "Glove Size";
    lvMySubmit.os0 = "Small";
    lvMySubmit["add"]=1;
    lvMySubmit.submit=1;
    lvMySubmit.display=1;


    lvMySubmit.send("https://www.paypal.com", "_self", "POST");



    sneakyimp webforumsuser@macromedia.com Guest

Posting Permissions

  • You may not post new threads
  • You may 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