如何加载一个MOV文件导入到Flash 9 [英] How do I load a MOV file into Flash 9

查看:277
本文介绍了如何加载一个MOV文件导入到Flash 9的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有加载MOV文件导入到Flash 9.问题,当我谷歌这个问题,我得到了很多人说一定要能做到这一点,但没有人提供工作的样品code。

I am having issues loading an MOV file into Flash 9. When I google the question, I get alot of people say sure you can do it, but nobody provides working sample code.

推荐答案

以下是从的 http://en.wikipedia.org/wiki/Adobe_Flash#Flash_Video

Flash视频

Flash视频(FLV的文件)是一种容器格式,这意味着它本身不是一种视频格式,但可包含其它格式。 Flash中的视频连接codeD的H.263,并开始使用Flash Player 8,也可通过连接codeD的VP6。音频是MP3。使用VP6是因为Flash Player 8和Flash Player 9。[16]

Flash Video (.flv files) is a container format, meaning that it is not a video format in itself, but can contain other formats. The video in Flash is encoded in H.263, and starting with Flash player 8, it may alternatively be encoded in VP6. The audio is in MP3. The use of VP6 is common in many companies, because of the large adoption rates of Flash Player 8 and Flash Player 9.[16]

在2007年8月20日,Adobe公司在其博客中表示,随着Flash更新3播放器9,Flash视频也支持MPEG-4国际标准公布。[31]具体而言,Flash Player将有视频COM $ P支持在H.264 $ pssed(MPEG-4第10部分),音频COM pressed使用AAC(MPEG-4第3部分)中,MP4,M4V,M4A,3GP和MOV多媒体封装格式(MPEG-4第14部分) ,3GPP定时文本规范(MPEG-4部分17),其是一个标准化的字幕格式和为'ILST'原子上于ID3等效iTunes用来存储元数据解析部分支持。 Adobe还宣布,他们将逐渐远离了专有的FLV格式为标准MP4格式H.264流时,由于功能的限制与FLV结构。 Flash播放器的最终版本支持MPEG-4已成为2007年秋季可用[32]

On August 20, 2007, Adobe announced on its blog that with Update 3 of Flash Player 9, Flash Video will also support the MPEG-4 international standard.[31] Specifically, Flash Player will have support for video compressed in H.264 (MPEG-4 Part 10), audio compressed using AAC (MPEG-4 Part 3), the MP4, M4V, M4A, 3GP and MOV multimedia container formats (MPEG-4 Part 14), 3GPP Timed Text specification (MPEG-4 Part 17) which is a standardized subtitle format and partial parsing support for the 'ilst' atom which is the ID3 equivalent iTunes uses to store metadata. Adobe also announced that they will be gradually moving away from the proprietary FLV format to the standard MP4 format owing to functional limits with the FLV structure when streaming H.264. The final release of the Flash Player supporting MPEG-4 had become available in Fall 2007.[32]

package com.yourdomain.packageName
{
    import flash.display.Sprite;
    import flash.media.Video;
    import flash.net.NetConnection;
    import flash.net.NetStream;

    public class DocumentClass extends Sprite
    {
        private var _video:Video;
        private var _nc:NetConnection;
        private var _ns:NetStream;

        public function DocumentClass():void
        {
            _video = new Video(800, 600);
            addChild(_video);

            _nc = new NetConnection();
            _nc.connect(null);

            _ns = new NetStream(nc);
            _video.attachNetStream(_ns);
           _ns.play("path/to/file.extension");
        }
    }
}

- 这是一个非常基本的实现,并且不包括处理元数据的

-This is a very basic implementation and does not include handling of meta-data.

首先,我们实例化一个视频对象是800宽600高,将其添加到显示列表中。

First, we instantiate a Video object that is 800 wide and 600 tall and add it to the display list.

二,我们实例化一个NetConnection对象,并调用它的连接方法传递null作为参数。 (这是必需的)

Second, we instantiate a NetConnection object and call it's connect method passing null as a parameter. (This is required)

第三,我们创建一个NetStream对象,传递previously作出NetConnection对象给它的构造函数。

Third, we create a NetStream object, passing the previously made NetConnection object to it's constructor.

第四,我们设置了视频对象_ns的attachNetStream,在我们的NetStream实例。

Fourth, we set attachNetStream of the Video object to _ns, the NetStream we instantiated.

最后,调用NetStream对象,_ns的播放方法,并把它传递一个字符串到我们的媒体所在。 (该FLV / F4V / MOV /等。)

Finally, we call the play method of the NetStream object, _ns, and pass it a string to where our media is located. (The FLV/F4V/MOV/etc.)

-Hope这会有所帮助。 布赖恩·霍奇
blog.hodgedev.com

-Hope this helps. Brian Hodge
blog.hodgedev.com

这篇关于如何加载一个MOV文件导入到Flash 9的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