A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: please help! Actions for a non-embedded FLV

  1. #1
    flash-a-delic veteran
    Join Date
    Nov 2000
    Location
    Bay Area, CA
    Posts
    111

    please help! Actions for a non-embedded FLV

    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:

    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, 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!
    Rob

    "hokey religions and ancient weapons are no match for a good blaster by your side, kid"

  2. #2
    Member
    Join Date
    Sep 2005
    Posts
    58
    Jedi,

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

    Code:
    ns.onStatus = function(info)
    {
      if (info.code == "NetStream.Play.Stop")
      {
        // add your code here
      }
    }
    Bolt
    My Flash Video Blog
    Get Flix Pro here (My starving college sister's affiliate link)

  3. #3
    flash-a-delic veteran
    Join Date
    Nov 2000
    Location
    Bay Area, CA
    Posts
    111

    thanks!

    Sweet! I will try this out and let you know how it works. Thanks Bolt ;-)


    Quote Originally Posted by BoltVanderhuge
    Jedi,

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

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

    "hokey religions and ancient weapons are no match for a good blaster by your side, kid"

  4. #4
    flash-a-delic veteran
    Join Date
    Nov 2000
    Location
    Bay Area, CA
    Posts
    111

    not working properly

    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

    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!
    Rob

    "hokey religions and ancient weapons are no match for a good blaster by your side, kid"

  5. #5
    Member
    Join Date
    Sep 2005
    Posts
    58
    Hey Jedi,

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

    Code:
    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".
    My Flash Video Blog
    Get Flix Pro here (My starving college sister's affiliate link)

  6. #6
    flash-a-delic veteran
    Join Date
    Nov 2000
    Location
    Bay Area, CA
    Posts
    111
    cool, thanks Bolt!
    Rob

    "hokey religions and ancient weapons are no match for a good blaster by your side, kid"

  7. #7
    flash-a-delic veteran
    Join Date
    Nov 2000
    Location
    Bay Area, CA
    Posts
    111

    dangit

    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?
    Rob

    "hokey religions and ancient weapons are no match for a good blaster by your side, kid"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center