Log in

View Full Version : Flash Video not "looping"



WyldeSight
07-01-2008, 03:43 PM
I created a Flash video from a mpeg... the video plays fine but it does not LOOP or start over when it ends even though I see it as looping = true in the code.



<script language="javascript">AC_FL_RunContent = 0;</script>
<script src="AC_RunActiveContent.js" language="javascript"></script>


<script language="javascript">
if (AC_FL_RunContent == 0) {
alert("This page requires AC_RunActiveContent.js.");
} else {
AC_FL_RunContent(
'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0',
'width', '320',
'height', '240',
'src', 'Untitled-1',
'quality', 'high',
'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
'align', 'middle',
'play', 'true',
'loop', 'true',
'scale', 'showall',
'wmode', 'window',
'devicefont', 'false',
'id', 'Untitled-1',
'bgcolor', '#000000',
'name', 'Untitled-1',
'menu', 'true',
'allowFullScreen', 'false',
'allowScriptAccess','sameDomain',
'movie', 'Untitled-1',
'salign', ''
); //end AC code
}
</script>


<noscript>
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="320" height="240" id="Untitled-1" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="allowFullScreen" value="false" />
<param name="movie" value="Untitled-1.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#000000" /> <embed src="Untitled-1.swf" quality="high" bgcolor="#000000" width="320" height="240" name="Untitled-1" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
</noscript>

Medyman
07-02-2008, 09:13 PM
Looping the .swf won't do you any good here, unless you've imported the .flv into the timeline. The video player inside of the .swf doesn't adhere to the "loop" parameter.

You have to add code to the FLVPlayback component. Something like this:

You can add play() within the "complete" event:

import mx.video.*;
var listenerObject:Object = new Object();
listenerObject.complete = function(eventObject:Object):Void {
my_FLVPlybk.play();

};
my_FLVPlybk.addEventListener("complete", listenerObject);
my_FLVPlybk.contentPath = "http://www.helpexamples.com/flash/video/water.flv";