Question about online guide code for video player
Hello, I'm new to flash and I'm trying to make a video player following this guide http://www.photoshopcafe.com/tutorials/flash/videoplayer/videoPlayer.htm. By the end though, my code doesn't seem to like what they have there.
Here's my code:
btn1.addEventListener(MouseEvent.CLICK, vid1);
btn2.addEventListener(MouseEvent.CLICK, vid2);
btn3.addEventListener(MouseEvent.CLICK, vid3);
btn4.addEventListener(MouseEvent.CLICK, vid4);
function vid1(e:Event):void{
vidPlayer.source = "Shephard.flv"
};
function vid2(e:Event):void{
vidPlayer.source = "Austen.flv"
};
function vid3(e:Event):void{
vidPlayer.source = "LaFleur.flv"
};
function vid4(e:Event):void{
vidPlayer.source = "John.flv"
};
And here's what it yells at me:
| Scene 1, Layer 'actions', Frame 1, Line 7 | 1119: Access of possibly undefined property source through a reference with static type Class. |
| Scene 1, Layer 'actions', Frame 1, Line 11 | 1119: Access of possibly undefined property source through a reference with static type Class. |
| Scene 1, Layer 'actions', Frame 1, Line 15 | 1119: Access of possibly undefined property source through a reference with static type Class. |
| Scene 1, Layer 'actions', Frame 1, Line 19 | 1119: Access of possibly undefined property source through a reference with static type Class. |
| Scene 1, Layer 'actions', Frame 1, Line 1 | 1061: Call to a possibly undefined method addEventListener through a reference with static type Class. |
| Scene 1, Layer 'actions', Frame 1, Line 2 | 1061: Call to a possibly undefined method addEventListener through a reference with static type Class. |
| Scene 1, Layer 'actions', Frame 1, Line 3 | 1061: Call to a possibly undefined method addEventListener through a reference with static type Class. |
| Scene 1, Layer 'actions', Frame 1, Line 4 | 1061: Call to a possibly undefined method addEventListener through a reference with static type Class. |
I have the videos in the same folder like it says and they're flv just like the example - the only thing I changed are that there are 4 buttons and videos now. Any idea what's wrong?
Thanks a bunch for your time,
Arnold