Originally I have video file wmv format. Using Adobe Video Encoder, I clicked File ->Add in the menu and add myvideo9.wmv,
( there is a problem with avi format for encoder, you need to use window live movie maker to change it to wmv format)
1) click Start Queue button, the video is transformed to flv file format: myvideo9.f4v.
2) Open Flash Professional CS5
3) File ->New->ActionScript 3.0, save as myvideo9.fla
4) Open the component library
Menu Window->Components or hit Ctrl-F7.
5) Drag the FLVPlayBack component from the components library to the stage.
6) right click middle of FLVPlayBack, click set source, find your flv file source: myvideo9.f4v
myvideo9.f4v should be the same directory as myvideo9.fla. In the property menu, remove the path for
myvideo9.f4v, or in future you can not find myvideo9.f4v in the web server due to path problem.
For loop/autoRewind:
name the video in property as myFLV, press F9 to input following actionscript:
import fl.video.*;
myFLV.addEventListener(VideoEvent.COMPLETE, rewind);
function rewind(eventObject:VideoEvent):void {
myFLV.autoRewind = true;
myFLV.play();
}
7) Control->Test Movie->in Flash Professional or (Ctrl enter)
you can watch swf file
8) File->Export->Export Movie, save as myvideo9.swf
9) upload myvideo9.swf, MinimaFlatCustomColorPlayBackSeekCounterVolMute.swf (skin for controller) and myvideo9.f4v in the same directory of web server
10) My result:
There is a bug during embedding, the control bar lost. The original swf can be found
HERE.
For embedding a flash file:
1) you can directly link to swf file, only for a small file and few connections.
2) progressive download video, you need two files: a FLV video file and a SWF file to play the video. It is better than directly embedded, but worse than streaming.
It is OK for a large file but not for too many connections.
3) Using flash media server for streaming. Best!
No comments:
Post a Comment