# Change Loaded Image To FLV

**URL:** <https://forum.kirupa.com/t/change-loaded-image-to-flv/211741>\
**Category:** flash\
**Created:** [January 4, 2007, 6:38pm UTC](https://forum.kirupa.com/t/change-loaded-image-to-flv/211741 "2007-01-04T18:38:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tripwire](https://avatars.discourse-cdn.com/v4/letter/t/ccd318/32.png) [@tripwire](https://forum.kirupa.com/u/tripwire)\
**Post date:** [January 4, 2007, 6:38pm UTC](https://forum.kirupa.com/t/change-loaded-image-to-flv/211741/1 "2007-01-04T18:38:02Z")

</div>

I have a player that contains a video with synchronized image slides that is controlled through actionscript cue points in an XML file. At certain cue points I want an flv video to play instead of my images and go to frame 3 of my mc and then play the video. The problem is while my play head is going to frame 3, it doesn’t show anything (just white), the loadmovie function for my image slides seems to be cover it or something. I tried unloadMovie before showing my flv, but that doesn’t seem to work. Any ideas?

Here’s what I got:

```auto

this.pathToPics = "slides/";

function clear(){
   content.gotoAndStop(1);
}
clear();

function showText(name:String, wholeObject:Object, speed:String){
	slides = wholeObject.info.parameters.slide;
	trace (slides);
	frames = wholeObject.info.parameters.frame;
	trace (frames);
	
	// specify the movieclip to load images into
	if(wholeObject.info.parameters.format == "img"){
	content.loadMovie(this.pathToPics+slides);
	}
		
	if(wholeObject.info.parameters.format == "flv"){
		content.unloadMovie();
		clear();
		content.gotoAndStop(wholeObject.info.parameters.frame);
		
		//play video
		var playback:mx.video.FLVPlayback;
		playback.autoPlay = false;
		playback.contentPath = slides;
	}	
}

function getSize():Object{
   return {width:480, height:270};
}

```
