FORUMS: list search recent posts

Playing part of an FLV

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Mint Fresh
Playing part of an FLV
on Dec 5, 2006 at 2:20:49 pm

I have an FLV which is about 40 seconds long. What i want to do is have the FLV play but then stop after 10 seconds(ish) and display some messaging. Then give the user a button/option to carry on, and continue this process 3/4 times.

Is this possible or do i have to chop up my FLV?

Thanks



[URL]http://www.pjparty.co.uk[/URL]
[URL]http://www.bellman.co.uk[/URL]


Return to posts index

Matt Klundt
Re: Playing part of an FLV
on Dec 6, 2006 at 3:32:38 pm

You can do this by adding Cuepoints in the video encoder and actionscript to tell Flash to pause the video when it hits one of these cuepoints.

Are you using a component video player or a custom created one?

Matt
--------------------
http://www.mcquillendesign.com
http://www.mattfoxgames.com


Return to posts index

lajoiet
Re: Playing part of an FLV
on Dec 6, 2006 at 7:02:03 pm

Or if you want it to happen, say every 10 seconds, you can continually test for the video's time location (as Matt said, how to do this depends on if you're using NetStream or the FLV Playback component) and when it hits 10 seconds, pause the vid and display your message/button.


Return to posts index


Mint Fresh
Re: Playing part of an FLV
on Dec 7, 2006 at 11:50:57 am

I'm using the video component, and that's exactly what i want to do. Pause on a cuepoint and trigger a movie clip to play, but i have no idea where to start with the actionscript!?!

thanks



[URL]http://www.pjparty.co.uk[/URL]
[URL]http://www.bellman.co.uk[/URL]


Return to posts index

Matt Klundt
Re: Playing part of an FLV
on Dec 8, 2006 at 3:33:57 pm

By adding Event cuepoints in the Flash Video encoder, you can add parameters to each one for the individual text, image path, etc you may need.

Using a media component, this is a sample of how I would do it.

var listenerObject:Object = new Object();
listenerObject.cuePoint = function(eventObj:Object) {
    textDisplay.text = eventObj.info.parameters.text;
    myButton._visible = true;
    myMedia.pause();
}
myMedia.addEventListener("cuePoint", listenerObject);

myButton.onRelease = function() {
    this._visible = false;
    myMedia.play();
}

myMedia is the name of the video component on the stage, textDisplay is a dynamic TextField on the stage, myButton is the button that will trigger the video to play again.
eventObj.info.parameters.text returns the value of the parameter named "text" (this could be anything, "text" was the name of the parameter I made up in the Flash Video Encoder)

Matt
--------------------
http://www.mcquillendesign.com
http://www.mattfoxgames.com


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]