Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6

Thread: swf help!

  1. #1
    New to the CF scene
    Join Date
    Sep 2009
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    swf help!

    question I have this code

    Code:
    <title>camexca.com</title><style type="text/css">
    <!--
    body {
    	background-color: #848484;
    }
    .style1 {font-size: x-large}
    -->
    </style>
    <script type="text/javascript" src="../../public_html/Scripts/AC_RunActiveContent.js"></script>
      <script type="text/javascript">
    AC_SW_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,0,0','width','1024','height','768','src','../../public_html/camexcaprox','pluginspage','http://www.macromedia.com/shockwave/download/' ); //end AC code
    </script><noscript><object classid="clsid:166B1BCA-3F9C-11CF-8075-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,0,0" width="1024" height="768">
        <param name="src" value="file://public_html/camexcaprox.swf" />
        <embed src="../../public_html/camexcaprox.swf" pluginspage="http://www.macromedia.com/shockwave/download/" width="1024" height="768"></embed>
      </object>
      </noscript><p align="center">Copyright Camexca.com&copy; 2008-2009 </p>
    however the vedio wont play on the site. the site says

    Code:
    Error: AC_SW_RunContent is not defined
    Source File: http://camexca.com/
    Line: 11
    any one know why this is happening?

  • #2
    Regular Coder seco's Avatar
    Join Date
    Nov 2008
    Location
    Oregon
    Posts
    687
    Thanks
    6
    Thanked 79 Times in 77 Posts
    Code:
    <script type="text/javascript" src="../../public_html/Scripts/AC_RunActiveContent.js"></script>
    Fix the path to the file.

  • #3
    New to the CF scene
    Join Date
    Sep 2009
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Code:
    <title>camexca.com</title><style type="text/css">
    <!--
    body {
    	background-color: #848484;
    }
    .style1 {font-size: x-large}
    -->
    </style>
    <script type="text/javascript" src="../../public_html/Scripts/AC_RunActiveContent.js"></script>
      <script type="text/javascript">
    AC_SW_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,0,0','width','1024','height','768','src','../../public_html/camexcaprox.swf','pluginspage','http://www.macromedia.com/shockwave/download/' ); //end AC code
    </script><noscript><object classid="clsid:166B1BCA-3F9C-11CF-8075-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=8,5,0,0" width="1024" height="768">
        <param name="src" value="file:../../public_html/camexcaprox.swf" />
        <embed src="../../public_html/camexcaprox.swf" pluginspage="http://www.macromedia.com/shockwave/download/" width="1024" height="768"></embed>
      </object>
      </noscript><p align="center">Copyright Camexca.com&copy; 2008-2009 </p>
    ok done but still the same thing

    my AC_RunActiveContent.js code is

    Code:
    //v1.0
    //Copyright 2006 Adobe Systems, Inc. All rights reserved.
    function AC_AddExtension(src, ext)
    {
      if (src.indexOf('?') != -1)
        return src.replace(/\?/, ext+'?'); 
      else
        return src + ext;
    }
    
    function AC_Generateobj(objAttrs, params, embedAttrs) 
    { 
      var str = '<object ';
      for (var i in objAttrs)
        str += i + '="' + objAttrs[i] + '" ';
      str += '>';
      for (var i in params)
        str += '<param name="' + i + '" value="' + params[i] + '" /> ';
      str += '<embed ';
      for (var i in embedAttrs)
        str += i + '="' + embedAttrs[i] + '" ';
      str += ' ></embed></object>';
    
      document.write(str);
    }
    
    function AC_FL_RunContent(){
      var ret = 
        AC_GetArgs
        (  arguments, ".swf", "movie", "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
         , "application/x-shockwave-flash"
        );
      AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
    }
    
    function AC_SW_RunContent(){
      var ret = 
        AC_GetArgs
        (  arguments, ".dcr", "src", "clsid:166B1BCA-3F9C-11CF-8075-444553540000"
         , null
        );
      AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
    }
    
    function AC_GetArgs(args, ext, srcParamName, classid, mimeType){
      var ret = new Object();
      ret.embedAttrs = new Object();
      ret.params = new Object();
      ret.objAttrs = new Object();
      for (var i=0; i < args.length; i=i+2){
        var currArg = args[i].toLowerCase();    
    
        switch (currArg){	
          case "classid":
            break;
          case "pluginspage":
            ret.embedAttrs[args[i]] = args[i+1];
            break;
          case "src":
          case "movie":	
            args[i+1] = AC_AddExtension(args[i+1], ext);
            ret.embedAttrs["src"] = args[i+1];
            ret.params[srcParamName] = args[i+1];
            break;
          case "onafterupdate":
          case "onbeforeupdate":
          case "onblur":
          case "oncellchange":
          case "onclick":
          case "ondblClick":
          case "ondrag":
          case "ondragend":
          case "ondragenter":
          case "ondragleave":
          case "ondragover":
          case "ondrop":
          case "onfinish":
          case "onfocus":
          case "onhelp":
          case "onmousedown":
          case "onmouseup":
          case "onmouseover":
          case "onmousemove":
          case "onmouseout":
          case "onkeypress":
          case "onkeydown":
          case "onkeyup":
          case "onload":
          case "onlosecapture":
          case "onpropertychange":
          case "onreadystatechange":
          case "onrowsdelete":
          case "onrowenter":
          case "onrowexit":
          case "onrowsinserted":
          case "onstart":
          case "onscroll":
          case "onbeforeeditfocus":
          case "onactivate":
          case "onbeforedeactivate":
          case "ondeactivate":
          case "type":
          case "codebase":
            ret.objAttrs[args[i]] = args[i+1];
            break;
          case "width":
          case "height":
          case "align":
          case "vspace": 
          case "hspace":
          case "class":
          case "title":
          case "accesskey":
          case "name":
          case "id":
          case "tabindex":
            ret.embedAttrs[args[i]] = ret.objAttrs[args[i]] = args[i+1];
            break;
          default:
            ret.embedAttrs[args[i]] = ret.params[args[i]] = args[i+1];
        }
      }
      ret.objAttrs["classid"] = classid;
      if (mimeType) ret.embedAttrs["type"] = mimeType;
      return ret;
    }
    Last edited by joeylockie; 09-02-2009 at 05:44 AM.

  • #4
    Regular Coder seco's Avatar
    Join Date
    Nov 2008
    Location
    Oregon
    Posts
    687
    Thanks
    6
    Thanked 79 Times in 77 Posts
    you didnt change the path at all. jsut put everything in the same folder.

  • #5
    New to the CF scene
    Join Date
    Sep 2009
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    ok got it working but now wouldnt you know it the video wont load, the screen stays on the loading splash screen but the video wont load

  • #6
    New to the CF scene
    Join Date
    Sep 2009
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    never mind found an easier way I will just redirect from the main page to the .swf file itself and not try to embed it on the page


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •