Solved

Flash and Netscape 7+

Posted on 2003-10-21
11
211 Views
Last Modified: 2010-04-03
I'm having trouble with my Flash site in NN7+.

On Windows, the site opens really, really, really small in its window. It should fill it - or at least be bigger! Seems to be okay in IE.

On Mac, I get nothing. A window opens and I see the background color, but no Flash. It does seem to work okay in Safari and IE.

Thanks for the help!

0
Comment
Question by:jtlyonsden
  • 6
  • 3
11 Comments
 
LVL 27

Expert Comment

by:negatyve
ID: 9595792
Could you post here the embedding html code?
0
 

Author Comment

by:jtlyonsden
ID: 9596072
I've implemented the IE browser fix that's been going around, so my embed text is in three places:

This is the EXTERNAL javascript file (browserFix.js):
function browserFix() {
      document.write('<object classid="clsid:000000" codebase="http://download.macromedia.com/pub/ shockwave/cabs/flash/swflash.cab#version=6,0,0,0" id="movie" width="100%" height="100%" align="top">\n');
      document.write('<param name="allowScriptAccess" value="sameDomain" />\n');
      document.write('<param name="movie" value="movie.swf" />\n');
      document.write('<param name="loop" value="false" />\n');
      document.write('<param name="menu" value="false" />\n');
      document.write('<param name="quality" value="high" />\n');
      document.write('<param name="salign" value="t" />\n');
      document.write('<param name="bgcolor" value="#666699" />\n');
      document.write('<embed src="movie.swf" loop="false" menu="false" quality="high" salign="t" bgcolor="#666699" width="100%" height="100%" swLiveConnect=true id="movie" name="movie" align="top" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />\n');
      document.write('</object>\n');
}

This is in the <HEAD> section of the page:
<script src="browserFix.js" language="JavaScript" type="text/javascript"></script>

This is in the <BODY> section of the page:
<script language="JavaScript" type="text/javascript">
      browserFix();
</script>

This works the same as it did before I "fixed" it in IE. It's never worked in Netscape, even before I implemented the "fix."

Thanks for taking a look.
0
 
LVL 27

Expert Comment

by:negatyve
ID: 9597227
Tested with these browser on pc, and always looked as expected :

Opera 7.11
Internet Explorer 6.0.28
Netscape Navigator 7.01
Netscape Navigator 6.0
Netscape(R) Communicator 4.51
Mozilla 1.4

This is a browser, not javascript, problem. Is your Netscape 7 for Mac plugin updated?
0
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 

Author Comment

by:jtlyonsden
ID: 9599439
You asked for it! Here are the two functions that create the HTML text. "_global.transformXML" is called from the click of the "printer-friendly" button. The second function ("replaceChars") replaces all quotes with &quot and all single quotes with \'.

The thing that has really perplexed me is that if I do a trace on the variable "theseItems" and copy and paste the output directly into the javascript statement "window.document.write("HTML text...");", it works. Thanks again.

I know I could just use single quotes instead of all the escape characters, but I was trying everything to get this fixed.

