dcsimg
A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: problem with a button

  1. #1

    problem with a button

    i have a button MC at the end of my movie to redirect the user to another webpage. the problem is that when clicked, it goes to a blank screen. i know its something simple, but i cant remember what to do. heres the code

    on(release) {
    getURL("http://angelfire.lycos.com/alt/zeroone/home.html",_root);
    }
    "O"

  2. #2
    Computer.Internet Addict cturner's Avatar
    Join Date
    Jul 2002
    Location
    @ my computer
    Posts
    175
    Unless you have a swf inside a swf you can't use _root for a html file. You could have one of the following:
    _self which specifies the current frame in the current window:
    Code:
    on (release) {
    getURL("http://angelfire.lycos.com/alt/zeroone/home.html", "_self");
    }
    _parent which specifies a new window:
    Code:
    on (release) {
    getURL("http://angelfire.lycos.com/alt/zeroone/home.html", "_parent");
    }
    _top which specifies the parent of the current frame:
    Code:
    on (release) {
    getURL("http://angelfire.lycos.com/alt/zeroone/home.html", "_top");
    }
    _blank which specifies the top-level frame in the current window:
    Code:
    on (release) {
    getURL("http://angelfire.lycos.com/alt/zeroone/home.html", "_blank");
    }
    But then there is something else you might want to know and that is to put the following code onto a button:
    Code:
    on (release) {
    // JavaScript not java script
    	getURL ("JavaScript:myHome();");
    }
    the button has to be inside a html file. In the head tags of the html file put the following inside the script tags:
    Code:
    function myHome() {
    window.open("home.html");
    }
    I hope this helps you.

  3. #3
    thanks...got it cleared up
    "O"

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