A Flash Developer Resource Site

Results 1 to 20 of 20

Thread: Swish: open new window in specific size

  1. #1
    Junior Member
    Join Date
    Nov 2001
    Posts
    4
    I want to make a link in my swish movie that opens a new popup window to predefined dimensions so i can place another swish movie in it. I have got the code to open a popup window via a text link, but i would now like to do this from within my swish movie. Is this the javascript action and if so, how do i use it, or something else?

  2. #2
    Guest User Damaso's Avatar
    Join Date
    Dec 2000
    Location
    florida
    Posts
    213
    You already have the code for html right?
    To trigger it from swish movie, put an action 'goto url'
    ex:
    GoTo URL - javascript:popUpWindow1("http://www.sitename.com/pagename.htm");

  3. #3
    Guest User Damaso's Avatar
    Join Date
    Dec 2000
    Location
    florida
    Posts
    213
    opz! I didn't mean to stick my tongue out

  4. #4
    Senior Member Cadence's Avatar
    Join Date
    Aug 2000
    Location
    Columbus, Ohio
    Posts
    3,428
    hehe ... Damaso - I just went back into your post and edited out the smilies

    Peaces,
    Cadence

  5. #5
    Junior Member
    Join Date
    Nov 2001
    Posts
    4
    Originally posted by Damaso
    opz! I didn't mean to stick my tongue out
    I know how to make a new window open with the go to url action, but how can i specify the dimensions + positioning of that window as well as no scroll- or toolbars? The only code available to me through http://www.javafile.com and similar sites which allows me to make such a window appear is through a text link, but i can't seem to find how to make a page which opens itself in such a way. I hope my explanation is clear enough. Thx a lot for your help

  6. #6
    Senior Member
    Join Date
    May 2001
    Location
    Peoria, Arizona
    Posts
    1,889
    There is a plethora of popup methods and effects at Dynamic Drive.

    Popup Window Generator

  7. #7
    Junior Member
    Join Date
    Nov 2001
    Posts
    4
    Originally posted by Hannibal Smith
    There is a plethora of popup methods and effects at Dynamic Drive.

    Popup Window Generator

    Also on dynamic drive the popup generated has to be activated by a text link; for someone who knows javascript it would probably be easy to adapt this code and make it work from within the swish movie, but sadly i'm not one of these people (yet) . if someone knows of a piece of code to stick in the head section of a page so that the page automaticaly resizes to predefined dimensions or to an exact fit around an image or swish movie without first having to click on a text link, it would be much appreciated. Thx Mucho for all the help

  8. #8
    Senior Member Cadence's Avatar
    Join Date
    Aug 2000
    Location
    Columbus, Ohio
    Posts
    3,428
    You would use the same text link in SWiSH as they have at the Dynamic Drive site ... (slightly modified, though) ...

    For example ... You put the code in your HTML page (just as the instruct you to do --- generally in the <HEAD> of the document) ... Then, they have the "text-link" code that you put in the <BODY> of the document ...

    The part in the <HEAD> is the function ...
    The part in the <BODY> is the link :
    usually something like: javascript:popUp("page.htm","id",etc.etc.);

    So - follow there instructions (minus the <BODY> code) ...

    Then, in SWiSH make your button like this:

    TheButton
    --- OnRelease
    ------- GoTo URL
    ------- javascript:popUp(); (make sure to fill in the area in parenthesis - and make sure to use the correct punctuation - including the semi-colon ; ) .... The javascript code goes in the URL box of the GoTo URL action

    I hope it helps,
    Peaces,
    Cadence

  9. #9
    Member
    Join Date
    Jan 2002
    Posts
    63
    i was wondering about this too is there a way to get a pop up window to pop up with the dimensions i want without using a text link? so like when u go to the site the little pop up comes up,is it possible without using html?

  10. #10
    Member
    Join Date
    Apr 2002
    Posts
    33
    Well, I just wanted to thank you for the help you've given us, but I'm still confused on how to get it working right

  11. #11
    Senior Member
    Join Date
    May 2001
    Location
    Peoria, Arizona
    Posts
    1,889
    You have to use HTML because the Flash Player, by itself, doesn't know what JavaScript is.

  12. #12
    Guest User Damaso's Avatar
    Join Date
    Dec 2000
    Location
    florida
    Posts
    213
    I have just found this popup wizard:
    http://www.flash-db.com/PopUp/
    To all who haven't seen this, it's very cool.

  13. #13
    Still Causing Trouble grumblemarc's Avatar
    Join Date
    Dec 2000
    Posts
    1,513
    This is a sample of the code I'm using to generate the popups for my new sites illustration gallery. I used the OnRelease>Javascript and placed this code(modified for each link) in the javascript field.

    open("http://yoursite.com/whatever.html","name","width=540,height=630,")

    I didn't touch the "name" section as it doesn't seem to affect anything. Works fine for me.

  14. #14
    Senior Member Cadence's Avatar
    Join Date
    Aug 2000
    Location
    Columbus, Ohio
    Posts
    3,428
    The point of the "name" section - is that it will give your window an identity ...

    This comes in handy if you only want one pop-up window to be open ...

    So, if you have 3 pop-up windows from your site - and they are all the same size - and all have the same "identity" .... When someone opens one of the pop-ups ... then they open a second pop-up - the second page will open in the first pop-up window .... Does that make sense ? ...

    If you give each pop-up code a different "identity" - then you will end up with 3 different pop-up windows ... (it all depends on what you need)

    Peaces,
    Cadence

  15. #15
    Still Causing Trouble grumblemarc's Avatar
    Join Date
    Dec 2000
    Posts
    1,513
    Aha! I just left that alone and was trying to figure out why the new popup window opened up in the dimensions of the old (it didn't fit) each time I clicked on a different link. Thanks. Gotta go and rename my babies.

  16. #16
    Still Causing Trouble grumblemarc's Avatar
    Join Date
    Dec 2000
    Posts
    1,513
    Yup! It works!

  17. #17
    Junior Member
    Join Date
    Nov 2001
    Posts
    4
    Originally posted by grumblemarc
    This is a sample of the code I'm using to generate the popups for my new sites illustration gallery. I used the OnRelease>Javascript and placed this code(modified for each link) in the javascript field.

    open("http://yoursite.com/whatever.html","name","width=540,height=630,")

    I didn't touch the "name" section as it doesn't seem to affect anything. Works fine for me.
    Perfect! This is exactly what i needed! Thx very much for your (and everybody else's) help; i can now start my project in earnest.

    Cheers,

    El Doctor

  18. #18
    Junior Member
    Join Date
    Apr 2002
    Posts
    15
    I had this very question a short while back and the code you found is right but it can go one better:

    open("http://www.yoururl.com/","name","width=790,height=560,menubar=no,toolbar= no,scrollbars=yes,top=0,left=0")

    I found the 790 and 560 work best to make 800x600 resolution screens go "full". Of course for a small movie you'd set these numbers to the movie dimension.

    By adding the no menu and toolbar code all the extra garbage gets eliminated and it's a nice clean window with only the minimize/restore/close commands at top.

    The top and left commands let you place the window as well. The settings of 0 put the top left corner in the top left corner. By experimenting, you can have the window open anywhere on the page you want by adjusting those variables.

    Hope this helps

    spinguy


  19. #19
    Older New Member
    Join Date
    Apr 2002
    Location
    Saint Louis MO
    Posts
    25
    thanks Spinguy!

    originally this is what i was looking for here

    didn't see it in a thread anywhere.. so i went looking at the tutes at purified productions (the best i have seen so far and i hope to copy the style for other tutorials soon)

    I wound up writing Cadence from there.. he replied and when i got back here and got registerted finally i didnt see this thread when i posted today..

    sorry for the double thread

    but yes the fullscreen thing gave me problems in swish and that's one i also wanted so thanks

    and dr_puto Cadence posted a code that works well.. and will allow calling up multiple URLs in windows and sizes without head codes using only the goto function in swish

    at this thread

    http://board.flashkit.com/board/show...hreadid=301435

    PS thanks again Cadence on the explanation of the "name" thing

    I have that very problem on a page and had to add a note to
    close each window before opening another as the second pic opens in the same window without resizing the window

    all done with scripts from the javascript source or dhtml.com.. whichever... the credits in the page codes

    well easier understood perhaps seen than read.. they are at http://mimes.com/im/pix/ and i am redoing that page in swish so i wont bother looking at the problem now

    thanks all

    ~timmer

  20. #20
    Still Causing Trouble grumblemarc's Avatar
    Join Date
    Dec 2000
    Posts
    1,513
    Originally posted by Spinguy
    I had this very question a short while back and the code you found is right but it can go one better:

    open("http://www.yoururl.com/","name","width=790,height=560,menubar=no,toolbar= no,scrollbars=yes,top=0,left=0")

    I found the 790 and 560 work best to make 800x600 resolution screens go "full". Of course for a small movie you'd set these numbers to the movie dimension.

    By adding the no menu and toolbar code all the extra garbage gets eliminated and it's a nice clean window with only the minimize/restore/close commands at top.

    The top and left commands let you place the window as well. The settings of 0 put the top left corner in the top left corner. By experimenting, you can have the window open anywhere on the page you want by adjusting those variables.

    Hope this helps

    spinguy

    If you try the code as I have it. it also opens a window WITHOUT status bar, menu bar, etc. The only difference is that you also added details to position the 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