Create video movie from dynamic content - actionscript-3

I have an application (actionscript) that displayes a slideshow from dynamic content written in xml. The slideshow runs in flashplayer. Now i have been asked to display the content as a video file format. Is it possible to do such a thing?
Thanks

To answer Your Question,
If I understand you correctly, and you want to create either timeline or scripted animation, and have as3 record what appears, then the answer is Yes.
Below is a great example:
http://www.zeropointnine.com/blog/updated-flv-encoder-alchem/
Really, all you have to do is to make all your actions and child animations happen inside a single Sprite or MovieClip, and then after every frame, copy the pixels from that object as it appears for that frame, and store those pixel in a ByteArray or even a Vector array of BitmapData.
That being said, once you have the data you will need to learn about encoding; yet, there are a ton of libraries out there that can help you avoid having learn a file spec and make an encoder from scratch.
Hope this helps.

Related

AS3 - What are the different methods of rendering animation on the screen?

I'm a beginner to AS3 and programming in general, but have learned enough that I want to now start learning how to render animations on the screen. These are the methods that I know of from two days of "researching" on google.
I'm not in a situation where I could afford to take courses from an educational institution, so my only means of learning are through online sources.
Update an objects x or y positions in a loop on every frame. Very basic. Of course any kind of advanced animation (say, showing a character running) is not possible with this method alone.
Using Flash and creating animation on a movie clip's timeline and, combined with moving the position of the object we can achieve some proper animation this way. However I cannot afford Flash, so this is not an option available to me. It also doesn't seem to be a popular option among more experienced programmers either (I think, due to having poor performance when lots of objects animating on the screen?)
Using a sprite sheet and then blitting the relevant image from the sprite sheet onto the screen.
Is there any other way to put an image from a sprite sheet onto the screen other than blitting?
And what other methods of rendering animation are available?
Some online websites claim that blitting is all I'll ever need, but I want to know all the options available so I could choose the most appropriate one for any given situation.
Any help would be appreciated :)
Another option for blitting is Stage3D. Take a look at Starling for 2D animations.
Blitting would be my best opinion. The only other thing I can think of is manually taking the images from the sprite sheet and putting it into each frame of an animation.
To render animation, you can create a frame in a MovieClip and convert it into a MovieClip and name the frame 'running'. Then you need to create an Enter Frame event where the MovieClip's instance name is 'Guy' and in the code on the function write 'Guy.x += 5;' to make your MovieClip go 5 pixels to the right every frame and also in the function write "Guy.gotoAndStop('running');"
Use TweenMax engine for better animation purposes. Easy coding, more Animation!!

Working with Graphics in Actionscript

i haven't worked with graphics until now.. so I have not much ideas about using graphics objects in flash cs6.
I want to move this character depending if the person has pressed a button and stop his movement once the button is released. I looked up on how to go about this process.. so far one thing that kept coming up was to turn my spritesheet into graphics.. but after that i couldn't really find anything on how to integrate this into actionscript. Plus when I convert an object into graphics it doesn't give me options to assign it a class name. so can somebody give me a good breakdown on what is the purpose of these graphics objects? and how should I go about making a sprite move?
Disregard information concerning sprite sheets. These are used as a completely different method of graphics rendering that I'm not going to cover here; for more advanced, high performance applications and games.
When you say Graphics, I am assuming that you mean you've created some drawings that you've converted to a Graphic like this:
These types of objects are used purely for timeline animation. What you want to use here is the type MovieClip. When you use this type, you'll be able to give the object a class name like you mentioned:
After doing this, you'll be able to refer to that library symbol in ActionScript like this:
var gr:MyGraphic = new MyGraphic();
addChild(gr);

how to flip a movieclip as if we are reading a printed book in as3

How can we flip some movie clips one by one as if you are reading a printed book?
I need to create a ebook in as3 where we are populating dynamic data.
Here, is a link which I got while searching, http://swf-flash.blogspot.in/2010/07/let-talk-about-how-to-create-pageflip.html#more But, its using a static movieclip, whereas i need a movieclip with dynamic content.
There's quite a lot of page flip solutions out there. I don't think dynamic content should make much difference. See a list here http://flashspeaksactionscript.com/flip-a-page-with-these-flash-page-flippers/
you can learn more from this site http://www.flashandmath.com/flashcs4/flip/index.html
good luck

How to create a new swf on the server from a moviclip in current swf

I have a movieClip on the stage with a loaded swf playing animation and sound. I want to export the movieclip to swf. I thought I would be able to do something similar to the jpeg export?.
The main swf and the one being loaded in to be copied are on the same server.
I've searched about but I have not come across anything that outlines what needs to be done.
Any chance of a bit more in-depth explanation as to how to accomplish this?
I did have one post on here already about where someone had a similar question but the moders felt a need to delete it :(
There's a library called Ming which might suit your needs.
Also, as serverside swf generation is not trivial, do you really need it? If you need a dynamic swf, you could also create a template and create the content using flashvars in combination with a serverside language like PHP.

Actionscript guru puzzle

Can someone suggest a workaround to the following problem:
I want to make an application that will create an area on stage that will be filled with images. Firstly, the images have to be 'saved' on an array. The problem for me is that I want this to be quite generic. I mean, according to a configuration file(?) or some constants(?), one build of the application may result to an SWF that will create a Rectangle area on stage filled with some graphics from virtual folder 1, while another build of the same application may result to one rectangle area and one triangle area each one filled with graphics from virtual folder 1, and folder 2 respectively.
I have stuck here sometime now. Can you suggest a workaround to this?
I'm not sure I completely understand your question, but I've been creating a somewhat similar application in AS3 which reads from a text-file using a URLLoader, and then parses that text to figure out which images to display on screen. It's quite easy to do basic parsing using the built in String library methods. Would this technique work for your problem?