dcsimg
A Flash Developer Resource Site

Results 1 to 13 of 13

Thread: resizable window in flash

  1. #1
    Junior Member
    Join Date
    Apr 2002
    Posts
    26
    hello.i want to give an action to a button to go to another web page in a new window ,but i want that window to be resized..ex:200x500
    can some one tell me how to do that?

  2. #2
    Senior Member
    Join Date
    Jan 2001
    Posts
    1,017
    u have to use javascript
    in the html file put this in the head tag:
    Code:
    <script language="javascript">
    <!--
    
    function showDoc(htmlDoc, winName, props)
    {
    	window.open(htmlDoc, winName, props)
    }
    
     WindowProps = "screenX=0,screenY=0,left=100,top=100,width=200,height=500,resizable=no,scrollbars=no'"
    //-->
    </script>
    and in the button put:
    [code]
    on (release) {
    getURL ("javascript:showDoc('nameOfFile.html', 'nameOfFile', WindowProps)");
    }

  3. #3
    Junior Member
    Join Date
    Apr 2002
    Posts
    26
    i did this but nothing happens...

  4. #4
    Member
    Join Date
    Oct 2001
    Posts
    52
    what he said is right. unless of course you don't own the site you're linking to. then you cant do it can you? it should have worked...bump, im curious.

  5. #5
    Junior Member
    Join Date
    Apr 2002
    Posts
    26
    its on my page but when the button is preseed it comes a blank window and in the url text is some error

  6. #6
    Member
    Join Date
    Oct 2001
    Posts
    52
    mx or 5?

  7. #7
    Junior Member
    Join Date
    Apr 2002
    Posts
    26
    flash 5.
    if this is not working than do u know a script for a html page that when its opened it opens in a configurable size ex:700x300

  8. #8
    Member
    Join Date
    Oct 2001
    Posts
    52
    ...no, i think javas the best way to go, try http://www.thejavasource.com...

  9. #9
    Member
    Join Date
    Nov 2001
    Posts
    82

    Very simple script

    -----------------------------------------------------------
    <script language="JavaScript">
    // Resize script
    if (top.frames.length!=0)
    top.location=self.document.location;
    self.moveTo(0,0)
    self.resizeTo(600,600)
    </script>
    ------------------------------------------------------------

    comments:
    * self.moveTo - this is the location of the top left corner of the window in the screen (you can delete it if you don't need it)
    ** self.resizeTo - this is the width and height of the window.

  10. #10
    Senior Member
    Join Date
    Jan 2001
    Posts
    1,017
    virtuaweb give me your email and i will send an example files that will show u how to do that, it's probebly syntax error

  11. #11
    Junior Member
    Join Date
    Apr 2002
    Posts
    26
    matei_krv@yahoo.com

  12. #12
    Junior Member
    Join Date
    Apr 2002
    Posts
    26
    no soryyyy....thats not my email
    its matei_rkv@yahoo.com

  13. #13
    Senior Member
    Join Date
    Jan 2001
    Posts
    1,017
    sent, open page1 and press on the button

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