dcsimg
A Flash Developer Resource Site

Page 2 of 2 FirstFirst 12
Results 21 to 38 of 38

Thread: [Resolved] INSTA-TUTE! Poping a Window in a Single Step - Part Deux!

  1. #21
    Senior Member
    Join Date
    Jan 2001
    Posts
    591
    Hi Cozmic
    here is a shorter version on the Pope-up center window script. No declaration of variables neccessary
    Put this in the Get URL field:

    javascript:window.open('link.html', 'WindowName', 'width=200,height=300,top='+((screen.availHeight/2)-(height/2))+',left='+((screen.availWidth/2)-(width/2)); void(0);

    Check out and download my new tutorial:
    http://www.san-fran.com/tutorials/fl...lmenu_wframes/

  2. #22
    Member
    Join Date
    Sep 2000
    Posts
    31

    mmmmmm...

    Hi all,
    Im relatively new to flash and am working on flash 5 trying to do a popup window, I've done everything listed above but am still having problems with it.
    My first question is, does the script have to be written over the one line in the top field of the get url action or should it be split over the other two as well?
    Also, I'm getting some extra backslashes and things at the front end of the text when it shows up in the preview window, but its not typed in - could this be the problem and how do i solve it?

    Any help would be appreciated.

    Thanks

    Steven

  3. #23
    Junior Member
    Join Date
    Nov 2000
    Posts
    24

    Didnt work

    sorry thenewrules that script didnt work, when I put it in nothing happens when I click my button.
    Im using Flash 4 does that matter?
    I checked out your site but I cant make head or tale of it and I cant find any tutorials, just examples of stuff.
    If you can clarify this for me I'd be very apreciative.

    If GGW, or anyone, could answer the questions I put in my earlier post that would be sweet too

    Still RoCkIn
    Coz

  4. #24
    Senior Member
    Join Date
    Jan 2001
    Posts
    591
    Hmmmmn, haven't had any complaints so far
    The tutorial link is located near the bottom of the main page. The downloadable files are at the bottom of the menu bar.
    These are all written in Flash 4
    and we know it's a working script cause it works on my site as well as all the other folks who have used my tutorial
    First thing I would check is that the "Window" field should be left empty, that name is provided by the script.
    Also remove any Java from your HTML you might have placed there from previous attempts. If that don't work, just download the .fla, open it in Flash. Double click the Open Centered Window button to edit the menu, then double click the button a second time to edit the button itself. Copy the code out of the working example and paste it right into your button. I've always been a cut and paste programmer. Why reinvent the wheel?
    If you are STILL having problems you can send me your fla as an attachment and I'll straighten it out for ya.
    My email is in my footer

  5. #25
    The Supreme Shaman and Keeper of Polar Lights
    Join Date
    Apr 2000
    Posts
    1,175
    Hi !

    Cozmic: don't listen thenewrules - he is too lazy to check his siggestion before posting :)
    For Flash4:
    Code:
    Set Variable: "wdth" = "300"
    Set Variable: "hdht" = "300"
    Get URL ("javascript:window.open('link.html','WindowName','width="&wdth&",height="&hdht&",top='+((screen.availHeight/2)-("&hdht/2&"))+',left='+((screen.availWidth/2)-("&wdth/2&"))); void(0);")
    or paste in Get Url window
    Code:
    "javascript:window.open('link.html','WindowName','width="&wdth&",height="&hdht&",top='+((screen.availHeight/2)-("&hdht/2&"))+',left='+((screen.availWidth/2)-("&wdth/2&"))); void(0);"
    and don't forget to set it in "expression" mode :)

  6. #26
    Member
    Join Date
    Sep 2000
    Posts
    31

    still having a problem

    OK - i've added in the correct coding (at least i assume its correct!) and when you click on the button, rather than a new window popping up, i am getting a page not found message replacing my movie. Do i have to have the swf file in the same folder as the page i want to pop up when i go live? Or would it be worth putting in a "new.win" script rather than the "window.open" one??????

    If someone can help me out with this I will be eternally grateful.

    Cheers

  7. #27
    Member
    Join Date
    Sep 2000
    Posts
    31
    C'mon ppl, I'll a free something or other to the first person to sort this one out for me - I'm a pretty confused chappy right now.

    In desperation,
    Steven

  8. #28
    Senior Member
    Join Date
    Sep 2000
    Posts
    1,159

    Ok, Let's post an example...

    Again, seems like this window process is somewhat tricky at first, but it DOES work:

    [swf width="100" height="40" background="#FFFFFF"]http://www.jadrienbell.com/Footer/OpenWindow.swf[/swf] .


    And, here is the FLA file too for download:
    http://www.jadrienbell.com/Footer/OpenWindow.FLA

    Steven, download the FLA and take a look at it - maybe it will help you.

  9. #29
    Senior Member
    Join Date
    Jun 2000
    Posts
    705
    back up front<--

  10. #30
    Senior Bumbler
    Join Date
    Dec 2000
    Posts
    522
    I've created a "drop-in" Smart Clip inspired by Ilya and GGW's fine work. (Flash 5 only) Its a featured extension at MM's site.

    Drop in a centered popup window button anywhere within your movie. The user sets the URL, window name and size:

    (see footer)
    [Edited by wdglide on 04-22-2001 at 04:19 PM]

  11. #31
    Member
    Join Date
    Mar 2001
    Posts
    40
    I found this thread to be most usefull except for one thing... It takes a very long time(about 10sec on my cable connection) for the window to pop open. I am stumped as to why this is the case. Please help.

    Thanks

  12. #32

    God help me

    Everyone seems to be able to do this but me. I use Flash 5, and I learned on Flash 5 so I don't know anything else. But I'd think if it was this easy to do it in 4 and 3 and so on, that it would be even easier to do it in Flash 5.

    This is my problem: I put that exact same code into my button. And it popped up a window but it didn't have anything in it. And I even changed the address to my own website. But, the thing I'm trying to accomplish is to open a Java window from Flash, and have it just open an image, because I have the thumbnails for the contents of the popups in my Flash movie. Get it? It's the same thing 1000 other people are doing, but hey, one step at a time 'ey?

    I'm not really a newbie, but I know very little about action scripting. I just sorta made my own way around it until now.

    If it comes to it...maybe somebody could just send me an .FLA of just a button that links to some random website, that way I could easily disect it and find out how the heck they did it. Maybe??

    PLEAA EA EA AAAAEAAASE help me-

    AdamJohn

  13. #33
    Se˝or member
    Join Date
    Dec 2000
    Location
    Huddersfield, UK
    Posts
    1,819
    Originally posted by GreatGooglyWoogly
    Centering your Pop-up Window

    Here is another modified polar-lights script for poping your window in the center of the screen. The variables 'varHeight''varWidth' and your set Height/Width should match for this to work properly:


    on (release) {

    varHeight="300"
    varWidth="400"

    getURL ("javascript:window.open('http://www.flashkit.com','Welcome_To_FlashKit','width=400 ,height=300,top='+((screen.availHeight/2)-(" add varHeight/2 add"))+',left='+((screen.availWidth/2)-(" add varWidth/2 add "))); void(0);");
    }

    Thanks for the codes GGW! I've used the above on my fla and yes it does open a centred pop up in the sizes specified, however.... I have my main fla with 5 buttons all supposed to open a pop window (centred) to display each of the seperate fla movies in their own window. i've found, and it's probably me bing thick, that when you open one window and click on another fla button to open a second (or third, fourth etc) movie, it opens in the same window and ignores the sizes of the movies. As some of the movies are only 200x200 and some go to 700x400, this leads to them being squashed etc. Is it me being daft or is there a different way to open a seperate window on each button? Thanks.

  14. #34
    Junior Member
    Join Date
    Nov 2000
    Posts
    7
    Originally posted by Ilya
    Hi !

    how do you the get url function to work to link to an html frameset from my flash movie



    Cozmic: don't listen thenewrules - he is too lazy to check his siggestion before posting
    For Flash4:
    Code:
    Set Variable: "wdth" = "300"
    Set Variable: "hdht" = "300"
    Get URL ("javascript:window.open('link.html','WindowName','width="&wdth&",height="&hdht&",top='+((screen.availHeight/2)-("&hdht/2&"))+',left='+((screen.availWidth/2)-("&wdth/2&"))); void(0);")
    or paste in Get Url window
    Code:
    "javascript:window.open('link.html','WindowName','width="&wdth&",height="&hdht&",top='+((screen.availHeight/2)-("&hdht/2&"))+',left='+((screen.availWidth/2)-("&wdth/2&"))); void(0);"
    and don't forget to set it in "expression" mode

  15. #35
    Junior Member
    Join Date
    Sep 2000
    Posts
    21

    Very nice but it still don┤t work

    Thank you very much for your detailed answer but that was nothing new to me. I tried nearly everything but it didn┤t work. This is exactly my problem:

    http://www.moock.org/webdesign/flash...ndow-main.html
    or
    http://www.moock.org/webdesign/flash...avascript.html

    but it only works on the website - not after the download :-(

    Greetings,
    Stefano

  16. #36
    Member
    Join Date
    Jul 2001
    Posts
    48

    pop up problems

    Hi!
    In my .swf movie I have buttons which when clicked will popup a new picture window. When I embed my .swf file into an html document, it works fine. Then I made my .swf movie pop up into its own window when the html page was loaded and the buttons in my movie didn't work.

    I'm trying to make it possible for the .swf movie to pop up into its own window when the html dicument is loaded and still be able to use the pop up window function that is in my .swf. Does this make sense. If anyone can help me out I'd appreciate it.

    Thanks



  17. #37
    Senior Bumbler
    Join Date
    Dec 2000
    Posts
    522

    Re: pop up problems

    Originally posted by presston
    ...When I embed my .swf file into an html document, it works fine. Then I made my .swf movie pop up into its own window when the html page was loaded and the buttons in my movie didn't work...
    I assume that you are using javascript to open the popup (i.e., the type this post is referring to). If that's the case, the .swf needs to be embedded in a hmtl doc for javascript to work. The getUrl action simply passes the javascript expression off to the browser containing it. If the swf is in a "standalone" mode there's no browser to accept the expression. (At least thats my understanding.)

    Simple answer --> You're right it won't work

  18. #38
    Ryan Thomson EvolveDesigns's Avatar
    Join Date
    Oct 2001
    Location
    British Columbia
    Posts
    3,338
    Hi all.

    I've been having a wild ride trying to figure this script out... It works perfect when I test it offline, but when I upload, my popup doesn't work and my mainpage dissapears.. After much speculation, I think I know what my problem is.

    THE PROBLEM?

    My site is within a frame so I can keep my registered url name in the address bar. Could this have something to do with it? I really hope not, because this is also the reason why i'm trying to avoid having the javascript on my page (because if I do, I'll have to change my URL name to the real one http://www.longuglyname.322.weee.dd.d.d.e.ee.com -> that isn't really it... hehe and I really DONT want to do this.. any suggestions?

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