PDA

View Full Version : Video Project Question


TheSheriff
01-11-2007, 03:30 PM
I am currently developing a plan of attack for a video project I am working on and would love feedback on how to accomplish this -- AS question included.

I have created a 3D interface that I plan on using in flash. I am going to have it rotate based on button clicks inside of Flash. The rotating will be accomplished by playing 3 movies (.flv) that I imported.


Now on to the AS question. How would I code this? I imagine I would have lets say 6 keyframes. Frame 1 would be a jpg of the first frame of movie01. This would allow me to set up animation and navigation more precisly without overlaying on video.

When I click a button in frame 1, flash goes to frame 2 which plays movie01 showing a transition to a different part of the 3D model. When movie01 is done playing, I want flash to go to frame 3 where I would have more animations/navigations. This would be the set up for a jpg of movie 02. Then I could continue the pattern similarly.

Does this sound like the best way to set this up? If so how can you check to see if a movie (.flv) has played entirely, and if it did perform an action such as gotoAndPlay().

Any help on this would be much appreciated as I haven't worked with video too much. Tutorials and samples are welcomed.

Thanks

sophistikat
01-11-2007, 03:57 PM
Here's how to check the status of your FLVvar nc:NetConnection = new NetConnection ();
nc.connect (null);

var ns:NetStream = new NetStream (nc);
vplayer.attachVideo(ns);
ns.seek (0);

ns.play ('parishilton_lovesdarkchocolate.flv');
ns.onStatus = function (flv:Object) {
if (flv.code == "NetStream.Buffer.Flush")
{
// flv is done; do this
}
}

TheSheriff
01-11-2007, 04:54 PM
Thanks Marlon.

You've obviously done some work with video. If you were going to develop a project like this, would the process I described be the correct way of doing it.

What would you do differently?

sophistikat
01-11-2007, 07:57 PM
its seems like a very good start... and if you need to tweak it, there doesn't seems to be a lot of work.... i would, personally, start there.

TheSheriff
01-23-2007, 07:21 PM
Marlon,

Ran into a problem and I was hoping you could hook me up.

First off how shoud I load my .flv. The way I've done it so far is drop a flvPlayback component on the stage and then in the content inspector link to the flv using contentpath. Is this correct or should I use actionscript?

Next when I insert my path to the flv in the code below, my whole animation doesn't play before going to frame 2.


var nc:NetConnection = new NetConnection ();
nc.connect (null);

var ns:NetStream = new NetStream (nc);
vplayer.attachVideo(ns);
ns.seek (0);


//inserted my movie name/path here
ns.play ('rotate1.flv');
ns.onStatus = function (flv:Object) {
if (flv.code == "NetStream.Buffer.Flush")
{
gotoAndStop(2);
}
}
stop();


Thanks man