A Flash Developer Resource Site

Results 1 to 9 of 9

Thread: embeding a .swf file into a pop-up window

  1. #1
    Member
    Join Date
    Aug 2001
    Posts
    74
    I'm having a bit of a javascript problem. I'm trying to embed my .swf file into a pop-up window. The problem is that when I customize the pop-up window <Title>, the .swf file doesnt load. If I dont customize the pop-up window, the .swf file loads but the title bar shows the directory path of the file (and that I do not want to show).

    Can anyone help me embed the .swf file into the pop-up window while still being able to customzie the Titlebar. Thanks in advance. By the way, I'm working in Flash 4

    -xample

  2. #2
    Senior Bumbler
    Join Date
    Dec 2000
    Posts
    522
    post the script your using

  3. #3
    Member
    Join Date
    Aug 2001
    Posts
    74
    <script language="JavaScript">
    function openWin() {
    myWin=open("blah.swf", "Name", "width=750, height=375, top=250, left=200, scrollbar=no");
    myWin.document()
    myWin.document.write("<TITLE>Titlebar Name</TITLE>");
    }
    script>



    -and then I reference that in the <Body> tag of my HTML script.

    When the myWin.document.write line of the script is there, the window pops up with Titlebar Name in the titlebar, but the .swf file won't load. Take out the myWin.document.write line and the .swf file loads, but with the directory path in the titlebar.

  4. #4
    Junior Member
    Join Date
    Aug 2001
    Posts
    18
    </script>

    ?

  5. #5
    Senior Bumbler
    Join Date
    Dec 2000
    Posts
    522
    Why are you opening the .swf directly? If you embed it into an html file, then open that html file with javascript - you'll avoid this problem.

  6. #6
    Member
    Join Date
    Aug 2001
    Posts
    74
    The script tag was closed </script>. It's the process that I'm concerned about

  7. #7
    Member
    Join Date
    Aug 2001
    Posts
    74
    So, publishing in HTML fixed that titlebar problem, but the movie doesnt align in the window. It is slightly set off the top left corner. I've played around with the different HTLM publishing settings, but nothing seemed to solve this problem. So the new problem is getting the movie to fit-to-size exactly in the pop up window. Any suggestions?

    -xample

  8. #8
    Senior Bumbler
    Join Date
    Dec 2000
    Posts
    522
    Try the "Remove Browser Margins Extension" available at http://www.macromedia.com/exchange/flash

  9. #9
    Member
    Join Date
    Aug 2001
    Posts
    74
    I would love to install that extension. That would solve all the problems, but I'm working in Flash 4 until this project is over, and only then will I be able to afford Flash 5. So for now I need to figure out how to eliminate those margins the hard way. I knew it wouldnt be an easy quick fix. What now?

    -xample

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