# Full screen FLV looping

**URL:** <https://forum.kirupa.com/t/full-screen-flv-looping/255949>\
**Category:** flash\
**Created:** [March 28, 2008, 3:22pm UTC](https://forum.kirupa.com/t/full-screen-flv-looping/255949 "2008-03-28T15:22:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![detonate](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/detonate/32/2950_2.png) [@detonate](https://forum.kirupa.com/u/detonate)\
**Post date:** [March 28, 2008, 3:22pm UTC](https://forum.kirupa.com/t/full-screen-flv-looping/255949/1 "2008-03-28T15:22:37Z")

</div>

Been trying to loop a .flv without any success so far.  
Could anyone help me out in the best direction possible?

Here’s my listener attempt:

var lstn = new Object();  
lstn.complete = function(evtObj) {  
myNetStream.play();  
}  
myNetStream.addEventListener(‘complete’, lstn);

------------------------- Main code below

// Prepare stage  
Stage.align =“TL”;

// VIDEO FULLSCREEN  
// \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

// Prepare connection  
var myNetConnection:NetConnection = new NetConnection();  
myNetConnection.connect(null);

// Stream video  
// “video” is the video symbol in the library  
var myNetStream:NetStream = new NetStream(myNetConnection);  
video.attachVideo(myNetStream);

// Smooth  
video.smoothing = true;

// Start playing  
myNetStream.play(“anim\_lignes09a.flv”);  
myNetStream.seek(0.3);

// VIDEO SIZE  
function setVideoSize():Void  
{  
// Stage Dimensions  
var wStage:Number = Stage.width;  
var hStage:Number = Stage.height;

```
// Adapt based on width
video._width = Stage.width;
video._yscale = video._xscale;

// Adapth based on height
if( video._height &lt; hStage )
{
	//scale
	video._height = Stage.height;
	video._xscale = video._Yscale;

	// centered
	video._x = ((video._width - Stage.width) / 2) * (-1);
}

```

}

// RESIZE STAGE  
// \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

// Create listener  
var resizeStage:Object = new Object();

// Detect resize  
resizeStage.onResize = function()  
{  
// Video  
setVideoSize();  
}

// Activates listener  
Stage.addListener(resizeStage);  
stop();
