A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: button URL link, no pop-up

  1. #1
    Junior Member
    Join Date
    May 2007
    Posts
    5

    button URL link, no pop-up

    hello all, If you look at the pdf PROGRAMMING ACTIONSCRIPT ™ 3.0 provided by adobe page 40 they use this as an example for a URL link

    function gotoAdobeSite(event:MouseEvent):void { var adobeURL:URLRequest = new URLRequest(“http://www.adobe.com/”; navigateToURL(adobeURL); } linkButton.addEventListener(MouseEvent.CLICK, gotoAdobeSite);

    it works great but opens a new window link a pop up, I’m new to Flash 9 (CS3) actionscript / AS3 and want to know how to alter this script 3.0 so that I can have a URL link without a popup, URL within the site and to external websites.

    please feel free to email me tatau2000@hotmail.com with any help or sugestions

  2. #2
    Knows where you live
    Join Date
    Oct 2004
    Posts
    944
    Try checking URLRequest in the help files and see what it says. My guess is there is a second optional parameter that allows you to specify a frame.

    Is there a particular reason why you are using AS3.0?
    The greatest pleasure in life is doing what people say you cannot do.
    - Walter Bagehot
    The height of cleverness is to be able to conceal it.
    - Francois de La Rochefoucauld

  3. #3
    Junior Member
    Join Date
    May 2007
    Posts
    5

    Thanks

    Thank you,

    I'll try it out. I'm using AS3 becuase I'm somewhat new to AS and feel that I'd like to learn on the latest language and any new files I make should be in AS3. This is oppsed to continue to use AS2 and having to re-write more AS3 code later.

    Jon

  4. #4
    Junior Member
    Join Date
    May 2007
    Posts
    5
    unfortunately adding a second parameter

    function gotoAdobeSite(event:MouseEvent):void
    {
    var adobeURL:URLRequest = new URLRequest("http://www.adobe.com/", "_self");
    navigateToURL(adobeURL);
    }
    linkButton.addEventListener(MouseEvent.CLICK, gotoAdobeSite);

    doesn't work to emilinate a popup link

  5. #5
    Senior Member cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,449
    var adobeURL:URLRequest=new URLRequest("http://www.adobe.com/");
    navigateToURL (adobeURL, "_self");
    - The right of the People to create Flash movies shall not be infringed. -

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