PDA

View Full Version : Slideshow using Video seek or current position



Carlos
02-19-2004, 01:49 PM
Hi all!

Can this be done?

I need to ceate a slideshow type app that uses the video seek or position times to show a specific image.

The images (300+) would be on one page and a video will play throughout, uniterrupted. I want to therefore use the video seek times to show and hide the relevant image.

If it can be done, any ideas how or other suggestions welcome?

Thanks in advance.:confused:

octane6228
02-19-2004, 02:01 PM
Hi...I created a play button and attached a page timer that starts when its clicked on.

--Use a page timer (increments 1 second at a time)

Page.StartTimer(1000);



--Then in the page properties under "On Timer" I put the following...


time = MediaPlayer.GetCurrentPos("Plugin1");

if time == 0 then
Image.Load("Image1", "AutoPlay\\Images\\Graphic1.jpg");
elseif time > 0 and time < 5 then
Image.Load("Image1", "AutoPlay\\Images\\Graphic1.jpg");
elseif time > 5 and time < 10 then
Image.Load("Image1", "AutoPlay\\Images\\Graphic2.jpg");
elseif time > 10 and time < 15 then
Image.Load("Image1", "AutoPlay\\Images\\Graphic3.jpg");
end



It will switch between the images at the different times, in this example it switches at 0, 5, 10 seconds.

Hope this helps..

Carlos
02-19-2004, 03:20 PM
Thanks Octane, I will try it out.

Carlos
02-20-2004, 12:58 AM
Thanks Octane it works well!

Is there a reason why the == does not work and have to use < and > ?

It works well though, thanks.

octane6228
02-20-2004, 07:28 AM
Hi...Glad it works for you...

The reason for the "> 0 and time < 5" instead of == is so that the graphic stays up for that duration, in this case graphic 1 stays up for 5 seconds before switching to graphic 2 at the 5 second mark, which stays up betweeen 5 and 10 seconds (5 seconds) etc....

Hope that helps..

Carlos
02-20-2004, 05:51 PM
:confused: Of course...! Sorry, had a moment there!

Thanks again.

medvedek
01-30-2005, 04:00 AM
hi i tried to do this but it doesn't work. i put 30 piuctures on one page and copied the text you have written under on timer event on page properties and created a button for play. but when i start app a gett error message on timer, line 1 attempt to index global "media player" (a nil value)

tnx

longedge
01-30-2005, 05:00 AM
medvedek - I think there may be some confusion.

If I've read this correctly, Carlos has got two items on his page -

1. A video that runs all the time.
2. An image object.

The video is being 'monitored' and depending on how far it has played different pictures are loaded into the image object.

The error you are getting is because you probably don't have a media player plugin object there so the reference isn't valid.

shariya
03-28-2005, 11:51 PM
Hello my Friends, I need you help .

i tried to do this like mr.medvedek but it doesn't work too.
i put 3 pictures on one page and make modify octane6228's script under on timer event on page properties like this.

--Then in the page properties under "On Timer" I put the following...
time = MediaPlayer.GetCurrentPos("Plugin1");

if time == 0 then
Image.Load("Image1", "AutoPlay\\Images\\Graphic1.jpg");
elseif time > 0 and time < 3 then
Image.Load("Image1", "AutoPlay\\Images\\Graphic1.jpg");
elseif time > 3 and time < 5 then
Image.Load("Image1", "AutoPlay\\Images\\Graphic2.jpg");
elseif time > 5 and time < 7 then
Image.Load("Image1", "AutoPlay\\Images\\Graphic3.jpg");
end


because in this case I experiment with 7-8 second video long.

and created a button for play the video.and add a script

--Use a page timer (increments 1 second at a time)
Page.StartTimer(1000);


but when i start app, I get error message "on timer, line 4 attempt to index global "media player" (a nil value)."

i am sure that i am install media player object plugin oready.

I try to do this about 5 hour it still not work.
Please help me, am very appreciate your help.
this is my project.please take a look.

http://www.geocities.com/shariya_phd/Project.zip

thank you , my friend.

shariya
03-28-2005, 11:55 PM
above link may be broken.

please used this link

http://geocities.com/shariya_phd/Project.zip

shariya
03-29-2005, 12:06 AM
when i try to download my file it fail. :eek:
the above two link still broken. :huh
because when I click it. it jump to

http://geocities.com/shariya_phd/Project.zip

Please delete the word "us.share." then you get a file. :p
I try to upload it to IR forum many time but it fail.

thank you.my friend.

shariya
03-29-2005, 04:38 AM
am still need your help. :lol
as i mention above,this is an example i try to achieve.
yes , it a nice work. I made it by a programe name "talkingslide"
but i want to build it in AMS cause a consisten in design
and loading time.

a programe name "talkingslide" can export to .exe and .html
i dont want to use it because i can't control it in side AMS runtime
and in .html extention am not want to use it because it need a loading time.

i think an application like this,can be made by ams. but need a hardcore scripting to do. I am a newbie and need you help.

any help is appreciate. thank you

yosik
03-29-2005, 08:46 AM
Shariya,
You are using a video object on your page, but the action in the onTimer event calls for a mediaplayer pluging object.
If you change your action to Video.GetCurrentPosition instead, it will work. It DOES work!!

Yossi

shariya
03-29-2005, 09:18 AM
****, yosik
thank for you help :D
when i chang

time = MediaPlayer.GetCurrentPos("Plugin1");

to

time = Video.GetCurrentPos("Plugin1");

i don't see an error but the i mage don't load ? :huh


please ,help me again

shariya
03-29-2005, 09:26 AM
oh .... i see , yosik :wow

i must chang ("Plugin1"); to ("Video1"); too :p

it work now, thank yosik. :D
you safe my life. :lol

yosik
03-29-2005, 02:19 PM
Glad to be of help. ;)

Yossi