A Flash Developer Resource Site

Results 1 to 11 of 11

Thread: HOW TO: 'Naked' Pop-up from Flash button

  1. #1
    Junior Member
    Join Date
    Jan 2003
    Location
    Dallas, TX
    Posts
    25

    HOW TO: 'Naked' Pop-up from Flash button

    We had a thread with 41 posts on this subject and came to the conclusion that in order to make it work cross-platform, we had to define a javascript function in the HTML page that would open the window without the toolbars, location, scrollbars, etc. "Naked Pop-up". Then the Flash button's action would call upon that function with a getURL script.

    After all that back and forth trial and error, I got an email this morning with the proper Flash script to make it happen without putting an javascript in the HTML page. Much simpler, and if you have to do several buttons calling on the same type window, there no variables to set, just change to URL on each button instance, and go!

    Here it is:

    _____________________

    on (release) {
    getURL("javascript:window.open('http://this is where your URL goes ','PageName','width=600,height=400,top=0,left=0,to olbar=no,scrollbars=no,resizable=no,menubar=no,sta tus=no,directories=no,location=no'); void(0);");
    }

    ______________________


    The getURL and everything that follows except } must be on the same line.

    I can't believe we spent so much time on this for my friend to just email me this so quickly afterwards.

    DAMN!

    pay my site a visit to see the results

    www.chumleyglassworks.com
    Last edited by schlep; 01-10-2003 at 11:48 PM.

  2. #2
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Well... I already knew about the no linebreaks and if you re-read the thread, I even questioned, early in the thread, why only calling the function in the getURL would make any difference as opposed to having the complete function in the getURL. But Mark kept saying that it made a difference so I went that way!
    It had allways worked for me (with the full function in the gerURL), but I must admit I had never checked my files on a Mac, and since nobody (on Mac) had reported any problems with my files, I went along with what Mark was saying and helped him in putting the function in his html.

    In any case, it works in both situations, and I think the html way might even be a little better, because I can allways easily change the function called by the getURL in the html, without having to edit the Flash movie. If your function is in the movie, then you have to edit the movie itself to change the function.

  3. #3
    Junior Member
    Join Date
    Jan 2003
    Location
    Dallas, TX
    Posts
    25
    oldnewbie:

    Of course, i remember, i don't need to re-read to thread. I'm not attempting to discredit you in any way. You were a fabulous help on the issue. Something about the script is different, though, there is no focus() for one, but I don't know what is different that made it work, I just plugged it in, and it worked, so I'm happy.

    Anywho, thanks a bunch for what you are doing here. It's nice to know there are good people out there who are willing to help those of us who are 'just wingin it'

    peace

    and how do you get that image in your signature. I found a tutorial on it, but couldn't make it work, I just got one of those little markers that show up when an image is supposed to be there but the browser hasn't loaded it yet.

    know what I mean?

  4. #4
    The world goes - hm.. TheCaramella's Avatar
    Join Date
    Dec 2001
    Location
    Second door on the right, next to the ice bear
    Posts
    642

    no-resize comment/tip

    I have a problem on one of my computers with pop up windows: they don't pop up with the specified size.
    When designers put their windows with no resize on them, I can just forget about the page.
    Or close my browser with the desired window size, and reopen it.
    It's very rare I'm that interested in a page.
    This happens on my computer with two screens.
    I've heard other mentioning the same problem.
    Just a tip.

  5. #5
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Schlep...

    [*img]http://www.yourserver.com/oldman3.gif[*/img]

    This is what you should add (edit profile) to your signature, to add an image. Remove the "*"s from the above tags.

    You have to be sure, your server allows linking from another site, or else it won't show up.

    The .gif should be no larger than 40X300 here on FK.

  6. #6
    Junior Member
    Join Date
    Jan 2003
    Location
    Dallas, TX
    Posts
    25
    Ah-ha!

    I had the script right before, my image was to tall, and my path was wrong, I had two folders. Images and images . And I was pointing to the wrong one.

    Thanks again

    I guess I didn't realize the folders were case sensitive.

  7. #7
    Junior Member
    Join Date
    Jan 2003
    Location
    Dallas, TX
    Posts
    25

    Re: no-resize comment/tip

    Originally posted by TheCaramella
    I have a problem on one of my computers with pop up windows: they don't pop up with the specified size.
    When designers put their windows with no resize on them, I can just forget about the page.
    Or close my browser with the desired window size, and reopen it.
    It's very rare I'm that interested in a page.
    This happens on my computer with two screens.
    I've heard other mentioning the same problem.
    Just a tip.
    Thanks for the tip, I suppose the resizable part could be sacrificed. I do know what you mean about the annoyance of it, especially if the window doesn't size properly. Does my site give you that problem TheCaramella?

  8. #8
    The world goes - hm.. TheCaramella's Avatar
    Join Date
    Dec 2001
    Location
    Second door on the right, next to the ice bear
    Posts
    642

    Re: Re: no-resize comment/tip

    Originally posted by schlep
    Does my site give you that problem TheCaramella?
    Yes, schlep: I want some of that GLASS!!!
    *arghl*
    No, it doesn't. I crashed my screens today, installed updates and service packs to my win 2 k, and that was h....
    Had to uninstall the drivers, and reinstall them, and yess! here I am
    now the pop ups resize normally
    But- new problem: they go behind the opening browser window. Any fix for this?
    I remember vaguely something in javascript with window.setFocus() or something.
    Am I close?

  9. #9
    Junior Member
    Join Date
    Jan 2003
    Location
    Dallas, TX
    Posts
    25
    Are you saying that they open up behind it, because I haven't had that problem?

    Yeah I believe it is a focus() thing, but I'm no javawizard, this is very new stuff to me. I need to get back behind the torch. Thanks for the reply, I'll check back on this later. Please email me if you don't mind, and let me know exactly what happens. I changed the script this morning the make the windows resizable, I'll play with it later.

  10. #10
    The world goes - hm.. TheCaramella's Avatar
    Join Date
    Dec 2001
    Location
    Second door on the right, next to the ice bear
    Posts
    642
    Sorry sclep if I was unclear. I had no problems with your site, there where no links (of the ones that I clicked) that opened in new windows.
    As a matter of fact I experienced this problem on one of my own sites that I tested with the new drivers.
    I'll have too look it up. Btw - do you happen to know what this void(0) is in the open-window-action srcipts posted here lately?
    I wonder if it's got something to do with this, or maybe something completely different.

  11. #11
    Junior Member
    Join Date
    Jan 2003
    Location
    Dallas, TX
    Posts
    25
    Okay, it sounds like your problem, not mine then. As far as the javascript goes, I really don't know much about any of it. OLDNEWBIE is one person here on flash kit that has a great knowledge of javascript from what I can gather, and perhaps he could enlighten you as to what the void(0) is used for.

    Or if you were really into it, I'm sure you could find some info about java on the net, if not in another thread on Flashkit.

    I'm just learning this stuff, and teaching myself, so I really only know what I've needed to learn in order to publish my site.

    Good luck with your machine.

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