A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: open window

  1. #1
    Junior Member
    Join Date
    Dec 2000
    Posts
    18
    I need to open a window in html with a flash movie, the problem I have is that I need to open a window with a specified size, like 300 px x 450 px, how can I do that in a flash movie?

    thanks

  2. #2
    Junior Member
    Join Date
    Jun 2001
    Posts
    16
    Although there may me a more "technical" way (that I am unaware of!) I do this by calling a javascript function located within the html that embeds your flash, which can then open your movie with all your preferences.

    So, the button action would be

    on (release) {
    geturl("javascript:loadMyWindow('myNewMovie.html', 400,300)")
    }

    In the html, you can have a script like:

    <script language="javascript">

    function windowOpen(url,width,height) {
    myWindow = window.open(url,"windowName","width=" + width + ",height=" + height + ",top=10,left=10,toolbar=no,location=no,directorie s=no,status=no,menubar=no,scrollbars=yes,resizable =yes");
    if (!myWindow.opener) myWindow.opener = self;
    }
    </script>

    Of course, you can choose not not pass the url, width or height and define all in the script - depends on how versatile you want it.

    Hope this helps!


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