Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 6 of 6
  1. #1
    Junior Member
    Join Date
    Nov 2005
    Location
    Christchurch, New Zealand
    Posts
    17
    Member #
    11987
    New window from flash (is it possible anymore?)

    I have been creating a completely flash based site with a connected CMS. The problem is i want any hyperlinks included in the flash to open in a new window if clicked on by the user. ie:

    PHP Code:
     getURL("link here""_blank",); 
    In firefox, nada, nothing happens, now i'm totally sure that this is because it is blocking the new window open. But this is stupid, i can see the reasoning (to stop ads), but surely if the user initiates the new window it should be able to be opened.

    Well now, without ranting anymore...

    are there any solutions to this? I'm guessing no, which is a frustration but I thought I would ask.

    My only solution at the moment (which kinda aint a solution) is for the links to open in the same window... but for the novice user they will not understand this, get lost.... and will no longer be on the site and may not come back.

    thanks for any thoughts in advance

    cheers
    Hayden

  2.  

  3. #2
    Senior Member Brak's Avatar
    Join Date
    Apr 2003
    Location
    San Francisco, CA
    Posts
    3,413
    Member #
    1217
    Liked
    2 times
    Try using javascript

    Code:
    getURL("javascript:window.open(...)")
    Kyle Neath: Rockstar extraordinare
    The blog | The poetry site | The Spore site

  4. #3
    Junior Member
    Join Date
    Nov 2005
    Location
    Christchurch, New Zealand
    Posts
    17
    Member #
    11987
    Thanks for the suggestion Brak, much appreciated I had tried that in the past with no luck, but decided to give it another go after your post. Sadly the result was predictable.

    Just for anyones information, both of the above (for me anyway) work fine in IE7 beta. Just firefox loves (what appears to be) blocking them.

  5. #4
    Senior Member
    Join Date
    Mar 2004
    Posts
    241
    Member #
    5465
    Here's how you can do it. I just verified it worked with Firefox, so you're good to go. In Flash, your button actions are:
    on(release) {
    getURL("JavaScript:link();");
    }

    Then, in the header of the HTML, put the following code:
    <SCRIPT LANGUAGE="JavaScript">
    function link() {
    window.open('filetoopenhere.html','','toolbar=no,l ocation=no,directories=no,status=no,menubar=no,scr ollbars=no,resizable=no,width=425,height=210,left= 400,top=250');
    }
    </script>

    The great thing about this code is that it lets you define what kind of window to open up. You can assign the size, location, and properties of it. This is what I always use for my Flash sites to open new windows.

  6. #5
    Junior Member
    Join Date
    Nov 2005
    Location
    Christchurch, New Zealand
    Posts
    17
    Member #
    11987
    Thanks Minger

    That is an ingenious idea Makes good sense too so I'm sure it will work. My only problem would be if the user had Javascript turned off. I shall definately look into it though

    cheers
    Hayden

  7. #6
    Junior Member
    Join Date
    Nov 2005
    Location
    Christchurch, New Zealand
    Posts
    17
    Member #
    11987
    I tried it, and to my surprise it didn't work which started alarm bells in my head. Ran the same page from another computer (running the same version of firefox) and it worked.

    It clicked in my head then "fasterfox". Do a search and indeed it plays with popup blocking. Uninstall the extension and all is well.

    Obviously fasterfox has a very bad implementation of it's blocking, dumb extension, lol.

    Once again, appreciate everyones comments. I shall revert to using the getURL _blank method as it does not require javascript. And as for people using fasterfox, too bad I wont be using it again. Firefox 1.5 popup blocking will do the job for me


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 12:16 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com