Topic: Problem with the AS3 in my player

Well I tried the folks over at boards.flashkit.com, but I'm starting to wonder if they don't have experts over there, just a lot of people with questions.

Okay, I have a decent knowledge of the graphic end of Flash, but AS stuff gives me a lot of trouble.

I have three buttons that, when pressed, calls the cooresponding function which tells my player which source to use. This has been working well.

Thing is, I need a holding image before anything is played, so I've been using an image behind the movie which just gets covered by the video when played. The problem is I have videos of different sizes, so some of the videos don't cover the whole image behind it.

So I take it the solution is to use two frames for the project, and when a button is pressed, make sure the movie is advanced to frame two (with no image in the background) before playing, or I need a way to tell the image in the background to be gone. Here is my existing code, make your recommendations accordingly.

video1button.addEventListener(MouseEvent.CLICK, vid1);
video2button.addEventListener(MouseEvent.CLICK, vid2);
video3button.addEventListener(MouseEvent.CLICK, vid3);

function vid1(e:Event):void{
vidPlayer.source = "/flash/shared/CMPS_FOX2.flv"
};
function vid2(e:Event):void{
vidPlayer.source = "/flash/shared/CMPS_WXYZ.flv"
};
function vid3(e:Event):void{
vidPlayer.source = "/flash/shared/CMPS_ABC7.flv"
};

Any ideas?

"Bear 270, young man. Bear two, seven, zero, over." - Musings of a flight simulator guru, me.

Re: Problem with the AS3 in my player

video1button.addEventListener(MouseEvent.CLICK, vid1);
video2button.addEventListener(MouseEvent.CLICK, vid2);
video3button.addEventListener(MouseEvent.CLICK, vid3);

function vid1(e:Event):void{
yourImage.visible = false;
vidPlayer.source = "/flash/shared/CMPS_FOX2.flv"
};
function vid2(e:Event):void{
yourImage.visible =false;
vidPlayer.source = "/flash/shared/CMPS_WXYZ.flv"
};
function vid3(e:Event):void{
yourImage.visible = false;
vidPlayer.source = "/flash/shared/CMPS_ABC7.flv"
};

You can go a lot more dynamic but this should get you started.

"...porque Jehová tu Dios estará contigo en dondequiera que vayas." Joshua 1:9