Playing Video

For questions about using Classic.

Post » Sun Dec 28, 2014 11:33 pm

Message: Mr Lange can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
I think it goes without saying that the built in avi object is not a viable solution given the intrusive and irremovable user controls embedded in the player.

I need to play videos in my game, and there's no decent way to do that it seems.
I really need a plugin or something for this, but for now I've resorted to using the method given by this thread:
http://69.24.73.172/scirra/forum/viewtopic.php?f=8&t=7823
All three of these cap files half work and have some critical problem.

"video.cap" doesn't display any video, but plays audio.
"Movie.cap" works fine, but the video is always a fixed size and I don't know how to scale it.
"flash.cap" works (if I embed a video in an swf and play that) and scales with the size of the window which is what I need it to do, but there doesn't seem to be a way to remove the Flash player. Changing layouts doesn't remove it. Using windll.user32.DestroyWindow(hwnd) crashes the program entirely, giving me this error message:
Image

Probably not worth it to mess with video.cap. If there's a way to scale the video in the Movie.cap method or a way to safely remove the Flash player in the flash.cap method, that should solve my problem. Preferably I'd like to use Movie.cap because Flash is less likely to be compatible on other computers.

Help solving this problem would be much appreciated.
B
6
S
1
Posts: 15
Reputation: 530

Post » Mon Feb 09, 2015 1:02 pm

Message: Mr Lange can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
Bump. Still looking for help on this. Could someone possibly contact R0J0hound (https://www.scirra.com/users/r0j0hound) please? He's the one who created these methods.
I would myself, but this forum system prevents me from doing so.
B
6
S
1
Posts: 15
Reputation: 530

Post » Mon Feb 09, 2015 1:15 pm

You should still be able to tag people using the @ character, so to tag me for instance, you would use @zenox98.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
134
S
30
G
86
Posts: 5,413
Reputation: 59,510

Post » Mon Feb 09, 2015 5:04 pm

@Mr Lange
You need to destroy fwnd instead of hwnd. hwnd is the game window.
windll.user32.DestroyWindow(fwnd)

I don't know if any other cleanup may be needed.
B
92
S
32
G
109
Posts: 5,290
Reputation: 70,991

Post » Mon Feb 09, 2015 10:46 pm

This appears to be working. Thank you @R0J0hound.
I have a couple more questions.
One, is there a way to scale the video in Movie.cap?
Two, is there a way to dynamically scale the Flash window? For example, if I want the Flash window to scale with the size of the game window.
B
6
S
1
Posts: 15
Reputation: 530

Post » Mon Feb 09, 2015 11:58 pm

You can set the position and size of the video at any time with:
windll.user32.SetWindowPos(fwnd, 0, x, y, width, height, 0x4)

Here's all the nitty gritty about that function.
https://msdn.microsoft.com/en-us/librar ... 85%29.aspx
B
92
S
32
G
109
Posts: 5,290
Reputation: 70,991

Post » Tue Feb 10, 2015 12:32 am

Thank you, but how would I connect those to variables in Construct, such as a private variable, or the return value of an object's property?
B
6
S
1
Posts: 15
Reputation: 530

Post » Tue Feb 10, 2015 6:49 pm

Here's a general tutorial about that sort of thing:
http://69.24.73.172/scirra/forum/viewto ... lit=3D+box
B
92
S
32
G
109
Posts: 5,290
Reputation: 70,991


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 7 guests