New Community Forums are coming. Watch this space for news.
Subscribe: RSS
  • I’ve found a nice feature to insert flash-video in the new MacromediaDreamweaver 8. It uses universal 9 kb file FLVPlayer_Progressive.swf as player and 6 kb file Clear_Skin_2.swf as skin (there are another skins too). Html-code includes all settings for playing video (see the code below).

    So, it will be fine to make FlashVideo snippet to insert video on MODx pages (I’m not snippets guru).



    NOTE! Code with settings marked with red color. Flash-video-file name marked with blue (without .flv).

    <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="300" height="240" id="FLVPlayer">
      <param name="movie" value="FLVPlayer_Progressive.swf" />
      <param name="salign" value="lt" />
      <param name="quality" value="high" />
      <param name="scale" value="noscale" />
      <param name="FlashVars" value="&MM_ComponentVersion=1&skinName=Clear_Skin_2&streamName=lens&autoPlay=false&autoRewind=false" />
      <embed src="FLVPlayer_Progressive.swf" flashvars="&MM_ComponentVersion=1&skinName=Clear_Skin_2&streamName=lens&autoPlay=false&autoRewind=false" quality="high" scale="noscale" width="300" height="240" name="FLVPlayer" salign="LT" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
    </object>
    • Here is a snippet as asked!

      FYI This has NOT BEEN TESTED!!!!!!!

      //FlashVideo by Mark
      //Use like so
      // [[FlashVideo?file=filename]]
      
      //SETTINGS
      $width=300;
      $height=240;
      $autoPlay="false";
      $autoRewind="false";
      
      //END SETTINGS
      $output = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="'.$width.'" height="'.height.'" id="FLVPlayer">
        <param name="movie" value="FLVPlayer_Progressive.swf" />
        <param name="salign" value="lt" />
        <param name="quality" value="high" />
        <param name="scale" value="noscale" />
        <param name="FlashVars" value="&MM_ComponentVersion=1&skinName=Clear_Skin_2&streamName='.$file.'&autoPlay='.$autoPlay.'&autoRewind='.$autoRewind.'" />
        <embed src="FLVPlayer_Progressive.swf" flashvars="&MM_ComponentVersion=1&skinName=Clear_Skin_2&streamName='.$file.'&autoPlay='.$autoPlay.'&autoRewind='.$autoRewind.'" quality="high" scale="noscale" width="'.$width.'" height="'.$height.'" name="FLVPlayer" salign="LT" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
      </object>';
      
      return $output;
      


      Hope this works!
        [html]<div><div style="float:left;"><a href="http://modxcms.com/Ditto-487.html" target="_blank"><img src="http://modxcms.com/assets/images/ditto.gif" alt="" border="0"></a></div><div style="float:left; padding: 0 5px 0 5px; border-left: 2px solid #ddd; margin-left: 5px;"><a style="display:block;"href="http://modxcms.com/ditto_docs.html">Documentation</a><a style="display:block;" href="http://modxcms.com/ditto_trac.html">TRAC (Bugtracker)</a><a style="display:block;"href="http://modxcms.com/forums/index.php/board,180.0.html">Forum</a><a style="display:block;"href="http://modxcms.com/forums/index.php/topic,13348.0.html">How to get help</a></div><div style="float:left; padding: 0 5px 0 5px; border-left: 2px solid #ddd;"><a style="display:block;"href="http://modxcms.com/ditto_wiki.html">User Wiki</a><a style="display:block;" href="http://modxcms.com/ditto_credits.html">Credits</a><a style="display:block;"href="http://modxcms.com/ditto_svn.html">SVN Server</a><a style="display:block;"href="http://modxcms.com/ditto">Ditto HQ</a></div><div style="float:left; padding: 0 5px 0 5px; border-left: 2px solid #ddd;"><a style="display:block;"href="http://modxcms.com/ditto_stable_download.html"><strong><span style="color:#CC0000;">Stable Download</span></strong></a><a style="display:block;"href="http://modxcms.com/ditto_download.html"><strong><span style="color:#CC0000;">Development Download</span></strong></a></div><div style="clear: both;"></div></div>[/html]
      • Quote from: Mark at Oct 03, 2005, 02:29 PM

        Here is a snippet as asked!
        This has NOT BEEN TESTED!!!!!!!
        Hope this works!

        Thank you, Mark!
        I have to add missed ’$’ in ’.height.’ and the snippet now works!

        I also have added new ’$videoPath’ variable in settings.

        I’ve tried to make ’$playerPath’ in order to store flash-video-player files in the separate ’assets/flash/videoplayer’ folder, but it seems flash-video-player must be in the same folder as html-page with inserted video (FLVPlayer.swf can’t read path to skin.swf). So, you have to put FLVPlayer_Progressive.swf and Clear_Skin_2.swf in the MODx root folder.

        Here is the edited working code:
        //FlashVideo by Mark & Bugaev
        //Usage: [[FlashVideo?file=filename]]
        //You can store .flv files in the separate folder like 'assets/flash/video' (to specify the folder use $videoPath)
        //You have to put flash-video-player files (FLVPlayer_Progressive.swf and Clear_Skin_2.swf) in the MODx root folder
        
        //SETTINGS
        $width=300;
        $height=240;
        $autoPlay="false";
        $autoRewind="true";
        $videoPath="assets/flash/video";
        
        //END SETTINGS
        $output = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="'.$width.'" height="'.$height.'" id="FLVPlayer">
          <param name="movie" value="FLVPlayer_Progressive.swf" />
          <param name="salign" value="lt" />
          <param name="quality" value="high" />
          <param name="scale" value="noscale" />
          <param name="FlashVars" value="&MM_ComponentVersion=1&skinName=Clear_Skin_2&streamName='.$videoPath.'/'.$file.'&autoPlay='.$autoPlay.'&autoRewind='.$autoRewind.'" />
          <embed src="FLVPlayer_Progressive.swf" flashvars="&MM_ComponentVersion=1&skinName=Clear_Skin_2&streamName='.$videoPath.'/'.$file.'&autoPlay='.$autoPlay.'&autoRewind='.$autoRewind.'" quality="high" scale="noscale" width="'.$width.'" height="'.$height.'" name="FLVPlayer" salign="LT" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
        </object>';
        
        return $output;
        
        


        Sample .flv files you can find here http://www.videospark.com/
        • Found a couple of links that might be helpful; but then I’m not a flash programmer so what do I know wink I’m just eternally curious, and it seems curious indeed that it would be so limited.

          http://www.macromedia.com/devnet/flash/articles/flv_tutorial_03.html
          http://www.macromedia.com/cfusion/knowledgebase/index.cfm?id=tn_19571

          I saw this statement on the page below, and from that I would presume that you can, in fact, have the skins and the viewers in a different folder than the .html file.

          http://www.macromedia.com/devnet/flash/articles/flv_tutorial_pt2_05.html

          Because you put the skin in the same folder as the default skin you chose earlier, you don’t need to modify the path at all.

          but I didn’t find anything on actually modifying the path.
            Studying MODX in the desert - http://sottwell.com
            Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
            Join the Slack Community - http://modx.org
          • Has anyone got this working?

            The clearskin.rar appears to be empty!

            Thanks

            • This snippet works great on my site but I got my clearskin files from Dreamweaver 8 (I didn’t download them).
                [html]<div><div style="float:left;"><a href="http://modxcms.com/Ditto-487.html" target="_blank"><img src="http://modxcms.com/assets/images/ditto.gif" alt="" border="0"></a></div><div style="float:left; padding: 0 5px 0 5px; border-left: 2px solid #ddd; margin-left: 5px;"><a style="display:block;"href="http://modxcms.com/ditto_docs.html">Documentation</a><a style="display:block;" href="http://modxcms.com/ditto_trac.html">TRAC (Bugtracker)</a><a style="display:block;"href="http://modxcms.com/forums/index.php/board,180.0.html">Forum</a><a style="display:block;"href="http://modxcms.com/forums/index.php/topic,13348.0.html">How to get help</a></div><div style="float:left; padding: 0 5px 0 5px; border-left: 2px solid #ddd;"><a style="display:block;"href="http://modxcms.com/ditto_wiki.html">User Wiki</a><a style="display:block;" href="http://modxcms.com/ditto_credits.html">Credits</a><a style="display:block;"href="http://modxcms.com/ditto_svn.html">SVN Server</a><a style="display:block;"href="http://modxcms.com/ditto">Ditto HQ</a></div><div style="float:left; padding: 0 5px 0 5px; border-left: 2px solid #ddd;"><a style="display:block;"href="http://modxcms.com/ditto_stable_download.html"><strong><span style="color:#CC0000;">Stable Download</span></strong></a><a style="display:block;"href="http://modxcms.com/ditto_download.html"><strong><span style="color:#CC0000;">Development Download</span></strong></a></div><div style="clear: both;"></div></div>[/html]
              • //FlashVideo by Mark & Bugaev edit a little bit by Alfabeta_Tr
                //Usage: [[FlashVideo?file=filename]]
                //You can store .flv files in the separate folder like 'assets/flash/video' (to specify the folder use $videoPath)
                //You have to put flash-video-player files (FLVPlayer_Progressive.swf and Clear_Skin_2.swf) in the MODx root folder
                // usage [[FlashVideo?file=http://www.videospark.com/flash_4.swf&widht=500&height=300]]
                
                //SETTINGS
                
                $autoPlay="false";
                $autoRewind="true";
                $videoPath="assets/flash/video";
                
                //END SETTINGS
                $output = '<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
                 codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0,0"
                 ID=flash_4 WIDTH='. $widht .' HEIGHT=' . $height . '>
                 <PARAM NAME=movie VALUE="'. $file . '"> 
                <PARAM NAME=quality VALUE=high> 
                <PARAM NAME=wmode VALUE=transparent> 
                <PARAM NAME=bgcolor VALUE=#FFFFFF> 
                <EMBED src="'. $file . '" quality=high wmode=transparent bgcolor=#FFFFFF  WIDTH='. $widht .' HEIGHT=' . $height . ' TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">
                </EMBED>
                </OBJECT>';
                
                return $output;
                • Does anyone know for sure the legality of sharing the .swf files here. I am not a lawyer, but I would assume that the content included with your purchaced copy of dreamweaver 8 is intended for you to use in as many projects as you want, but probably not intended for sharing with folks who do not own dreamweaver 8. Honestly, I would love to use the swf files, but I think you should probably remove the link because this website (and the devs here) will end up taking the heat if macromedia gets offended by us passing it around.

                  check this out as an alternative to the propriatary macromedia swf.

                  http://www.jeroenwijering.com/?item=Flash_Video_Player

                  it is released under the creative commons liscense.

                  -sD-
                    Husband, Father, Brother, Son, Programmer, Atheist, Nurse, Friend, Lover, Fighter.
                    All of the above... in no specific order.


                    I send pointless little messages
                  • I have to agree with Scotty here, but I would like to point out that you could just dl the files from a site that is using it anyways b/c those flash files are not encrypted. Still, I think we should remove those files.
                      [html]<div><div style="float:left;"><a href="http://modxcms.com/Ditto-487.html" target="_blank"><img src="http://modxcms.com/assets/images/ditto.gif" alt="" border="0"></a></div><div style="float:left; padding: 0 5px 0 5px; border-left: 2px solid #ddd; margin-left: 5px;"><a style="display:block;"href="http://modxcms.com/ditto_docs.html">Documentation</a><a style="display:block;" href="http://modxcms.com/ditto_trac.html">TRAC (Bugtracker)</a><a style="display:block;"href="http://modxcms.com/forums/index.php/board,180.0.html">Forum</a><a style="display:block;"href="http://modxcms.com/forums/index.php/topic,13348.0.html">How to get help</a></div><div style="float:left; padding: 0 5px 0 5px; border-left: 2px solid #ddd;"><a style="display:block;"href="http://modxcms.com/ditto_wiki.html">User Wiki</a><a style="display:block;" href="http://modxcms.com/ditto_credits.html">Credits</a><a style="display:block;"href="http://modxcms.com/ditto_svn.html">SVN Server</a><a style="display:block;"href="http://modxcms.com/ditto">Ditto HQ</a></div><div style="float:left; padding: 0 5px 0 5px; border-left: 2px solid #ddd;"><a style="display:block;"href="http://modxcms.com/ditto_stable_download.html"><strong><span style="color:#CC0000;">Stable Download</span></strong></a><a style="display:block;"href="http://modxcms.com/ditto_download.html"><strong><span style="color:#CC0000;">Development Download</span></strong></a></div><div style="clear: both;"></div></div>[/html]
                    • I assumed that was why the skin .rar file was empty!

                      I used the "farm" skin from the Macromedia tutorial site. Since there is no copyright or licensing information associated with this I have made the assumption that it would be OK to use this for development purposes. For the live site I am probably going to use this commercial one, unless I come across anything better.

                      I eventually got this snippet to work. After spending several hours puzzling over it, I finally noticed that my FTP program had changed all the filenames to lower case during transfer huh.