Actionscript 3 Convert a MovieClip to Video file - actionscript-3

I have a movieclip that include video and animated movieclip object which user load the image inside it. I need to convert the movieclip as video file at runtime. Because I want to open final video on mobile device also.
My first aim is convert the movieclip as a video file. Is there any way to convert it or an alternative way to open swf on mobile devices?
I searched on the internet but I can not find any solution about that.

Related

Single-swf preloader wrapper in Flash

I have a .swf that I'd like to create a preloader for. In the end, I want a single file which combines both the preloader and the content .swf.
Every tutorial I can find on Flash preloaders offers one of two options:
Using a URLRequest in the preloader wrapper to load an external content .swf. This will not work because I do not want two .swfs.
A "single-swf" solution like this one which works for assets which you have created in the Flash IDE. I assumed I would easily be able to go this route, but I'm having trouble. I cannot use the Flash IDE to import my content .swf. I can use an embed tag like so:
[Embed(source="content.swf")]
private var MyContent:Class;
But it seems like this embedded content is exported on the first frame, so my preloader only appears after the content .swf is loaded. I'm guessing it's something along these lines. Any thoughts?
But it seems like this embedded content is exported on the first frame
You are absolutely correct, all Ebmed do embedding in the first frame by default but mxmlc provides solution by creating two frames swf with preloader in the first frame via the metatag:
[Frame(factoryClass="Preloader")]
You can find step by step guide here http://www.bit-101.com/blog/?p=946.

AS3 Starling: Trying to add Video

I'm a total AS3 / Starling newbie, but I'm trying to (programmatically) add an FLV video file to the 'background' of what is essentially a splash screen.
Example code I have found online basically distills to...
var v:Video = new Video(100, 100);
this.addChild(v);
This works in the top-level class that extends flash.display.Sprite, however my Game class (that extends starling.display.Spite) fails, complaining of an "Implicit coercion of a value of type Video to an unrelated type DisplayObject."
Strangely enough, the signature of the addChild function on the Starling Sprite class is the same as that of the Flash Sprite class.
So basically the question is: why do I seem to be unable to add a Video object as a child to a Starling Sprite class (but successfully to a Flash Sprite class)?
I'm sure the answer is ridiculously simple... please let me know if I need to add more code or anything. Or if what I'm doing is totally the wrong way.
Or you could add the video to the Flash layer which sits above Starling:
Starling.current.nativeOverlay.addChild(v);
and
Starling.current.nativeOverlay.removeChild(v);
Bare in mind you are not using Starling GPU drawing with this though.
This is because the Starling framework was designed to mimic the regular Flash DisplayList (not completely recreating all the features though). Concretely, you are trying to pass a reference to an object of type starling.display.DisplayObject instead of flash.display.DisplayObject, which gives the appropriate error.
In order to play a video with Starling, you could upload each frame of the movie to a texture. Have a look at this topic on Starling's forum.

How to create play and pause in SWF Format?

I am beginner to Flash.
I am having a SWF Format, I have to keep that in my html page like a video. I need a play and pause button in that video.
Thank you.
SWF file is time line based, even if you convert a movie from AVI to SWF generally there is some sort of key frames.your converting program will offer the properties of this inside the software
Easier way to control a SWF movie would be to embed your FLV into the SWF, than add key frames manually. then you can control from a parent SWF with timeline control
If your just playing a movie file in flash , it may be better to use "net-stream" this will allow you to have also full control over the movie file using cue points, this has other advantages ....quicker loading times, as the whole file would not have to be downloaded first as it allows streaming / Buffering. Using cue points has the same ability as key frames.
so your pause and play button is dependent on how you implement your video

How can I export in flash on the fly a MovieClip into a vector file (SVG, EPS)?

I'm trying to build an app allowing the user to arrange different shapes, add text, and export the result as a vector file.
I've been looking into as3swf libraries and especially the SVGShapeExporter class.
It works fine if you load an swf in the app and try to export it on the fly into an svg file but I'd like to work with movieClips instead of loaded swfs.
Since as3swf.SWF objects are based on ByteArrays, I've been trying to get a ByteArray for my MovieClip but it seems to be empty.
Any idea?
Thanks

In as3 can we dynamically load .swf movies in any player(in web) like flv player?

I want to dynamically load .swf file in a player(like FLV player of as3) in as3.When I shall click on an image the corresponding video will be played on the player on right side(like you tube). Is there something (like FLV player) for .swf files with play, pause, resume, scrubber options to play in web?
You can start with AS3's Loader Class, which will allow you to load and place SWF files in your application.
Controlling the loaded swf's position is going to be a bit trickier, and you may need to have a Movie Clip with a specific linkage name in the .swf, from which you can create an instance in your code and control with the standard MovieClip timeline commands. You should be able to create some controls that work with gotoAndPlay/gotoAndStop/etc
There are a lot of AS3 video players out there. Here is a tutorial that lets you create one. Once you create your FLVPlayer, you can load it using a Loader object.
I think this does what you are looking for.
var SWFLoader:Loader=new Loader();
screen_mc.addChild(SWFLoader);
function loadSWF(evt:MouseEvent):void{
if (evt.target==one_btn){
SWFLoader.load(new URLRequest("one.swf"));
}
else if (evt.target==two_btn){
SWFLoader.load(new URLRequest("two.swf"));
}
}
one_btn.addEventListener(MouseEvent.CLICK,loadSWF);
two_btn.addEventListener(MouseEvent.CLICK,loadSWF);