Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (Quad, aliswee), 835 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Video Panel System #480655
06/23/20 19:21
06/23/20 19:21
Joined: Jan 2012
Posts: 108
G
gamers Offline OP
Member
gamers  Offline OP
Member
G

Joined: Jan 2012
Posts: 108
Hello friends,
I want to create a system where users can watch videos sequentially. If the user hovers over the video with the mouse, I want to make sure that the pause button is displayed on the video and that the video is paused if it clicks. If the mouse does not hover over the video, the video will continue to play. How can I create the structure I show as an example below.
Thank you very much!

[img]https://wetransfer.com/downloads/1c2d7715918cc4cf09e7fa63699f54a520200623192020/339c91/grid[/img]

[img]https://vrl-eu-cdn.wetransfer.net/i...342c316a6c849fcf97cbfddf05405077de20df37[/img]

[img]https://vrl-eu-cdn.wetransfer.net/i...7983e0b3026fe49d1072cbc400a493d25c3ba1e4[/img]

Last edited by gamers; 06/23/20 19:22.
Re: Video Panel System [Re: gamers] #480660
06/24/20 12:03
06/24/20 12:03
Joined: Oct 2008
Posts: 679
Germany
Ayumi Offline
User
Ayumi  Offline
User

Joined: Oct 2008
Posts: 679
Germany
Use a Panel and the render to texture feature with "target_map" to render your movie. Use Buttons and Mouse h(over) events to control.

Re: Video Panel System [Re: gamers] #480730
07/05/20 09:27
07/05/20 09:27
Joined: Jan 2012
Posts: 108
G
gamers Offline OP
Member
gamers  Offline OP
Member
G

Joined: Jan 2012
Posts: 108
Hello again,
Unfortunately, I couldn't create the structure I wanted to build. Can you create and sgare a video panel system sample, please?

Re: Video Panel System [Re: gamers] #480731
07/05/20 12:08
07/05/20 12:08
Joined: Jul 2007
Posts: 619
Turkey, Izmir
Emre Offline
User
Emre  Offline
User

Joined: Jul 2007
Posts: 619
Turkey, Izmir
i can't see your example. There is something wrong about your links. Anyway, here is a quick example. This is not the best method but it gives an idea at least. As Ayumi said; you can use buttons etc.

Code
///////////////////////////////
#include <acknex.h>
#include <default.c>
#define PRAGMA_PATH "%EXE_DIR%\templates\images";
#define PRAGMA_PATH "%EXE_DIR%\samples";


//panel bitmap
BMAP* video_bmap="#512x512x24";
BMAP* pause_button="rock.tga";

//video handle
var vid_handle;


PANEL* video_panel=
{
	layer=1;
	bmap=video_bmap;
	flags=SHOW;
}

function pause_event()
{
	//pause the video
	media_pause(vid_handle);
}
PANEL* pause_button_panel=
{
	layer=3;
	bmap=pause_button;
	
	//if click the pause button
	on_click=pause_event;
}


function main()
{
	fps_max=75;
	video_mode=9;
	video_screen=2;
	wait(3);
	
		
	//play video on panel
	vid_handle=media_loop("blabla.avi",video_panel.bmap,100);

	mouse_mode=4;
	mouse_pointer=2;




	while(1)
	{
		
		//mosue over
		if(mouse_pos.x>video_panel.pos_x&&
		mouse_pos.x<video_panel.pos_x+video_panel.size_x&&
		mouse_pos.y>video_panel.pos_y&&
		mouse_pos.y<video_panel.pos_y+video_panel.size_y)
		{
			//show pause button
			set(pause_button_panel,SHOW);
			draw_text("PAUSE",pause_button_panel.pos_x,pause_button_panel.pos_y,COLOR_RED);
		}
		else//not
		{
			//resume video 
			media_start(vid_handle);
			
			//hide pause button
			reset(pause_button_panel,SHOW);
		}
		wait(1);
	}
}




Re: Video Panel System [Re: Emre] #480734
07/06/20 08:48
07/06/20 08:48
Joined: Jan 2012
Posts: 108
G
gamers Offline OP
Member
gamers  Offline OP
Member
G

Joined: Jan 2012
Posts: 108
Thanks Emre!
I examined the example you shared. Based on this example, I can create the structure I want. Thank you again for your contributions laugh

Re: Video Panel System [Re: gamers] #480735
07/06/20 09:39
07/06/20 09:39
Joined: Jul 2007
Posts: 619
Turkey, Izmir
Emre Offline
User
Emre  Offline
User

Joined: Jul 2007
Posts: 619
Turkey, Izmir
I'm happy to help. smile


Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1