A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: What is wrong with this function

  1. #1
    MR
    Join Date
    Jul 2000
    Location
    ATL
    Posts
    272

    What is wrong with this function

    function basement(number) {
    if (_root.text_basement == "") {
    with (_root.build.walkout) {
    gotoAndStop("");
    }
    }
    }
    basement("8’ BURIED BSMT w/ SINGLE AREAWAY || 9’ BURIED BSMT w/ SINGLE AREAWAY"," KR-AREA-1");


    Thanks for any help.

    54
    Last edited by profilin; 11-18-2002 at 10:22 PM.

  2. #2
    Senior Member
    Join Date
    Mar 2000
    Posts
    177
    There are several problems with your function.

    1. The parameter is called "number", which is a reserved word.
    2. You aren't using the function parameter inside the function.
    3. You're calling the function with two parameters.
    Last edited by robertpenner; 11-18-2002 at 09:59 PM.
    New Book: Robert Penner's Programming Flash MX
    Dynamic tweening, color, math, vectors and physics with OOP ActionScript
    http://www.robertpenner.com/profmx
    http://www.amazon.com/exec/obidos/AS...bertpennerc-20

  3. #3
    MR
    Join Date
    Jul 2000
    Location
    ATL
    Posts
    272
    Thanks for the response. I will figure out something. Its a learning process for me.

    54

  4. #4
    MR
    Join Date
    Jul 2000
    Location
    ATL
    Posts
    272
    what about something like this?

    function basement() {
    (_root.text_basement == "");
    }
    basement("8’ BURIED BSMT w/ SINGLE AREAWAY");
    with (_root.build.walkout) {
    gotoAndStop("KR-Area-1");
    }

  5. #5
    Senior Member
    Join Date
    Mar 2000
    Posts
    177
    I'm not sure what you're trying to do, but it looks like you're not clear on how function parameters and function calls work.
    New Book: Robert Penner's Programming Flash MX
    Dynamic tweening, color, math, vectors and physics with OOP ActionScript
    http://www.robertpenner.com/profmx
    http://www.amazon.com/exec/obidos/AS...bertpennerc-20

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