How to Stop a Video Clip On the Last Frame?

This forum is meant for requesting technical support or reporting bugs.

Moderators: time-killer-games, Vengeance66, Candle, reneuend, GM-Support

How to Stop a Video Clip On the Last Frame?

Postby 3dgamer » Sun Dec 28, 2008 5:14 am

Is there a way to have a video clip play to the end and then stop and stay on the last frame? All the video clips I use jump back to the first frame. :( I notice that this doesn't seem to happen in the 360 Panorama tutorial game, but I have looked all over the frame and hotspot properties and can't seem to find what is being used to make this work.

Is there a non-script/non-code way to fix this issue? If there is only a scripted way of doing this, could someone please share what that code is and where to place it in the game file?

TIA!
3DGamer
User avatar
3dgamer
Expert Member
 
Posts: 301
Joined: Mon Dec 15, 2008 7:12 am

Postby Lyberodoggy » Sun Dec 28, 2008 6:32 pm

In the panorama plugin there's a whole rendering code used for the video which can locate its frames separately... This can't be done in AM but you can capture the last frame and have it load as a hotspot as soon as the video stops
User avatar
Lyberodoggy
Administrator
 
Posts: 2526
Joined: Sat Feb 17, 2007 3:31 pm
Location: Athens

Postby 3dgamer » Mon Dec 29, 2008 7:19 am

That's a great idea. Thanks or the tip, Lyberodoggy. :)

Just one thing; you mentioned, "capture the last frame and have it load as a hotspot as soon as the video stops". I am a real newb with AM so please bare with me. I am trying to figure out how to do this. I believe I need to create a variable which I have, but I don't know how to link the last frame image with the hotspot and make it appear only at the *end* of the video. So far, I have used the "Hotspot appearance" feature to associate the image with the hotspot, but that is not working as I had hoped (I keep seeing the image in the corner even before the video is running.)

How should I be setting this up so that a hotspot can reveal an image at the end of a video clip, when the hotspot is not clicked?

TIA
3DGamer
User avatar
3dgamer
Expert Member
 
Posts: 301
Joined: Mon Dec 15, 2008 7:12 am

Postby 3dgamer » Mon Dec 29, 2008 8:15 am

Okay, I think I figured some of it out. I needed to make an adjustment to the hotspot so it could be placed more accurately in the frame.

Right now I am trying to fine tune the hotspot placement so it will exactly match when at the end of the video. I'll let you know how that goes.

Thanks!
3DGamer
User avatar
3dgamer
Expert Member
 
Posts: 301
Joined: Mon Dec 15, 2008 7:12 am

Postby juhuwoorps » Mon Dec 29, 2008 8:44 am

You can use the move-command in the Advanced Tab place a hotspot on the right place.
juhuwoorps
Code Master
 
Posts: 622
Joined: Tue Jul 08, 2008 3:13 pm

Postby Lyberodoggy » Mon Dec 29, 2008 9:25 am

You can just externally capture the last frame into a bitmap using a video editor like windows movie maker, then create the hotspot over the video-playing area and go under variables, create an integer named video_played and have the hotspot appear only if this variable equals 1

Then got to wherever you trigger the video from and add this to advanced:
Action.CreateTimedEvent videoduration,"video_played=1",False
where you must replace videoduration with the actual duration of the video (either count the seconds and experiment, or right click the file and check there for it)
User avatar
Lyberodoggy
Administrator
 
Posts: 2526
Joined: Sat Feb 17, 2007 3:31 pm
Location: Athens

Postby 3dgamer » Wed Dec 31, 2008 9:16 am

juhuwoorps wrote:You can use the move-command in the Advanced Tab place a hotspot on the right place.


Hi juhuwoorps,

Thanks for the suggestion. Since I am new to VBS, I'll see about checking out this advanced code feature a bit later.

Thanks.
3DGamer
User avatar
3dgamer
Expert Member
 
Posts: 301
Joined: Mon Dec 15, 2008 7:12 am

Postby 3dgamer » Wed Dec 31, 2008 9:35 am

Hi Lyberodoggy,

Lyberodoggy wrote:You can just externally capture the last frame into a bitmap using a video editor like windows movie maker, then create the hotspot over the video-playing area and go under variables, create an integer named video_played and have the hotspot appear only if this variable equals 1



Okay, I was able to figure this out earlier, so thanks for confirming that I am at least on the right track. :)


