A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: Controling another window?

  1. #1
    Member
    Join Date
    Sep 2001
    Posts
    43
    I posted this question in the Newbies forum, didn't get a reply, so thought I'd re-phrase it and try it out here. I have an HTML page that pop-ups a window that contains a Flash movie. In the Flash movie, I would like a button to change the URL of the original window it was launched from. How can I do this? I'm assuming using _parent in the ActionScript wouldn't work, as that is for use in frames (right?). The Flash manual says to you can insert a window name, but I don't know how to name that original window. Any help would be greatly appreciated! Thanks!

  2. #2

    don't know...

    what i would normally do is jimmy rig the html page with a balnk .swf file that is white (or background color) so no one can see it and put the script in it to change that page's window name.

  3. #3
    Member
    Join Date
    Sep 2001
    Posts
    43
    Thanks for the reply, but how would that work? I guess I don't fully understand. What AS could you put in that blank swf to change the window's name? Thank you again...

  4. #4
    Member
    Join Date
    Sep 2001
    Posts
    43

    Found the answer...

    I found the answer to my own question and thought I'd post it here, just in case you were wondering. Turns out it's so very simple too. Doesn't it always work out like that? I haven't tried it yet, but with what little knowledge I do have of JS...it looks like it'll work just fine. I still would like to know your solution about the blank swf, that's a pretty crafty trick...I like it. Can you believe, I blew off a date (he was cute too!) tonight because this wasn't complete yet. Oh well, anyways here it is...

    JS for the HTML page...
    <script language="JavaScript">
    self.name="main";
    </script>

    AS for the button in the Flash movie on the pop-up window...

    on (release) {
    getURL ("whatever.html", "main.html")
    }

    Hope it works! I'm sure it will though...

  5. #5
    Originally posted by slater10
    I'm assuming using _parent in the ActionScript wouldn't work, as that is for use in frames (right?). The Flash manual says to you can insert a window name, but I don't know how to name that original window.
    I figured you knew how to change the name of the window that the .swf file was on. So then I thought if you could change the pp-up window with a .swf file that you might be able to do that to the original window.

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