A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: How to control pop up window in flash?

  1. #1
    flash addict
    Join Date
    Jun 2003
    Posts
    136

    How to control pop up window in flash?

    hello,

    First let me thank the community for helping me out with a tutorial I used to make my new website.

    to see my website so far, visit:
    http://paulabailey.net/01_home.html

    any critiques are welcome.

    But getting to my newest problem:
    I need some help on how to control a new window in flash. what i mean is, in the gallery section of my website, I intend to have thumbnail images of my art. When the visitor clicks on an image, i want for a new window (i guess we'd call that a "_blank" window) to pop up containing that particular art. however, i want the window to sort of frame itself around my art;i don't want a new 800x600 internet explorer size window popping up with my art in it. i want a simple window that shows my art and nothing else. maybe i'll include a "close" button but that's it. I've seen sites like this, although many of these sites are in html. But I am sure there are flash sites that have done same thing. so if any one knows how to control the parameters of a new window or whatever it is I have to do, I'd much appreciate it as I always do.

    okay, sorry if this was too long. thanks in advance!

    ~"Flash is soooooooooooo flashy!"

  2. #2
    Senior Member pellepiano's Avatar
    Join Date
    Feb 2000
    Location
    Stockholm, Sweden
    Posts
    15,151
    Amazingly enough there are over 2000 posts here on popup windows. Making a search first will get you faster answers and more options.

    However, this is what you put on your Flash buttons.

    on(release){
    getUrl("javascript:window.open('http://www.mysite.com/image1.html','newwindow','width=420,height=420,top =0,left=0'); void(0);")
    }

    (there should be no space between java and script)

    And check out the popup script generator at www.flash-db.com/PopUp
    ..for more advanced versions

    -Pelle Piano
    // Image Gallery
    www.studiobild.com
    // Photo Blog
    http://talesofthepixel.blogspot.com

  3. #3
    flash addict
    Join Date
    Jun 2003
    Posts
    136

    thank you~

    ah yes, you are correct pellepiano. for some reason i was skeptical that a seacrh would give me results because in the past i have not had much luck doing searches for tutorials...but luckily, in this case, a search provided me with good results. thanks for the tips.

    peace
    ~"Flash is soooooooooooo flashy!"

  4. #4
    flash addict
    Join Date
    Jun 2003
    Posts
    136

    Run into a problem...

    Thanx again , pellepiano, but even without the space between the java and script, whenever I try to paste your code onto my button, Flash tells me there is an error with the syntax. Any ideas?

    If anyone else has any ideas, please feel free to let me know~

    (and yes, I did do a search on pop up windows, and I successfully completed a couple of tutorials but I still need for this script that pellepiano posted to work because those tutorials are not sufficient in meeting my needs.)

    peace
    ~"Flash is soooooooooooo flashy!"

  5. #5
    flash addict
    Join Date
    Jun 2003
    Posts
    136

    Figured It Out

    Oh boy~

    looks like I figured it out myself...there were quite a few errors. Below is the correct script in case anyone was wondering...
    --------------------
    on (release) {
    getURL("JavaScript:window.open('http://www.mysite.com/image.jpg','newwindow','width=500,height=395,top=0 ,left=0');void(0);");
    }
    --------------------
    Syntax errors with the original:

    1.the J and S for java sccipt had to be capitalized...
    2.there should not be a space between the punctuation and name of your file (for example, image.html not image. html)
    3. the getURL line has to be all on one line;it can't carry over to line 3.
    ~"Flash is soooooooooooo flashy!"

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