`

Flash视频 Step by Step

阅读更多
  • 编写播放器
    • 固定视频的宽度和高度(400 X 300)
    • 动态传入影片名字
    • 添加进度控制条
    • 添加关闭视窗的按钮
      my_FLVPlybk.contentPath = _root.moviepath;
      
      onClipEvent (construct)
      {
          aspectRatio = false;
          autoPlay = true;
          autoSize = false;
          contentPath = "\\\"\\\"";
          controllerPolicy = "on";
          controlPlacement = "center";
          fps = 50;
          mediaType = "FLV";
          totalTime = 0;
          enabled = true;
          visible = true;
          minHeight = 300;
          minWidth = 400;
      }
  • 生成播放代码
    • 可配置视频的宽度和高度(来适应播放器的每次修改)
    • 可指定播放器的进度控制条
    • 识别播放flv或swf
    • 指定播放路径(相对路径)
           } 
      	public String getHTML(){
          	 String flashContent = null;
          	 if(moviePath == null || moviePath.trim().length() <= 4) {
          		 return BLANK_CONTENT;
          	 }
          	 
          	 if(moviePath.toLowerCase().indexOf(SWF_FORMAT) == -1 && moviePath.toLowerCase().indexOf(FLV_FORMAT) == -1) {
          		 return BLANK_CONTENT;
          	 }
          	 
          	 flashContent = "<object classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 codebase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0   scale=exactfit width=%width% height=%height%>";
          	 flashContent += "<param name=movie value=%flashplayer%?param1=%moviepath%&param2=%pluginspath%>";
          	 flashContent += "<param name=wmode wmode=transparent>";
          	 flashContent += "<param name=quality value=high>";
          	 flashContent += "<embed src=%flashplayer%?param1=%moviepath%&param2=%pluginspath% allowscriptaccess=sameDomain wmode=transparent quality=high pluginspage=http://www.macromedia.com/go/getflashplayer type=application/x-shockwave-flash  scale=exactfit  width=%width% height=%height%></embed>";
          	 flashContent += "</object>";
               
          	 flashContent =  flashContent.replaceAll("param1", FLASHVARS_MOVIE_PATH_NAME); //"moviepath";
          	 flashContent =  flashContent.replaceAll("param2", FLASHVARS_PLUGINS_PATH_NAME); //"toolbuttonsplugpath";
          	 
          	 flashContent = flashContent.replaceAll("%width%", this.extraWidth.trim()); //影片宽度
          	 flashContent = flashContent.replaceAll("%height%", this.extraHeight.trim());//影片高度
          	 flashContent = flashContent.replaceAll("%moviepath%", this.moviePath.trim());//播放路径
          	 flashContent = flashContent.replaceAll("%pluginspath%", this.pluginsPath.trim());  //插件即进度控制条
          	 
          	 String flashPlayer = this.moviePath.toLowerCase().indexOf(FLV_FORMAT) != -1 ? FLASH_FLV_PLAYER : FLASH_SWF_PLAYER;
          	 flashContent = flashContent.replaceAll("%flashplayer%", flashPlayer);
          	 
          	 return flashContent;
  • 指定窗口播放
    • 窗口屏幕剧中
    • 用户可关闭窗口
      <span> <img style="vertical-align:middle;" src="pages/images/play.gif" onclick="show_presentation('<%= new FlashManager(AppUtil.getMovieClipPath() + movieInfo.getVideopath()).getHTML()%>');return false;" height="26"/>
      							         			<a style="vertical-align:middle;" title="video" onclick="show_presentation('<%= new FlashManager(AppUtil.getMovieClipPath() + movieInfo.getVideopath()).getHTML()%>');return false;" href="#"><bean:message key="rentalMovieInfoTrailer"/></a> </span>
       
  • 视频转化
    • 需要将可供选择的任意视频素材转化为400 * 300的flv.
      • Windows平台,手功转化(Total Video Converter)
      • Linux平台: ffmpeg
    • 传入指定的目录
  • 大小: 61.3 KB
分享到:
评论

相关推荐

    将NiosII程序下载到Flash的方法(Step_by_step)

    将NiosII程序下载到Flash的方法(Step_by_step)

    NIOSII step by step(一步一步学习NIOS II)

    来自网络的NIOSII教程,共分为9步,每一步教会你一个东西,内容如下 step1: NIOS II 用户指令;step2: 理解HAL;step3: NIOS II 中的 DMA;step4: PIO介绍;...step9: 定制目标板和FLASH存储器实验。

    5本Flash教程下载.zip

    5本Flash教材下载.zip 《网猴》FLASH教学 Flash Step By Step FLASH基础教程 FLASH入门 Flash网上教材

    五本Flash教程合集下载.zip

    五本Flash教程合集下载.zip 《网猴》FLASH教学 Flash Step By Step FLASH基础教程 FLASH入门 Flash网上教材

    NIOS_2中FLASH的使用方法研究

    NIOS中FLASH的使用,详细介绍了在FPGA NIOS系统中如何将程序下载到FLASH芯片中的方法,STEP BY STEP

    Creating Flash Widgets with Flash CS4 and ActionScript 3.0

    A step-by-step example demonstrates how to design and develop your own Flash widgets and integrate them with XML. In addition, publishing, promoting, and capitalizing on your Flash widgets is ...

    Flash and PHP Bible 宝典

    This in-depth Bible provides the step-by-step instructions you need to quickly create RIAs in Flash using cost-effective, open-source PHP programming tools. You'll learn how PHP works, when you ...

    Flash and PHP

    This in-depth Bible provides the step-by-step instructions you need to quickly create RIAs in Flash using cost-effective, open-source PHP programming tools. You’ll learn how PHP works, when you ...

    XILINX SPI FLASH Bootloader的制作详细教程

    本文档经过本人亲自测试,step by step 的介绍了如何在SDK中生成Bootloader,然后再如何改正其中的代码来用于SPI FLASH 的上电启动加载,另本文档中带有相关代码,只要按照文档中一步步操作,绝对正确

    The Essential Guide To Open Source Flash Development

    Step-by-step walk-throughs guide you through development with the most popular open source Flash tools. Written by the project leads and open source Flash aficionados. The Essential Guide to Open ...

    ZORAN方案DVD的读写软件

    Step3: This step enables you to choose a location where QFP will be installed on your computer. Then Click NEXT to continue. Added new FLASH into a existent family such as SST Step1: Open C:\qfp\...

    英文原版-Pushing Pixels Secret Weapons for the Modern Flash Animator 1st Edition

    Go above and beyond those stop-gaps and step-by-steps with Pushing Pixels, the real-world guide to developing dynamic and fun content from conception to deployment. Whether you are animating for a ...

    Wiley.Adobe Flash Builder4 and Flex4Bible.2010

    The book's tutorials and explanations walk you step-by-step through Flash Builder's new, faster tools; the new framework for generating code; how to connect to popular application servers; upgrading ...

    Getting Started with Flex 4

    This hands-on guide helps you dive into the Adobe Flash Platform: through a series of quick step-by-step tutorials, you'll learn the process of building, debugging, and deploying a complete Rich ...

    Linux Bible 9th

    Written by a Red Hat expert,this book provides the clear explanations and step-by-step instructions that demystify Linux and bring the new features seamlessly into your workflow. This useful guide ...

    Flex Solutions Essential Techniques For Flex 2 And 3

    In Flex 2 Solutions, renowned Flash and Flex expert Marco Casario assumes you know the basics, and dives straight into practical code examples that you could build up yourselves via step by step ...

    fluent 进行气泡模拟的动画及教程-1gambit建模教程

    fluent进行气泡模拟的step by step教程。 包含pdf文档和flash动画(屏幕记录)

    Visualise this

    Offers step-by-step tutorials and practical design tips for creating statistical graphics, geographical maps, and information design to find meaning in the numbers Details tools that can be used to ...

    Adobe Flash 11 Stage3D (Molehill) Game Programming Beginner's Guide

    In this chapter, we take the first step by setting up our tools and programming the initializations for our game. The result is a demo that gets Stage3D to animate a simple 3D mesh. Chapter 4, Basic ...

Global site tag (gtag.js) - Google Analytics