Solved

getURL syntax error

Posted on 2004-10-27
911 Views
Last Modified: 2006-11-17
I am new to flash, and have some actionscript code that gives me an error message when it compiles.  My code is:

on (rollOver) {
      gotoAndPlay(2);
}
on (rollOut) {
      gotoAndPlay(11);
}
on(release) {
      getURL("http://147.202.34.39/members/index.html");
}

and when I run it, I get the message

Symbol=w22, Layer=Layer 6, Frame=20: Line 1: Wrong number of parameters; getURL requires between 1 and 3.
     getURL();

I can't see the problem - maybe it's obvious to someone here ?
0
Question by:Kevin
    7 Comments
     
    LVL 6

    Expert Comment

    by:nishasrilankan
    Use the movie Explorer...there might be hidden coding, because here the error message says the error is in the Line one and you know in the code you given...getURL is not in the Frame 1
    0
     
    LVL 39

    Expert Comment

    by:blue-genie
    it says, "Wrong number of parameters"

    your getURL wants another parameter. ie.

    getURL("http://147.202.34.39/members/index.html", "_blank");

    specify a target for it to open in. your options include, _parent, _self - can't think of the others.
    0
     
    LVL 6

    Expert Comment

    by:nishasrilankan
    there must be a blank getURL..ie:getURL();....
    check the w22 symbol's, 6th layers...20th Frame...that should be there..
    0
     

    Author Comment

    by:Kevin
    OK I am learning thanks to your help.  I tested around and see that the code I pasted here was OK.  As you say there is an empty getURL() statement somewhere.  But when I look at symbol 22 (movie clip) Layer 6 Frame 20 - there is no actionscript that comes up.  Is there any way (like a global editor kind of thing) to see all the actionscript in a flash file so that I can find this bugger ?
    0
     
    LVL 6

    Accepted Solution

    by:
    If you are using Flash MX use Movie Explorer

    Window >> Other Panels >> Movie Eplorer or (Alt+F3)

    From there select the Actions and you will be able to find all the actions
    0
     
    LVL 39

    Expert Comment

    by:blue-genie
    alternatively post your fla, i'm sure nish can spot it for u quickly.
    0
     

    Author Comment

    by:Kevin
    Found the little bugger.  Thanks very much for your assistance.
    0

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

     Java Android Coding Bundle

    Whether you're an Apple user or Android addict, learning to code for the Android platform is an extremely valuable, in-demand skill. It all starts with Java, the language behind the apps and games that make Android the top platform it is today.

    Suggested Solutions

    There are times in your Flash CS4 application when you want more than a simple pointer or a hand, and it's hard to find an ideal walk-through to tell you what to do.  I spent a few days recently learning my way around making custom cursors in Flash,…
    I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
    In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
    The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.

    934 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    8 Experts available now in Live!

    Get 1:1 Help Now