4 Replies Latest reply on Sep 7, 2009 9:52 PM by newFlexP

    Error in swfobject


      hi all,


      When try to access the web server , the system gets this error message. The error is not showing on PC,
      but it shows on the web server.


      Message: 'null' is null or not an object
      Line: 5
      Char: 5280
      Code: 0
      URI: swfobject.js


      THE VERSION OF swfobject i using is version 2.0.


      Hope someonce able to help me..thk

        • 1. Re: Error in swfobject
          Greg Dove Level 4

          That is a javascript error in the browser?


          It looks to me like a bad id or name attribute on your embedding tags. I would check the id/name that you're using to embed the swf with, perhaps it does not meet the criteria for a valid id attribute. Also some browsers can show more problems than others with invalid or missing id settings, particularly with things like ExternalInterface return values etc.

          1 person found this helpful
          • 2. Re: Error in swfobject
            newFlexP Level 1

            when i open web brower in the server that will be java script error.

            For the client side when open web brower, that will not have any error.


            This the problem make me confuse



            <script language="javascript">
            var flashvars = {}

            flashvars.settingPath = "/flash/gc/xml/tickerSetting_<%=m_sLang%>.xml";


            var params = {};
            params.menu = "false";
            params.quality = "high";
            params.bgcolor = "#000000";
            params.allowScriptAccess = "always";
            params.type = "application/x-shockwave-flash";
            params.wmode = "transparent";
            params.salign = "lt";
            params.allowFullScreen = "false";


            var attributes = {};
            attributes.name = "RunningTicker";
            attributes.id = "RunningTicker";


            swfobject.embedSWF("/flash/gc/ticker.swf", "myContent", "<%=RTWidth%>", "20", "6.0.0","/flash/gc/ticker.swf", flashvars, params, attributes);


            <script language="javascript">
                if (PluginDetect.getVersion("Java")==null){
                    alert ("You need JRE to run the application. Pleae Click Ok to download JRE.");
                    window.location ="http://java.com/en/download/manual.jsp";





            <div id="myContent">      <p>Alternative content</p>    </div>

            • 3. Re: Error in swfobject
              Greg Dove Level 4

              If that's working fine from another machine, but not from your server itself, then make sure you are not accessing the html page from the file system and that you are making a request to the http server locally.


              Usually you would access it with localhost:




              or possibly{path_to_html_page}


              and *not* from the html file via  file://C:{filepath_to_html_page} to html file


              If its not the above that is causing it then I can't think of what else might be the problem, sorry.

              1 person found this helpful
              • 4. Re: Error in swfobject
                newFlexP Level 1

                thk a lot..


                But that not the problem.

                I also dono why this happen.

                U understand any unicode using flex ?