PDA

View Full Version : looping a movie


ggraham
11-12-2010, 11:57 AM
I have a movie file that i need to loop (by loop i mean go back to the beggining of the movie and replay it over and over again) What needs to be added to the action script 2 code below to enable me to do that?


import mx.video.FLVPlayback;
import mx.transitions.easing.*;
import mx.utils.Delegate;

var flvPlayback : FLVPlayback;


var www:String = ""
var path:String = "order_forms/common3D/media/";
var src:String = "3D_Screens.flv";
var skin:String = "ClearOverNoVol.swf";

function initialize ()
{
// Logger.log ("[slide4.swf].initialize ()");

if (System.capabilities.playerType == "External")
{
flvPlayback.skin = skin;
flvPlayback.contentPath = src
}
else
{
flvPlayback.skin = (www + path + skin);
flvPlayback.contentPath = (www + path + src);
}
flvPlayback.skinAutoHide = true;
}


// test if we are running in Flash IDE
if (System.capabilities.playerType == "External")
{
initialize ();
}

stop ();



Many thanks

Graham

EightySeven
11-16-2010, 07:54 PM
I'm no expert on as2 but I believe it will have some version of gotoAndPlay(frameNumber)

try moveiclip.gotoAndPlay(1);

Eralmidia
11-16-2010, 10:12 PM
Movies loops by default in flash, but your code has a stop(): command at the last line.