00:00
00:00
Newgrounds Background Image Theme

JUBBAA just joined the crew!

We need you on the team, too.

Support Newgrounds and get tons of perks for just $2.99!

Create a Free Account and then..

Become a Supporter!

How to make button play video, loop

2,477 Views | 1 Reply
New Topic Respond to this Topic

Hi everyone,

So I want to make a sort of slideshow (for flv videos) for something I am working on.

The initial screen after the menu is a video looped animation, and there should be buttons.
Each button plays a specific video, also in loop.
How could I go about doing this?
I have no previous flash experience but I also can't find any tutorials or guides how to make buttons play videos (in loop).
See attached picture, it probably explains much better.

Thanks

How to make button play video, loop

Response to How to make button play video, loop 2018-05-15 14:57:36


You pretty much just need to learn how to implement and use a button in ActionScript and that's it.

It would go something like this if I'm correct:

button1.addEventListener(MouseEvent.CLICK, button1ClickHandler); 
button2.addEventListener(MouseEvent.CLICK, button2ClickHandler); 
button3.addEventListener(MouseEvent.CLICK, button3ClickHandler); 

function button1ClickHandler(event:MouseEvent):void { 
//This is where you write what will happen when button1 is pressed
    goToAndPlay(movie1);
}

function button2ClickHandler(event:MouseEvent):void { 
//This is where you write what will happen when button2 is pressed
    goToAndPlay(movie2);
}

function button3ClickHandler(event:MouseEvent):void {  
//This is where you write what will happen when button3 is pressed
    goToAndPlay(movie3);
}

Something like this, you just need to know how to implement button and how to use it.
Just type in google Flash ActionScript 3 buttons.