A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: getURL("",""); huh, i thought this was easy?

  1. #1
    Join Date
    Aug 2000
    NB, Canada

    getURL("",""); huh, i thought this was easy?

    Hello! (it's been a while)

    i though i'd drop by to try to get this minor problem cleared up
    once and for all....

    i'm opening a new browser window from my flash, nothing special
    or hard really, and it works just fine.

    However when i click another link in the flash it opens a whole
    new window rather then targeting the already opened one. So now
    instead of 2 windows (flash and link) we have 3 (flash, link, and

    My code is just:

    on (release) {
    getURL("link.html", "win");

    As well i have some dynamic text getting loaded in from outside the
    flash, it also is having the problem of constantly opening a new

    The text links use HTML:

    <a href="link.html or link.jpg" traget="win">link</a>

    For the life of me i can not get these to just open one window and
    continue to use it...

    Thanks in advance for any help!
    - g

  2. #2
    Junior Member
    Join Date
    Mar 2001

    If you use javascript to open the window, and use the same window name everytime, the new content will use the window already open with that name. Here is an example of how you will set up the link:

    on (release) {
    I have used this many times before and the results were exactly what you are looking for. So anyways, hope that helps!

  3. #3
    Major Flash Newb
    Join Date
    Sep 2003
    Melbourne, Australia
    umm, i don't think "win" is a valid target

    use "_blank" or "parent"

    "_blank" opens a new window, that is what you want

    hope that fixed your problem
    There are 10 types of people in the world, those who can read binary, and those who don't

  4. #4
    Senior Member
    Join Date
    Apr 2001
    saskatoon, canada
    dkeegh is right. If you want it to open in the same window use this:

    getURL("http://www.google.com", "_self");

    I don't know if this is bad code but this will open in the same window too.


  5. #5
    Join Date
    Aug 2000
    NB, Canada
    It's been a while since i've been on but i figured i should reply with this correction.

    djcordel was on the right path.

    When i called "win" it had nothing to reference like dkeegh said, "win" is not a function for a window. (eg: open a new one or open within itself)

    What i was mistaken on was thinking that by calling "win" i'd be naming this window "win" and the other links refering to "win" would know, if it's already open, to display the content in this window.

    My solution was to send my getURL(); to a .php with different content, the .php then displays the page with the content provided from the link and included this within the <head> tags.


    From then on any link refering to "win" would not open a new window, but instead display our new content in the already opened window named "win".

    Thanks for your help!
    - g

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