Results 1 to 3 of 3

Thread: Popup from inside SWF?

  1. #1
    Join Date
    Apr 2007
    Location
    Andorra la vella / Leiston
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Talking Popup from inside SWF?

    Heya! I'm still new to Flash, and was wondering if someone could tell me how (or if it's possible!) to make a popup open from inside an SWF file?
    Does that make sense?
    I mean, in the same way as it would work from an HTML file?
    Thanks

  2. #2
    Join Date
    May 2007
    Posts
    14
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default yep it is

    Flash 8 AFAIK cant popup things by itself, but it can trigger a javascript that can.
    Basically what you need is to insert this code between the <head>here</head> tags of your HTML file where did you embed your flash movie. This is the script used to popup things (pics,html):
    Code:
    <script language ="javascript">
    function resizeWindow(theurl, windowname, features)
    {window.open(theurl, windowname, features);}
    </script>
    once you have done this you can add the popup function to your button in your flash movie. like this:
    Code:
    on (release) {
    	getURL("javascript:resizeWindow('something.html', 'windowName', 'height=640, width=800, resizable=0, status=no, scrollbars=no, toolbar=0, location=0, directories=0, menubar=0, left=0, top=0')");
    }
    as you can see its the same getURL principe, but you call upon the script and send a few paramters too. They are all adjustable to your liking.

    I hope I wasnt too much confusing, its almost morning here and I haven't slept for some time, so I am a bit wasted

  3. #3
    Join Date
    Apr 2007
    Location
    Andorra la vella / Leiston
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Oh that's great! Thanks so much I had a little trouble in the beginning because it came up with an error message when I tried to open the popup from the file, but when I uploaded it it was fine. Thank you!

Bookmarks

Posting Permissions

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