Search code examples
actionscript-3flashvideoairmovieclip

Export a movie clip to a video file that can be uploaded to Facebook and Youtube


I have a Adobe Air program that simulates a drum. When user hit the keyboard, it will translate to a drum hit and animation will be played on screen. This program is intented for Windows platform, not mobiles.

Now I want to be able to record the whole song including the animation, and export it to a video file that can be uploaded to Facebook or Youtube. I have a two ideas in my mind right now:

1.) Record the screen real time when the user is playing the drum.

2.) Save all the keystroke in file, say, XML file. After finished playing, I will read the XML and render the movie according to the keystroke time, by creating a MovieClip programmatically and insert the animation needed.

However, I do not see any API available that allows me to generate a video file based on my MovieClip or animations..

What will be the best option to do it, or is it even possible to generate a video file in run-time? I would very much like to provide details about what I have tried, but sorry I could not find a single topic on this and I have no where to start.


Solution

  • First that is the code to export it into an flv file

    http://www.zeropointnine.com/blog/simpleflvwriteras-as3-class-to-create-flvs/

    And then that is the api to upload the video on facebook http://developers.facebook.com/docs/reference/api/video/