Video in Flash
- Started
- Last post
- 14 Responses
- koko
All right guys, here it goes. I am starting to work with video in Flash. I've read some info around, but I would like to hear advised from people who has done it before.
My idea is to embed video, probably Progressive on a swf file. So it would work as follows: I have the main movie, things happen, animation and so forth, the flash movie stops on a point then there is a button to see the movie, you click and the movie loads inside my main swf file, it plays and then once finish, the main movie keeps playing.
How to do this the best way? How do I communicate to the main swf that the mov has finished playing?
Any help/advised would be appreciated. Sorry about the huge posting.
Thnx
- ********0
I would bring in an external movie (.swf) or create a player that brings in a .mov/.avi/.wmv, maybe using XML. I would also compress your .swf and/or .mov in Sorenson Squeeze.
Much info here on this. Use the dB and good luck.
- plashal0
The movie fills the frames in the flash timeline, so when the movies is over thats where you start your interfatc etc.
we use it all the time and works well... ( make preloader tho)
- ********0
that's if you want to develop the thing linearly
- gpop0
site:
http://www.petranemcova.orgvideo:
http://www.petranemcova.org/imag…i didnt use sorenson squeeze at the time so the file is a bit larger, but the movie was a quicktime imported into flash, it creates a time line as long as the movie itself so on th elayer above / below you can add your controls etc
i need to go back and soreson these really
- koko0
Ok guys, so i am getting closer. While waiting for your comments i kept reading info about it, and this is so far what i got:
1. I can import the all mov. into a flash, which will appear as frames on the main timeline (called embeding) and use action scripting in a normal way. Then import this swf file as an external file on my main swf, and the action script will work, as gpop did on his site petranemcove (nice girllllll).
The downside of this approach, is that they recommend to embed only when the movie is under 5 sec, because if not your swf has to wait to download all the frames to start playing.
2. Import the mov using the component that come with Flash MX Professional, as an external flv (this is called Progressive). This would be my first choice, either importing it on my main swf or an external swf that will load on my main one. The problem with this is that I can not find a way to comunicate to may main swf file that my movie has stoped playing or any other event for that matter.
So, any more suggestions?
Thanks
- fake_it_up0
take your source video... brinig it into after effects export as flv at 900kps 2 scan.. then take that and import into flash in a movie clip then take that move clip put it into ur main timeline and do it linerly (spelling sorry) the only down size is the video mite be choppy or not sync with sound if its a really long video... also if it is choppy drop every other frame in ur after effects and then run ur flash at 15 fps
that mite help... non the less export your video as a flv....
- koko0
So, fake_it_up, you mean importing the mov as a flv in a movieclip inside my main mov flash (progressive).
Then placing that Movieclip on the main timeline.
But then again how do I communicate to my maintimeline to keep running once the movie is finish?
Sorry but I am not a great actionscripting and may be loosing the point?.
- gpop0
why dont you stick a goto and play at the end frame of your movie, and tell the main file to play!
to be honest, i cant quite grasp what your end result is desired to be.
i have the movie code as given to me by http://www.photonshepherds.com/ somewhere, that streams (even though their files seeem huge!)
- koko0
sorry gpop, I guess i didn't explained very well what i was trying to accomplish because the confussion with theterm mov for both the quicktime movie and the flash movie. Let me see:
1. I have a main flash movie.
2. This flash movie starts running and gets to a point where it stops.
3. On the frame where this flash movie stops there is a button to open a quicktime movie.So far so good.
4. Now I have two options to load the quicktime movie:
a. I embed the quicktime inside a flash movie, so it will run on a flash timeline. At the end of this flash movie I can add an action to tell my main flash movie to keep running. Then I will load this external swf with my quicktime movie embedded into a movie clip on my main flash movie, and the actionscript will run perfect, telling my main movie to start playing once the embeded quicktime is finish. This works, but I have to wait for the all external flash movie with the quicktime to download so it starts playing (too much time of waiting).
option b. I load-stream my quicktime movie as an external file inside my external flash movie, that will work the same that the firt case, loading it on a mc in my main flash movie.
This is my preffered choice, but then, because i am referring to an external quicktime movie, where do i put the scrpting to communicate with my main flash movie?
Hipe this helps:(
- caseyc0
If you can require flash 7 it's the way to go since you can use progressive (external) flv which removes any limits on file size, length and framerate. You can do the same in fp6 but you need Communication Server to stream the videos.
I would also recommend against using MMs media components, they are a bit clunky from my experience. And rolling your own is pretty easy. I'll email you a file I did for someone else on here a while back.
- caseyc0
I wanted to add the bit about detecting the end of a loaded flv...
You need to use this tool to "inject" metadata into your flv after it has been compressed:
Once that is done you can put an onMetaData function on your NetStream object to get the info.
myNetStream.onMetaData = function(info) {
trace(info.duration);
}
- koko0
caseyc...YOU ARE THE MAN!!!!!!
could you email me the examples. Or I can email you first.Is up to you.
Thanks man!!!!!
- gpop0
sounds fun
id just pre-load it all up and on the last frame add your button.
but then i dont do tecnikill
- nosaj0
If your movie is large at all, use an FLV. You can communicate with your mvie using netstream classes.
Convert your movie to an .FLV file, Sorenson Squeeze is a good piece of software for this:
http://www.sorenson.com/misc/fre…1st make you netstream connection:
http://livedocs.macromedia.com/f…then communicate with your movie with the netstream classes:
http://livedocs.macromedia.com/f…Your movie will play much smoother then embedding an .mov.