Groups | Blog | Home
all groups > flash (macromedia) > march 2005 >

flash (macromedia) : how to make FLV loop??


Tim
3/3/2005 11:05:00 PM
I am using the Media Display component and I want to make my FLV loop
automatically. Where exactly do I place the code below? On a seperate frame?
On the movie itself?? I am having no success at all.
Thanks.

code:

endListen = new Object();
endListen.complete = function(eventObject) {
myDisplay.play(0);
};
myDisplay.addEventListener("complete", endListen);

Tim
3/4/2005 9:36:55 AM
That worked! Wooooooo!!! Thanks SOOO much!

-tim



[quoted text, click to view]

Tim
3/4/2005 1:36:42 PM
It was your code that worked for me Rothrock. I simply didn't know where to
place it- until derobinson guided me through the last step.

Its all working well now though! Thanks a bunch for all the assistance
Rothrock & derobinson!!!
Very much appreciated!!!






[quoted text, click to view]

derobinson
3/4/2005 4:19:23 PM
This code should go on the timline that holds the instance of the media display component named myDisplay.

Good luck!
Rothrock
3/4/2005 5:40:38 PM
As I said in your other thread, there could be a secondary problem. FLVs made
in certain ways don't fire the complete event. You can test for this by either
downloading an FLV which is known to work or by writing some code which watches
the progress (I think that is what it is called) event. For clips that don't
complete it will just keep saying that it is playing even after reaching the
end. I'm away from MX04 at the moment so I don't have access to the help
files, so I can't quite remember, but look in the component dictionary under
using components. There you will find code for how to use all the events,
methods, etc.
Katmai
3/30/2005 8:37:26 AM
I have a similar... although opposite problem. Id like to let the movie jump to
frame 1 after completion.

why doesnt my code work? after the clip copmletes it jumps back to frame 1 but
it also starts playing again :\

var mediaListener = new Object();
mediaListener.complete = function() {
videoHolder.mediaDisplay.autoPlay = false;
videoHolder.mediaDisplay.stop();
list._visible = true;
};
videoHolder.mediaDisplay.addEventListener("complete", mediaListener);
derobinson
3/30/2005 3:10:16 PM
Is your scope correct? This code would point to a media display component with
an instance name "mediaDisplay" that is inside a movie clip with an instance
name "videoHolder". If this code and your media display component (assumably
called "mediaDisplay") sit on the same timline, then you just need

mediaDisplay.stop();

etc.

Hope that helps! If not, write back!

jordisan
4/21/2005 5:46:52 PM
that worked for me too, but when the video completes playing and the play head
jumps back to frame 1, I can't get the video to play again (I have a button as
a menu option to play the video). Did you run into that problem too Katmai?

Here's the code I'm using:

endListen = new Object();
endListen.complete = function(eventObject) {
gotoAndStop("main",1);
};
mainVideo.addEventListener("complete", endListen);

Any ideas?
tmocs
6/26/2005 12:00:00 AM
He guy,

AddThis Social Bookmark Button