;

PDA

Click to See Complete Forum and Search --> : please help! Actions for a non-embedded FLV


jedi_master
06-02-2006, 05:11 PM
Howdy ~

I'm finishing up a filmmaker's portfolio website. There are two main elements, the master SWF (herein the "master SWF") and a number of sub-SWF's which are examples from the filmmakers reel (herein the "reel SWF"). Using thumbnail buttons, a user can load a reel SWF into an empty movie clip located within the master SWF. Each reel SWF is a non-embedded FLV, which, because it's non-embedded, occupies only the first frame of the FLA file. Because of this, once a reel SWF finishes playing it stops on the first frame of the video content for that FLV. I want to avoid this, and need one of the following to occur:

- once the video clip ends, have the reel SWF unload (from the master SWF); the viewing area (where the reel SWFs play) would then revert back to the original image in the master SWF, which is of the filmmaker holding a Super 8mm film camera in a "Han Solo with his blaster" pose. I understand how to use loadMovie/unloadMovie; that's not the issue. Having the master SWF know when the reel SWF is done playing is the issue, but I don't know how to evaluate when the FLV located in the reel SWF has finished playing.

OR:

- how can I code the reel FLA so that once the FLV finishes playing the timeline will go to frame 2 (or any frame I choose)? As I said, right now it returns to the first frame of the reel FLV (the first frame of the video segment, NOT the first frame of the Flash file).

I don't know enough about Flash video to code this properly.

A test version of the site is located here (http://www.seethroughfilms.com/index_flash_variation2.htm):

You'll probably notice that the intro animation does not load smoothly -- there's alot of stuff going on, w/audio, etc -- and right now this is set up as an FLV that's loaded into the master SWF. Once you get to the final portion of the animation, when the seaplane has done it's fly-by and the thumbnails appear on the clothesline, you're in the interactive area of the master SWF. We're ultimately going to have all of our FLVs streamed from a Flash media server host -- for now it's just running as a progressive download from our test site. Apologies for the cra**y download.

Once you get to the interactive area, try clicking on the thumbnail with the motorcycle image; it's one of the few that are linked up to a reel SWF. Please observe how, once the clip ends, the "drive in area" goes to solid black. I want the image of the filmmaker guy to appear instead (the sepia-toned image you'll notice when the plane flies over the drive in).

What's a good solution to this? Do you have to determine how long the clip is, then write a timer script? Or is there a simpler solution? Any replies are much appreciated -- I've wrapped my brain around this, and have checked out several tutorials including those here on Flashkit here (http://board.flashkit.com/board/showthread.php?t=349870), but I'm dynamically loading buttons or anything like that (the buttons are complex; they have to glide along a path to follow the clothesline, so I can't use a static button load method).

I've got to get this out the door; he's showing this to a major producer next week.

Muchas gracias!

BoltVanderhuge
06-02-2006, 10:16 PM
Jedi,

You should be able to set this callback when the flv has finished playing:

ns.onStatus = function(info)
{
if (info.code == "NetStream.Play.Stop")
{
// add your code here
}
}

Bolt

jedi_master
06-02-2006, 10:23 PM
Sweet! I will try this out and let you know how it works. Thanks Bolt ;-)


Jedi,

You should be able to set this callback when the flv has finished playing:

ns.onStatus = function(info)
{
if (info.code == "NetStream.Play.Stop")
{
// add your code here
}
}

Bolt

jedi_master
06-07-2006, 06:22 PM
Hey Bolt,

I can't seem to get that Netstream.Play.Stop code to work. I've uploaded my FLA to my server; would you take a look for a second please? It's here:

FLV coding question example file (http://www.kaleidodesign.com/fileupload/upload/buell_clip.zip)

I placed the code in the first frame, along with the imported FLV, and I have a blank frame 2 (that's where I want the clip to end, so the suer can see through to the background behind where the clip had just played).

If you have any other questions, etc, let me know.

Thanks!

BoltVanderhuge
06-08-2006, 03:45 PM
Hey Jedi,

I didn't know you were using the FLV Playabck component. Try this code instead:

import mx.video.*;
var listenerObject:Object = new Object();
// listen for complete event; play new FLV
listenerObject.complete = function(eventObject:Object):Void {
if (my_FLVPlybk.contentPath == "rtmp://wsd5unbej.rtmphost.com/VideoPlayer/BUELL.flv") {
//Add your code here
}
};
my_FLVPlybk.addEventListener("complete", listenerObject);

You will need to name your FLVPlayback component to "my_FLVPlybk".

jedi_master
06-08-2006, 05:03 PM
cool, thanks Bolt!

jedi_master
06-08-2006, 05:22 PM
It's still not pulling off that function, Bolt. The contentPath names are correct, and I have it go to a blank frame at frame 2...nada.

???

Ideas?