Loading ...
Sorry, an error occurred while loading the content.

Re: [JavaScript] Displaying Flash with JavaScript/AJAX

Expand Messages
  • Jonas Raoni
    ... form1[ LED-Color ] -- Jonas Raoni Soares Silva http://jsfromhell.com http://www.contraacpmf.com.br
    Message 1 of 5 , Sep 12, 2007
    • 0 Attachment
      On 9/12/07, Dave <arpoador1@...> wrote:
      > document.form1.LED-Color.src="Images/LED-Red.gif";

      form1["LED-Color"]


      --
      Jonas Raoni Soares Silva
      http://jsfromhell.com
      http://www.contraacpmf.com.br
    • monsieurdizzy
      Problem solved, though it wasn t related to the JavaScript, unfortunately. Both the and objects need some mention of the URL, which the
      Message 2 of 5 , Sep 13, 2007
      • 0 Attachment
        Problem solved, though it wasn't related to the JavaScript, unfortunately.

        Both the <OBJECT> and <PARAM> objects need some mention of the URL,
        which the original coder did not include as the proper parameter.
        Though it existed within the <OBJECT>'s element as the "weather"
        param, that wasn't sufficient.

        Thank you for your consideration all the same.

        --- In JavaScript_Official@yahoogroups.com, "monsieurdizzy"
        <ewalklet@...> wrote:
        >
        > Hello, everyone.
        >
        > I am trying to get a Flash object that displays local weather on a
        > home page. Neither the Flash nor the code to implement the Flash was
        > developed by me, but I'm supposed to discover why it's working.
        >
        > On Firefox and Safari, the object displays flawlessly. On IE6/7,
        > however, nothing is rendered at all. The object is placed on the page
        > (with that annoying "Please click to activate" message) but the object
        > itself never loads, leaving only a blank white box behind.
        >
        > Here is the JavaScript code used to display the object:
        >
        > <script type="text/javascript">
        > function getMovie(m)
        > {
        > if(navigator.appName.indexOf("Microsoft") != -1)
        > {
        > return window[m];
        > }
        > else
        > {
        > return document[m];
        > }
        > }
        >
        > function renderWeather()
        > {
        > document.getElementById('weatherContainer').innerHTML =
        > "<object id=\"weather\"
        > width=\"270\"
        > height=\"295\"
        >
        codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0\"
        >
        > classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\">
        > <param value=\"/flash/portlet/forecast/core.swf"\"
        > name=\"weather\"/>
        > <param value=\"high\"
        > name=\"quality\"/>
        > <embed width=\"270\"
        > height=\"295\"
        > type=\"application/x-shockwave-flash\"
        > pluginspage=\"http://www.macromedia.com/go/getflashplayer\"
        > quality=\"high\"
        > src=\"/flash/portlet/forecast/core.swf?loadZip=12345\"/>
        > </object>";
        > }
        >
        > function setZipCode(zipcode)
        > {
        > var movie = getMovie("weather");
        > if (movie)
        > {
        > if (movie.loadZip)
        > {
        > movie.loadZip(zipcode);
        > }
        > else
        > {
        > alert("LoadZip method does not exist.");
        > }
        > }
        > }
        >
        > YAHOO.util.Event.onDOMReady(renderWeather);
        > </script>
        > <div id="weatherContainer">
        > </div>
        >
        > Hardcoding the innerHTML would have certainly been easier, but the
        > home page uses AJAX to allow for dynamic layouts.
        >
        > Once again, Firefox/Safari is fine, but IE6/7 are not. The object
        > registers on the page but is never fully-loaded. If you type the URL
        > of the Flash object into the address bar in the browsers, however, the
        > movie renders without any problems, which leads me to believe there's
        > an issue in this markup.
        >
        > Is there any blatant error in the JavaScript or the embed code that
        > I'm glazing over, or is there some other trick to getting these
        > objects to display in IE that I'm unaware of?
        >
        > Thank you very much.
        >
      Your message has been successfully submitted and would be delivered to recipients shortly.