Playing Video

This forum is currently in read-only mode.
  • 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:

    69.24.73.172/scirra/forum/viewtopic.php

    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:

    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.

  • 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.

  • You should still be able to tag people using the character, so to tag me for instance, you would use

  • 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.

  • This appears to be working. Thank you

    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.

  • 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

  • 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?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Here's a general tutorial about that sort of thing:

    http://69.24.73.172/scirra/forum/viewto ... lit=3D+box

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)