
Flash 视频组件给我们带来开发的极大便利!FLV格式的新式流媒体应用于网页,使网页内容更加丰富!相信玩过”Flv”的朋友应该深有体会。下面是Flv文件应用案例 http://www.koasis.cn http://www.koasis.cn/ad.asp 首页上的视频动画就是应用flv格式。
1.拖动MediaDisplay 组件到舞台!
2.打开组件检查器,选择”Flv”格式的媒体,在url处输入相同目录下的”.flv”文件。
3. CTRL+ENTER预览。 这一步。Flv文件载入播放就成功了。把flash文件和flv文件都拷贝到同一网站目录下,在页面上插入flash文件,就可以实现web数据流的视频播放了。 但是我们会发现:”.flv”文件在 flash里面只能自动播放一次。如果让视频文件在页面上循环播放,那效果会更好。
怎么样才能实现这一点呢? 我们可以这样子做:把MediaDisplay实例命名为”myMedia” 在时间轴第一针加如下代码:
var myListener = new Object();
myListener.complete = function(eventObject)
{ myMedia.play(); };
myMedia.addEventListener(“complete”, myListener); 这样子flash就可以循环播放了!
We use cookies to improve your experience on our site. By using our site, you consent to cookies.
Manage your cookie preferences below:
Essential cookies enable basic functions and are necessary for the proper function of the website.
These cookies are needed for adding comments on this website.
Statistics cookies collect information anonymously. This information helps us understand how visitors use our website.
Google Analytics is a powerful tool that tracks and analyzes website traffic for informed marketing decisions.
Service URL: policies.google.com
You can find more information in our Cookie Policy and Cookie Policy.