Lyberodoggy wrote:Then got to wherever you trigger the video from and add this to advanced:
Action.CreateTimedEvent videoduration,"video_played=1",False
where you must replace videoduration with the actual duration of the video (either count the seconds and experiment, or right click the file and check there for it)


Hmm, I am not understanding quite where this fits in. I did try this, but saw no change. I read in the reference guide that this action "dynamically creates a timed event, which is an event that must occur either after a time has elapsed, or every X seconds... where CODE is the VBScript code that must be executed after X seconds..." I am trying to understand what I should be seeing and what should be triggered *after* this duration of time?

Btw, is there an Action where I can play a video for only a certain amount of time?

Thanks.
3DGamer
User avatar
3dgamer
Expert Member
 
Posts: 301
Joined: Mon Dec 15, 2008 7:12 am

Postby Lyberodoggy » Wed Dec 31, 2008 10:12 am

No there's not an action but you can use the PlayVideo procedure I 've given you in another post and then
createTimedEvent stoptime,"StopVideo",False

As for the previous code, for it to work you must go to the variables tab of the hotspot that appears as the last frame of the vid and have it appear only if video_played equals 1. You must also create the integer variable called video_played. If you have problems with this there's the alternative of loading the picture in the hotspot

Action.CreateTimedEvent videoduration,"Action.LoadAPicture Hotspot(REPLACE_ME),""GRAPHICSFILENAME.extention""",false
User avatar
Lyberodoggy
Administrator
 
Posts: 2526
Joined: Sat Feb 17, 2007 3:31 pm
Location: Athens

Postby 3dgamer » Wed Dec 31, 2008 10:57 am

Okay, thanks, Lyberodoggy for the additional info. I'll look into this and see if I can get it to work with your extra notes. I'll let you know how things go.
3DGamer
User avatar
3dgamer
Expert Member
 
Posts: 301
Joined: Mon Dec 15, 2008 7:12 am

Postby mercedes » Thu Jan 01, 2009 12:49 am

Action.CreateTimedEvent videoduration,"Action.LoadAPicture Hotspot(REPLACE_ME),""GRAPHICSFILENAME.extention""",false


It's a shame something like this couldn't work for the music...being a "sound duration"...Also you can use it in a timed event..where as sound u can't..?

I'm refering to the question Mystery asked in the forum ...come across this and made me think...why this won't work for that..?

Peace..
User avatar
mercedes
VIP
 
Posts: 2460
Joined: Sun Mar 09, 2008 10:43 pm
Location: Canada..~

Postby 3dgamer » Thu Jan 01, 2009 10:41 pm

mercedes wrote:
Action.CreateTimedEvent videoduration,"Action.LoadAPicture Hotspot(REPLACE_ME),""GRAPHICSFILENAME.extention""",false


It's a shame something like this couldn't work for the music...being a "sound duration"...Also you can use it in a timed event..where as sound u can't..?

I'm refering to the question Mystery asked in the forum ...come across this and made me think...why this won't work for that..?

Peace..


Is this a feature that could be added in AM by the developers, or is this just the nature/limitation of VBS?
3DGamer
User avatar
3dgamer
Expert Member
 
Posts: 301
Joined: Mon Dec 15, 2008 7:12 am

Postby Lyberodoggy » Thu Jan 01, 2009 10:42 pm

we don't know yet. Probably just a fixable bug
User avatar
Lyberodoggy
Administrator
 
Posts: 2526
Joined: Sat Feb 17, 2007 3:31 pm
Location: Athens


Return to Adventure Maker Technical Support and Bug Reports

Who is online

Users browsing this forum: No registered users and 0 guests