How do I play a video based on a slider

0 favourites
  • 4 posts
From the Asset Store
Explainer Video Sound Kit is an out of the ordinary, comprehensive sound effects toolkit.
  • Hi,

    I would like to create an effect similar to what is displayed here : http://codepen.io/ollieRogers/pen/lfeLc

    i.e. viewing a video based on a slider.

    To do so, I created a sliderBar, a video and the following code :

    On sliderBar value change -- > set video playtime to sliderBar.value/30

    The code works nicely, but in Construct's preview (Chrome) the result can't be used because I have around 1 or 2 frames per second.

    My video's weight is about 3M in WebM, and 10 Mb in H.264 Mpeg4. (1280x1080 - 300 frames)

    Any idea of what could be wrong and if I can achieve a better result?

    Thanks!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • As far as I can tell, all that is doing is set each image as it's own page frame then making the scroll bar unit of movement = 1 page. You might have to break up your movie into a bunch of images and put them on frames in a Sprite in Construct, then do a "On mouse wheel down: Sprite.setFrame(Sprite.currentFrame +1)" and "On mouse wheel up: Sprite.setFrame(Sprite.currentFrame -1)".

    I imagine there are plugins or external software that would help you break your movie into a sprite sheet.

    Your artwork on Healer Quest is charming too. Almost makes me wish I had a smart phone... but not quite.

  • gumshoe2029

    Thanks a lot for your ideas and sorry for the very late reply.

    Actually it is an image sequence from which I made an image sequence. The problem with the image sequence in a sprite is that if I'm correct, these images will be used uncompressed in the code, and thus very very heavy! And there are a lot of them... Around 300 actually, which would make using them as an image sequence in an object impossible.

    Thanks a lot for your kind words on Healer Quest! The good news is that a PC, Mac and Linux version of Healer Quest is under construction.

  • gumshoe2029

    Thanks a lot for your ideas and sorry for the very late reply.

    Actually it is an image sequence from which I made an image sequence. The problem with the image sequence in a sprite is that if I'm correct, these images will be used uncompressed in the code, and thus very very heavy! And there are a lot of them... Around 300 actually, which would make using them as an image sequence in an object impossible.

    Well, in subsequent research here, I found out that Sprites with frames are stored & used in compressed png sprite sheets with around 6-9 sprite frames per sheet. So, I think your fears may already be mitigated inherently in Construct.

    We are displaying around 30,000 to 90,000 sprites simultaneously on one layout with fully dynamic zoom and pan functionality and Construct has performed well so far under these loads. However, phones do not.

    Thanks a lot for your kind words on Healer Quest! The good news is that a PC, Mac and Linux version of Healer Quest is under construction.

    You are welcome, and best of skill in your effort.

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