Gamestudio Links
Zorro Links
Newest Posts
Trouble getting data with IB Gateway
by richs. 07/16/20 03:12
Futures with IB
by jbhunter. 07/16/20 01:08
A9
by 3run. 07/15/20 19:07
Maximum Value
by AndrewAMD. 07/15/20 12:50
What are you working on?
by NeoDumont. 07/14/20 23:06
Engine window and DPI scaling
by Dooley. 07/14/20 20:27
AUM Magazine
Latest Screens
The Space Between
Pogostuck: Rage With Your Friends
Worst Case Z
AckCon'18 - Lotter vs the World 2 - Preview Release
Who's Online Now
10 registered members (3run, AndrewAMD, richs, kvm, onoff, Michael_Schwarz, Quad, 20BN, JeyKey II, FLD), 385 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Estripa, nowater, dasanc, DavidFdez, TraderKevin
18478 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: 79
G
gamers Offline OP
Junior Member
gamers  Offline OP
Junior Member
G

Joined: Jan 2012
Posts: 79
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: 673
Germany
Ayumi Offline
User
Ayumi  Offline
User

Joined: Oct 2008
Posts: 673
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: 79
G
gamers Offline OP
Junior Member
gamers  Offline OP
Junior Member
G

Joined: Jan 2012
Posts: 79
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: 570
Turkey, izmir
Emre Offline
User
Emre  Offline
User

Joined: Jul 2007
Posts: 570
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: 79
G
gamers Offline OP
Junior Member
gamers  Offline OP
Junior Member
G

Joined: Jan 2012
Posts: 79
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: 570
Turkey, izmir
Emre Offline
User
Emre  Offline
User

Joined: Jul 2007
Posts: 570
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