_global.transformXML = function() {
      var theseItems:String = "<html><head>";
      // define styles
      theseItems += "<style type=\\\"text/css\\\">\\n";
      theseItems += "body {font-family:Arial, Helvetica, sans-serif; white-space:none;}\\n";
      theseItems += "div.headline {font-weight:bold; font-size:20px}\\n";
      theseItems += "div.subhead {font-weight:bold; font-size:16px}\\n";
      theseItems += "div.paragraph {font-size:12px;}\\n";
      theseItems += "div.boldParagraph {font-size:12px; font-weight:bold;}\\n";
      theseItems += "div.bullets {font-size:10px;}\\n";
      theseItems += "div.caption {font-size:9px;}\\n";
      theseItems += "</style>\\n";
      theseItems += "<title>Prism Software Corporation</title></head><body>";
      // set this for bulleted list (only one set of <ul> tags)
      var bulletFlag:Boolean = false;
      //
      for (i=0; i<=_global.arrItemsXML.length; i++) {
            switch (_global.arrLabelsXML[i]) {
            case "headline" :
                  theseItems += "<hr>\\n";
                  theseItems += "<!-- HEADLINE -->\\n";
                  theseItems += "<div class=\\\"headline\\\">";
                  theseItems += replaceChars(_global.arrItemsXML[i]);
                  theseItems += "</div><br>\\n";
                  break;
            case "subhead" :
                  theseItems += "<!--SUBHEADING-->\\n";
                  theseItems += "<br><div class=\\\"subhead\\\">";
                  theseItems += replaceChars(_global.arrItemsXML[i]);
                  theseItems += "</div><br>\\n";
                  break;
            case "paragraph" :
                  theseItems += "<!-- PARAGRAPH -->\\n";
                  theseItems += "<div class=\\\"paragraph\\\">";
                  theseItems += replaceChars(_global.arrItemsXML[i]);
                  theseItems += "</div><br>\\n";
                  if (_global.arrLabelsXML[i+1] == "paragraph") {
                        theseItems += "<br>";
                  }
                  break;
            case "boldParagraph" :
                  theseItems += "<!-- BOLD PARAGRAPH -->\\n";
                  theseItems += "<div class=\\\"boldParagraph\\\">";
                  theseItems += replaceChars(_global.arrItemsXML[i]);
                  theseItems += "</div><br>\\n";
                  break;
            case "bullets" :
                  thisBullet = replaceChars(_global.arrItemsXML[i]);
                  if (bulletFlag == false) {
                        theseItems += "<!-- BULLETS -->\\n";
                        theseItems += "<div class=\\\"bullets\\\">";
                        theseItems += "<ul>";
                        theseItems += "<li>"+thisBullet+"</li>";
                        //if only one bullet
                        if (_global.arrLabelsXML[i+1] != "bullets") {
                              theseItems += "</ul>";
                              bulletFlag = false;
                        } else {
                              bulletFlag = true;
                        }
                  } else if (_global.arrLabelsXML[i+1] == "bullets" && bulletFlag == true) {
                        theseItems += "<li>"+thisBullet+"</li>";
                  } else {
                        theseItems += "<li>"+thisBullet+"</li>";
                        theseItems += "</ul>";
                        theseItems += "</div>\\n";
                        bulletFlag = false;
                  }
                  break;
            case "caption" :
                  theseItems += "<br>";
                  theseItems += "<!-- CAPTION -->\\n";
                  theseItems += "<div class=\\\"caption\\\">";
                  theseItems += replaceChars(_global.arrItemsXML[i]);
                  theseItems += "</div><br>\\n";
                  break;
            }
      }
      theseItems += "</body></html>";
      //trace(theseItems);
      getURL("javascript:openPrinterFriendly(\""+theseItems+"\")");
};
// replace " with &quot and ' with \' for proper display
replaceChars = function (thisText) {
      arrParsedText = new Array();
      newText = new String();
      //
      // replace quotes
      //
      arrParsedText = thisText.split("\"");
      if (arrParsedText.length>1) {
            for (j=0; j<arrParsedText.length-1; j++) {
                  newText += arrParsedText[j]+"&quot;";
                  lastOne = j;
            }
            newText += arrParsedText[lastOne+1];
            thisText = newText;
      }
      //
      // replace apostophes
      //
      arrParsedText = thisText.split("\'");
      if (arrParsedText.length>1) {
            newText = "";
            for (j=0; j<arrParsedText.length-1; j++) {
                  newText += arrParsedText[j]+"\\\'";
                  lastOne = j;
            }
            newText += arrParsedText[lastOne+1];
            thisText = newText;
      }
      return thisText;
};
0
 

Author Comment

by:jtlyonsden
ID: 9599444
Sorry, I pasted that message into the wrong problem!
0
 
LVL 27

Expert Comment

by:negatyve
ID: 9605295
ok, what about "this" problem?
0
 

Author Comment

by:jtlyonsden
ID: 9607523
Well, I made sure I was using the latest version of Netscape on my Windows machine and Mac (7.1). Now I have the same problem with both that I was having in Windows - the Flash movie opens really small within the window (which is the correct size). I have a javascript that is called from a couple of buttons in my movie to allow the user to enlarge the window. This works on the actual window, but the content continues to appear really small (about 20% of actual size).

I imagine something has changed in 7.1 in regard to embedded content, but I haven't had the time to look at anything yet. I noticed that you tested in 7.01 - know anything new about 7.1?

Thanks.
0
 

Author Comment

by:jtlyonsden
ID: 9675504
I finally figured out what the problem was. NN 7.1 does not like percentages for width and height. As soon as I changed the values to pixels, my movie opened just fine.

This makes it harder to do my dynamic window sizing, but I'm sure I'll figure out a work around.
0
 

Author Comment

by:jtlyonsden
ID: 12160664
Solved the problem myself. Close the question.
0
 
LVL 1

Accepted Solution

by:
Computer101 earned 0 total points
ID: 12185985
PAQed, with points refunded (250)

Computer101
E-E Admin
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I know the transition can be hard. We got used to the ease of use ActionScript 2 had, but honestly, it became problematic later on, especially if designers were involved in the project and found it easy to add code as they saw fit. So, this artic…
I come across a lot of question about how to access things in the document class from a movieclip, or accessing something from a movieclip in the document class. It took me a while to figure this out but once I did it makes life so much easier. …
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question