# Help with loading an flv external video into a swf file

**URL:** https://forum.kirupa.com/t/help-with-loading-an-flv-external-video-into-a-swf-file/305767
**Category:** flash
**Created:** [March 3, 2010, 10:02am UTC](https://forum.kirupa.com/t/help-with-loading-an-flv-external-video-into-a-swf-file/305767 "2010-03-03T10:02:05Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![mtd10](https://avatars.discourse-cdn.com/v4/letter/m/b2d939/32.png) [@mtd10](https://forum.kirupa.com/u/mtd10)
#### Post date: [March 3, 2010, 10:02am UTC](https://forum.kirupa.com/t/help-with-loading-an-flv-external-video-into-a-swf-file/305767/1 "2010-03-03T10:02:05Z")

</div>

I’m trying to load some external videos into my project but I’m having some problems. This is what I’ve done but I recieve this error when I run the swf file.

1046: Type was not found or was not a compile-time constant: btn\_button1. Source: import flash.events.MouseEvent;

1046: Type was not found or was not a compile-time constant: btn\_button2. Source: import flash.events.MouseEvent;

```auto
package
{
    import fl.video.FLVPlayback;
    import flash.display.Sprite;
	import flash.events.MouseEvent;
	import flash.display.MovieClip;
    
    public class main extends Sprite {
		
		var myPlayer:FLVPlayback = flv_player;
		var empty_mc:MovieClip = new MovieClip();;
		
		public function Main()
		{
			addChild(empty_mc);

// remove instance of the flv player on the stage and put it in the empty mc
			removeChild(myPlayer);
			empty_mc.addChild(myPlayer);

			btn_button1.addEventListener(MouseEvent.CLICK,
				onButtonClick);
			btn_button2.addEventListener(MouseEvent.CLICK,
				onButtonClick);
        }
		

		function onButtonClick(event:MouseEvent):void
		{
			if(event.target == btn_button1){
			myPlayer.source = "X:/Third Year/Final Year Project/aude.flv";
			}
			else if(event.target == btn_button2){
			myPlayer.source = "X:/Third Year/Final Year Project/christian.flv";
			}
		}
    }
}

```

Can anyone help me with this problem?  
Thankss
