Announcement

Collapse
No announcement yet.

Javascript error when inserting Flash

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Javascript error when inserting Flash

    Hi,
    I'm trying to insert a flash menu in my layout in the Javascript section list in a box, i've done this using dreamweaver and have copied the code across over and pasted it in (i'm eventually going to be removing the other rows and leaving only the Flash). This results in a javascript error of 'object expected'. The line that is being highlited in red is:
    Code:
    <embed src="home-menu.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="170" height="286"></embed>
    Having looked at the code, I cant see where i'm going wrong, the flash file is called 'home-menu'.swf & the code looks like this:
    Code:
    <table cellpadding="0" cellspacing="0" border="0" width="100%">
       <tr>
          <td valign="top" width="8%" bgcolor="<actinic:variable name="Palette2" />"><img src="theme_tab2_left.gif" /></td>
          <td valign="top"  bgcolor="<actinic:variable name="Palette2" />"><td bgcolor="<actinic:variable name="Palette2" />" width="84%" height="20"><div align="center">
           <script type="text/javascript">
    AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','170','height','286','src','home-menu','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','home-menu' ); //end AC code
    </script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="170" height="286">
              <param name="movie" value="home-menu.swf" />
              <param name="quality" value="high" />
              <embed src="home-menu.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="170" height="286"></embed>
            </object></noscript> 
          <td valign="top" width="8%" align="right" bgcolor="<actinic:variable name="Palette2" />"><img src="theme_tab2_right.gif" /></td>
       </tr>
       <tr>
          <td colspan="3" class="thinborder2" style="padding: 3px;">
            <script language="javascript" type="text/javascript">
    			document.write(YahooSections(section_tree)) 
    		  </script>
          </td>
       </tr>
    </table>
    Any idea?
    Thx Steve

    #2
    As always, posting an URL would help us help you.
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    Comment


      #3
      Hi Norman, i'm afraid, I havent uploaded the site as of yet. This is an error that is being highlighted within Actinic under the design tab. There isn't much point in uploading, until i've fixed this.
      Steve

      Comment


        #4
        Originally posted by robotboi View Post
        Hi Norman, i'm afraid, I havent uploaded the site as of yet. This is an error that is being highlighted within Actinic under the design tab. There isn't much point in uploading, until i've fixed this.
        Steve
        Object Expected is a JavaScript error. Something's missing. Perhaps you've not loaded any code that contains the AC_FL_RunContent routine.
        Norman - www.drillpine.biz
        Edinburgh, U K / Bitez, Turkey

        Comment


          #5
          Originally posted by NormanRouxel View Post
          Object Expected is a JavaScript error. Something's missing. Perhaps you've not loaded any code that contains the AC_FL_RunContent routine.
          I was wondering if it is because I have the AC_RunActiveContent.js file generated by Dreamweaver in the wrong directory perhaps? I am not very accustomed to using Flash/Dreamweaver very often, so i'm hoping I can work it out. Should I be telling the HTML where to find it? If so, how do I do this?
          Thanks

          Comment


            #6
            Hi again,
            I was missing this from my HTML
            Code:
            <script src="AC_RunActiveContent.js" type="text/javascript"></script>
            All working now
            Thanks for replying
            Steve

            Comment


              #7
              Originally posted by robotboi View Post
              Hi again,
              I was missing this from my HTML
              Code:
              <script src="AC_RunActiveContent.js" type="text/javascript"></script>
              All working now
              Thanks for replying
              Steve
              Just make sure that the file AC_RunActiveContent.js is in your Site folder. Then, when you come to go live, Actinic will find it and automatically upload it to your server for you.
              Norman - www.drillpine.biz
              Edinburgh, U K / Bitez, Turkey

              Comment


                #8
                Google for "SWFObject" - it is regarded by many as the best way to insert Flash these days.

                Aquazuro - designer stainless steel accessories

                Comment


                  #9
                  Please help a noob?

                  Originally posted by NormanRouxel View Post
                  Just make sure that the file AC_RunActiveContent.js is in your Site folder. Then, when you come to go live, Actinic will find it and automatically upload it to your server for you.
                  Sorry sir. I know this post is old, i was wonderring if you could help. My problem is abit similar. I can see my flash movie in design view in actinic because i also copied it on both (PreviewHTML and Design HTML) folders but i cannot see it on the server when site is uploaded. the flash movie does not show and when i right click the area, it says (movie not loaded...). and on the server directory actinic does not seem to copy over the movie. So i decided to ftp the movie to the directory manually but still does not load. I CAN see the scripts file (AC_RunActiveContent.js) on the directory but... Do you have any idea why it's not showing?

                  Furthermore what is the <noscript></noscript> tag is this necessary and please can you explain (allowScriptAccess="sameDomain") within the embed tag d i need to add that stuff?

                  Comment


                    #10
                    Please post the URL for the site so we can see the problem.

                    Comment


                      #11
                      Oh yeah

                      Sorry my bad.

                      URL REMOVED !

                      Comment


                        #12
                        i can see a flash movie on all pages except the home page. you need to determine why the home page is different rather than investigate why the movie doesnt play

                        Comment


                          #13
                          Try hardcoding the swf address with the full URL rather than the relative URL.

                          Comment


                            #14
                            i am having the exact same problem as you kamikaze!

                            swf is inserted into layout html. layout is used by serveral pages including the homepage. swf works on all pages excpet homepage!?

                            any words of wisdom for me?

                            Comment


                              #15
                              Originally posted by etchin_uk View Post
                              i am having the exact same problem as you kamikaze!

                              swf is inserted into layout html. layout is used by serveral pages including the homepage. swf works on all pages excpet homepage!?

                              any words of wisdom for me?
                              Once again, posting without an URL makes it hard to help.

                              Try using the full URL (e.g. http://www.mysitse.com/acatalog/myfile.swf) for files you're loading.
                              Norman - www.drillpine.biz
                              Edinburgh, U K / Bitez, Turkey

                              Comment

                              Working...
                              X