Discussion Area

ask questions, discuss topics, solve problems

This is a public Discussion Area  publicRSS

Thread

    AS3 Question
    Thread posted 11/18/08 by Mykola Bilokonsky
    1423 Views, 1 Comment
    Title:
    AS3 Question
    Content:

    I also sent this out in an email to the listserv.  We'll see which gets answered first.  ;)

    ---

    So I'm working on an ecommerce project here, and it's almost entirely complete.  I am basically creating a PayPal "Buy Now" button in flash, and a part of that involves sending a bunch of URL Variables to paypal.

    My problem is that one of the variables I have to use is called "return".

    See my code snippet, attached.

    I get this error:

    "1084: Syntax error: expecting identifier before return.�"

    I think Flash thinks I'm trying to use the "return" keyword to terminate the function.

    Is there any way around this?  Can I escape the keyword functionality of the word "return"?  Alternately, does anyone know if PayPal offers an alternative keyword for use with AS3?

    Code Snippet:

    Comments

    • posted 11/19/08 by Mykola Bilokonsky
      Problem solved, and on the ListServ no less! Apparently if you use Array notation to refer to a property of the URLVariables object it works fine. So payPal.return = "" is no good but payPal["return"] does the trick. Thanks Corey!

      Reply to this Comment

    Copyright © 2009 Adobe Systems Incorporated. All rights reserved.

    Use of this website signifies your agreement to the Terms of Use and Online Privacy Policy (updated 07-08-2008).

    Powered by HiveLive