How do you loop...

For questions about using Classic.

Post » Mon Dec 14, 2009 11:25 pm

... an AVI file continuously? I'm trying to get it to repeat infinitely in the same window. I've tried the repeat command, but nothing seems to work. It just plays once and stops.

In MMF2 I remember the event to make an AVI loop was:

(AVI): End of video ->
*(AVI) Goto beginning
*(AVI) Play forward


But I can't find an equivalent to that in Construct :-(
B
2
G
3
Posts: 42
Reputation: 934

Post » Tue Dec 15, 2009 1:19 am

I figured this out. In events, you have to go under:

-System

-Every X Ticks

And then figure out how many ticks the video is. It will automatically loop at that point. I actually used "Every X Ticks" as my beginning event for this layout page in order to make this work. I'm not sure if this will cause any conflict down the road for this particular layout page, but for now it's working.

Perhaps this information was unknown, because when I searched there was another thread on this from last year that had no replies but hundreds of views. If so, this might be a starting point for information on how to loop video in Construct.
B
2
G
3
Posts: 42
Reputation: 934

Post » Tue Dec 15, 2009 2:08 am

I think it would be wiser to use "Every X Milliseconds". Assuming you have V-Sync enabled, "Every X Ticks" could produce different results on different computers, because 1 tick is equal to 1 frame.

For example, if you have a monitor refresh rate of 60hz and setup your game accordingly, anybody who has a different refresh rate -- for example, 75hz, 80hz, 120hz, etc... -- would run into the problem of the video looping before it's even over.

Using "Every X Milliseconds" would remedy this. Plus, finding the amount of milliseconds would be just easy, if not easier, than finding the amount of ticks.
Moderator
B
97
S
36
G
19
Posts: 1,584
Reputation: 17,692

Post » Tue Dec 15, 2009 3:26 am

It was really easy for me to figure out the ticks, but I didn't consider compatibility issues with that. Thanks for that info linkman.

The one thing I guess I have the luxury of at the moment is experimentation and also using my hardware to the max, since this will only be a prototype run on my machine and recorded for demonstration purposes to show off a new technique in the Football genre. This is all phase 1. Phase 2 will be a publicly playable prototype, so compatibility will be a serious concern at that point but I'll have all of those loose ends tied up by then.
B
2
G
3
Posts: 42
Reputation: 934

Post » Tue Dec 15, 2009 2:35 pm

A Fix for the control bar issue!:

What I've found is that as long as your video is sized to 1920x1080 it's not visible! In smaller sizes however, it'll still be visible. I doubt we'd be able to get rid of it with smaller sizes without some kind of programming to the actual plugin. But if you're doing video at this resolution like I am, then you should be fine.

I'm going to keep trying to see if there is some kind of way to force resizing.
B
2
G
3
Posts: 42
Reputation: 934


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 2 guests