The forums have permanently moved to This forum will be kept around in read-only mode for archival purposes. To learn how to continue using your existing account on the new forums, check out this thread.

Results 1 to 4 of 4

Thread: Flash redirect url

  1. #1
    Registered User

    Flash redirect url

    How can I redirect the user to a different address, w/o him clicking on it and his browser not blocking it as a popup? Basically after some event, I want to automatically go to a different website w/o the users interaction, but when I use a simple URLRequest with navigateToURL, every browser blocks it as a popup.

    Can it be done?

  2. #2
    I'm not sure what you have done wrong?

    I made a project with standard flash export settings and it worked directly?
    I've tried it locally and on a live server.

    Here is the code:
    import flash.display.MovieClip;import;
    var buttonA:MovieClip = new MovieClip();
    buttonA.x = stage.stageWidth/2-buttonA.width/2;
    buttonA.y = stage.stageHeight/2-buttonA.height/2;
    buttonA.addEventListener(MouseEvent.CLICK, traceCall);
    function traceCall(e:MouseEvent)
        trace("button called");
        navigateToURL(new URLRequest(""));
    Last edited by lnsiu; May 9th, 2012 at 10:59 AM.

  3. #3
    if you want to use the same web page, the site is blocked trying the fla locally, but do work live on a server.

    navigateToURL(new URLRequest(""), "_self");

  4. #4
    Registered User
    Gaaah! I dunno what happened, but now it works. Maybe it's because I forgot to add "_self", and the browser interpreted it as a popup.

    Either way, thank you very much Insiu! ;]

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Home About Meet the Moderators Advertise

 Link to Us


Copyright 1999 - 2012