Setting size of flash video through frame count?

2019-08-28 00:12发布

问题:

Is it possible to set the frame count of a video manually in Flash BUilder 4? How is the frame length of a video determined in Flash Builder 4? I need to do this in order to trick video format converters into thinking that my video is actually x frames long instead of just 1 (my swf video is controlled completely through as3 code and thus resided on just the 1st frame). This way, the video format converters will be able to automatically (and correctly) convert my videos to another format (flv is desired). Another solution to this would be a converter that actually automatically converts based on video length rather than frame count, but I have already thoroughly searched for one and one doesn't seem to exist.

回答1:

I'm not an expert on video conversion but I'd assume the converter will simply make a one-to-one match between the frames of the SWF and the frames of the video. Adding more frames to your SWF will only result in a video with empty frames after frame 1.

The best solution I can think of is to export the frames yourself. You can draw any MovieClip in flash to a BitmapData object frame-by-frame, so make a new app that loads your SWF and draws each frame before saving it as a PNG/JPG to the local disk. Your MovieClip can then dispatch an event to signal the end of the video and you have each frame saved as a separate file. After that you can use a free animation package to take all of the frame files and create a video.

It sounds like a lot of hard work but I doubt you'll find any software that can do this automatically.