如何在FLASH中插入视频
推荐于2017-11-28
展开全部
如果你是说 制作FLASH 那么分两种情况 一种是 插入本地视频 这种简单 一种是调用外部视频 如果是单一的视频文件,直接使用组件里的MediaDisplay控件然后在控件检查器设置属性就可以了,但是如果涉及多个视频文件就必须用代码控制播放了,所以写在这里:
1、还是使用MediaDisplay或者MediaPlayBack,把它拖到场景中,然后在属性面板中起个名字,如MyVideo。
2、如果不想调入视频后就自动播放,则在组件检查器的属性里把“Automatically Play”前的勾去掉。
3、在图层的动作中输入以下代码
(1)载入外部视频文件:myVideo.setMedia("视频文件的路径","FLV");//其中myVideo为上面的MediaDisplay或者MediaPlayBack的名字(下同)
(2)播放视频:myVideo.play();
(3)停止播放:myVideo.stop();
(4)增加交互:myVideo.addCuePoint("name",10);//其中name为名字,可以随便写,10为视频播放到10秒时开始出发事件
然后写一个事件监听类:
var myListener = new Object();
myListener.cuePoint = function(eventObject){
trace("事件名称: " + eventObject.target.name);//此为测试用,显示上面的name,实际使用时直接在这里写入处理代码
}
myVideo.addEventListener("cuePoint", myListener);
1、还是使用MediaDisplay或者MediaPlayBack,把它拖到场景中,然后在属性面板中起个名字,如MyVideo。
2、如果不想调入视频后就自动播放,则在组件检查器的属性里把“Automatically Play”前的勾去掉。
3、在图层的动作中输入以下代码
(1)载入外部视频文件:myVideo.setMedia("视频文件的路径","FLV");//其中myVideo为上面的MediaDisplay或者MediaPlayBack的名字(下同)
(2)播放视频:myVideo.play();
(3)停止播放:myVideo.stop();
(4)增加交互:myVideo.addCuePoint("name",10);//其中name为名字,可以随便写,10为视频播放到10秒时开始出发事件
然后写一个事件监听类:
var myListener = new Object();
myListener.cuePoint = function(eventObject){
trace("事件名称: " + eventObject.target.name);//此为测试用,显示上面的name,实际使用时直接在这里写入处理代码
}
myVideo.addEventListener("cuePoint", myListener);
2022-12-06 · 百度认证:IT168官方账号,优质数码领域创作者
关注
展开全部
1、首先启动flash8,新建一个flash文件,所有的设置采用默认即可:
/iknow-pic.cdn.bcebos.com/78310a55b319ebc460165af68e26cffc1e171676"target="_blank"title="点击查看大图"class="ikqb_img_alink">/iknow-pic.cdn.bcebos.com/78310a55b319ebc460165af68e26cffc1e171676?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto"esrc="https://iknow-pic.cdn.bcebos.com/78310a55b319ebc460165af68e26cffc1e171676"/>
/iknow-pic.cdn.bcebos.com/42a98226cffc1e17563ea05e4690f603728de9d8"target="_blank"title="点击查看大图"class="ikqb_img_alink">/iknow-pic.cdn.bcebos.com/42a98226cffc1e17563ea05e4690f603728de9d8?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto"esrc="https://iknow-pic.cdn.bcebos.com/42a98226cffc1e17563ea05e4690f603728de9d8"/>
2、按照以下操作点击,执行文件-导入-导入到库命令,在打开的对话框中找到要导入的视频后,点击打开按钮,将视频导入到库中。
/iknow-pic.cdn.bcebos.com/64380cd7912397dde782b46b5582b2b7d1a287e1"target="_blank"title="点击查看大图"class="ikqb_img_alink">/iknow-pic.cdn.bcebos.com/64380cd7912397dde782b46b5582b2b7d1a287e1?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto"esrc="https://iknow-pic.cdn.bcebos.com/64380cd7912397dde782b46b5582b2b7d1a287e1"/>
3、进入导入视频对话框,在该对话框中选择第一项“在你的计算机上”,接着点击下一步,如下图所示:
/iknow-pic.cdn.bcebos.com/7acb0a46f21fbe094b81ef7b67600c338644ad85"target="_blank"title="点击查看大图"class="ikqb_img_alink">/iknow-pic.cdn.bcebos.com/7acb0a46f21fbe094b81ef7b67600c338644ad85?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto"esrc="https://iknow-pic.cdn.bcebos.com/7acb0a46f21fbe094b81ef7b67600c338644ad85"/>
4、进入导入视频对话框,在该对话框中选择第一项“在你的计算机上”,接着点击下一步。
/iknow-pic.cdn.bcebos.com/96dda144ad345982faeecafd00f431adcbef847c"target="_blank"title="点击查看大图"class="ikqb_img_alink">/iknow-pic.cdn.bcebos.com/96dda144ad345982faeecafd00f431adcbef847c?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto"esrc="https://iknow-pic.cdn.bcebos.com/96dda144ad345982faeecafd00f431adcbef847c"/>
5、嵌入选项卡中,设置符合类型为嵌入的视频,音频轨道选择集成,并勾选嵌入整个视频。如下图:
/iknow-pic.cdn.bcebos.com/e61190ef76c6a7efa8558749f1faaf51f3de6669"target="_blank"title="点击查看大图"class="ikqb_img_alink">/iknow-pic.cdn.bcebos.com/e61190ef76c6a7efa8558749f1faaf51f3de6669?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto"esrc="https://iknow-pic.cdn.bcebos.com/e61190ef76c6a7efa8558749f1faaf51f3de6669"/>
6、在编码选项卡,选择flash8-中等品质,并点击下一步,直至导入完成。
/iknow-pic.cdn.bcebos.com/9213b07eca8065384eb28b7c9bdda144ad348200"target="_blank"title="点击查看大图"class="ikqb_img_alink">/iknow-pic.cdn.bcebos.com/9213b07eca8065384eb28b7c9bdda144ad348200?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto"esrc="https://iknow-pic.cdn.bcebos.com/9213b07eca8065384eb28b7c9bdda144ad348200"/>
7、接着点击完成按钮,系统会显示flash视频编码进度,等待进度完成视频就导入进去了。接着将该文件保存就可以了。
/iknow-pic.cdn.bcebos.com/95eef01f3a292df59146837ab0315c6035a873d3"target="_blank"title="点击查看大图"class="ikqb_img_alink">/iknow-pic.cdn.bcebos.com/95eef01f3a292df59146837ab0315c6035a873d3?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto"esrc="https://iknow-pic.cdn.bcebos.com/95eef01f3a292df59146837ab0315c6035a873d3"/>
8、完成。
/iknow-pic.cdn.bcebos.com/78310a55b319ebc460165af68e26cffc1e171676"target="_blank"title="点击查看大图"class="ikqb_img_alink">/iknow-pic.cdn.bcebos.com/78310a55b319ebc460165af68e26cffc1e171676?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto"esrc="https://iknow-pic.cdn.bcebos.com/78310a55b319ebc460165af68e26cffc1e171676"/>
/iknow-pic.cdn.bcebos.com/42a98226cffc1e17563ea05e4690f603728de9d8"target="_blank"title="点击查看大图"class="ikqb_img_alink">/iknow-pic.cdn.bcebos.com/42a98226cffc1e17563ea05e4690f603728de9d8?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto"esrc="https://iknow-pic.cdn.bcebos.com/42a98226cffc1e17563ea05e4690f603728de9d8"/>
2、按照以下操作点击,执行文件-导入-导入到库命令,在打开的对话框中找到要导入的视频后,点击打开按钮,将视频导入到库中。
/iknow-pic.cdn.bcebos.com/64380cd7912397dde782b46b5582b2b7d1a287e1"target="_blank"title="点击查看大图"class="ikqb_img_alink">/iknow-pic.cdn.bcebos.com/64380cd7912397dde782b46b5582b2b7d1a287e1?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto"esrc="https://iknow-pic.cdn.bcebos.com/64380cd7912397dde782b46b5582b2b7d1a287e1"/>
3、进入导入视频对话框,在该对话框中选择第一项“在你的计算机上”,接着点击下一步,如下图所示:
/iknow-pic.cdn.bcebos.com/7acb0a46f21fbe094b81ef7b67600c338644ad85"target="_blank"title="点击查看大图"class="ikqb_img_alink">/iknow-pic.cdn.bcebos.com/7acb0a46f21fbe094b81ef7b67600c338644ad85?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto"esrc="https://iknow-pic.cdn.bcebos.com/7acb0a46f21fbe094b81ef7b67600c338644ad85"/>
4、进入导入视频对话框,在该对话框中选择第一项“在你的计算机上”,接着点击下一步。
/iknow-pic.cdn.bcebos.com/96dda144ad345982faeecafd00f431adcbef847c"target="_blank"title="点击查看大图"class="ikqb_img_alink">/iknow-pic.cdn.bcebos.com/96dda144ad345982faeecafd00f431adcbef847c?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto"esrc="https://iknow-pic.cdn.bcebos.com/96dda144ad345982faeecafd00f431adcbef847c"/>
5、嵌入选项卡中,设置符合类型为嵌入的视频,音频轨道选择集成,并勾选嵌入整个视频。如下图:
/iknow-pic.cdn.bcebos.com/e61190ef76c6a7efa8558749f1faaf51f3de6669"target="_blank"title="点击查看大图"class="ikqb_img_alink">/iknow-pic.cdn.bcebos.com/e61190ef76c6a7efa8558749f1faaf51f3de6669?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto"esrc="https://iknow-pic.cdn.bcebos.com/e61190ef76c6a7efa8558749f1faaf51f3de6669"/>
6、在编码选项卡,选择flash8-中等品质,并点击下一步,直至导入完成。
/iknow-pic.cdn.bcebos.com/9213b07eca8065384eb28b7c9bdda144ad348200"target="_blank"title="点击查看大图"class="ikqb_img_alink">/iknow-pic.cdn.bcebos.com/9213b07eca8065384eb28b7c9bdda144ad348200?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto"esrc="https://iknow-pic.cdn.bcebos.com/9213b07eca8065384eb28b7c9bdda144ad348200"/>
7、接着点击完成按钮,系统会显示flash视频编码进度,等待进度完成视频就导入进去了。接着将该文件保存就可以了。
/iknow-pic.cdn.bcebos.com/95eef01f3a292df59146837ab0315c6035a873d3"target="_blank"title="点击查看大图"class="ikqb_img_alink">/iknow-pic.cdn.bcebos.com/95eef01f3a292df59146837ab0315c6035a873d3?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto"esrc="https://iknow-pic.cdn.bcebos.com/95eef01f3a292df59146837ab0315c6035a873d3"/>
8、完成。
-
官方服务
- 官方网站
- 官方网站
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
2013-07-26
展开全部
是QQ空间里面吗-
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询
广告 您可能关注的内容 |