|
| Author | Message |
|---|
alain fondateur


Number of posts: 19534 Localisation: Dompierre sur Veyle ,France Registration date: 2005-04-19
 | Subject: sound Wed 22 Jul - 17:45 | |
| is it true that a mp3 begins to play at any moment , when entering a world ? ( I mean , not only at the begginning of the song ) I use that now , is there a better way ? | Code: | Shape { appearance Appearance { material Material { diffuseColor .06 .06 .06 } texture DEF sound MovieTexture {url "rutebeuf.mp3" startTime -1 loop FALSE } } geometry Box { size .001 001 001}} DEF vis VisibilitySensor { size 1000 1000 1000} ROUTE vis.isActive TO sound.loop ROUTE vis.enterTime TO sound.startTime |
|
|
 | |
peter le cochon +200

Number of posts: 913 Localisation: deutschland (sniff) Registration date: 2005-05-28
 | Subject: Re: sound Wed 22 Jul - 19:57 | |
| Hi, how are your holidays going? MovieTexture (the standard node) has got an event out that might help you : eventOut SFTime duration_changed This event-out is fired by the movie-texture each time the media has been loaded. Example : | Code: | #VRML V2.0 utf8 Shape { appearance Appearance { material Material { diffuseColor .06 .06 .06 } texture DEF sound MovieTexture{ url "rutebeuf.mp3" startTime -1 loop FALSE } } geometry Box { size .001 001 001} }
DEF S Script {
eventIn SFTime media_loaded eventOut SFTime launch_media
url "javascript: function media_loaded(_data,t){ launch_media=t; } "
} ROUTE sound.duration_changed TO S.media_loaded |
Well, I guess it should help to start the media when it's loaded.
TC
 _________________ everybody is a stranger almost everywhere
|
|
 | |
alain fondateur


Number of posts: 19534 Localisation: Dompierre sur Veyle ,France Registration date: 2005-04-19
 | Subject: Re: sound Wed 22 Jul - 20:30 | |
| OK thanks , I arranged it LOL with .0001 .0001 .0001  | Code: | Shape { appearance Appearance { material Material { diffuseColor .06 .06 .06} texture DEF sound MovieTexture{ url "rutebeuf.mp3" startTime -1 loop FALSE}} geometry Box { size .0001 .0001 .0001}} DEF S Script { eventIn SFTime media_loaded eventOut SFTime launch_media url "javascript: function media_loaded(_data,t){ launch_media=t; } " } ROUTE sound.duration_changed TO S.media_loaded |
and adding : ROUTE S.launch_media TO sound.startTime
but how you get it loop ?
btw it begins at the beginning LOL , thanx
my holidays ?
guys must be asked in december 1995 to keep my dog , ( chenil )
and as I asked today to have Choupi kept 2 days to being free for a short 2 days trip with Bertrand , they told me
" we have no place for your dog until august 20" !! LOOL
so I will stay a slave on 3DSmax )
( until it works , it is a trial LOl (( |
|
 | |
peter le cochon +200

Number of posts: 913 Localisation: deutschland (sniff) Registration date: 2005-05-28
 | Subject: Re: sound Wed 22 Jul - 22:15 | |
|  ...  ... oups ... yes Here is a working example : It starts looping once the media file has been loaded, never mind if the shape is being rendered or not. You don't need to give it a material, neither you need to give it a visible size ( 0 0 0 will be OK). I have added a NavigationInfo, so BS-Contact (bleurk!!!) does not start in "EXAMINE" mode, and I have added a Viewpoint, backing the shape, so you don't render it at start-up. The problem was in the startTime and stopTime ... | Code: | #VRML V2.0 utf8
NavigationInfo {
type ["FLY","ANY"]
}
Viewpoint {
position 0 0 -100
}
Shape {
appearance Appearance {
texture DEF sound MovieTexture{ url "rutebeuf.mp3"
loop FALSE } }
geometry Box {size 0 0 0} }
DEF S Script {
eventIn SFTime media_loaded eventOut SFTime launch_media eventOut SFBool set_loop url "javascript:
function media_loaded(_data,t){ launch_media=t; set_loop=true; } " } ROUTE sound.duration_changed TO S.media_loaded ROUTE S.launch_media TO sound.startTime ROUTE S.set_loop TO sound.loop
|
TC  _________________ everybody is a stranger almost everywhere
|
|
 | |
alain fondateur


Number of posts: 19534 Localisation: Dompierre sur Veyle ,France Registration date: 2005-04-19
 | Subject: Re: sound Wed 22 Jul - 23:09 | |
| merci dear , Peter : ) btw I found by hazard a song from Léo Ferré , I adore , and Joan Baez perform here . I had put it in what I was playing with to day , a sketch , http://mixed3d.free.fr/alain/maps/galerielightmapsportejourptr.wrlBtw it took me 1/2 second to get that rutebeuf.mp3 LOL  and it begins at the beginning , but where is a loop ? argg moment I reedit too soon LOL - sorry to bore you  |
|
 | |
peter le cochon +200

Number of posts: 913 Localisation: deutschland (sniff) Registration date: 2005-05-28
 | Subject: Re: sound Wed 22 Jul - 23:18 | |
|  ... sorry, my fault. I did not expect you being awake so late, so I have been editing and re-editing the code ... Just try the code of my previous post again. I have recently added a new eventOut to the script (set_loop) ... it sets loop TRUE. Desoleé  _________________ everybody is a stranger almost everywhere
|
|
 | |
alain fondateur


Number of posts: 19534 Localisation: Dompierre sur Veyle ,France Registration date: 2005-04-19
 | Subject: Re: sound Wed 22 Jul - 23:24 | |
| very OK http://mixed3d.free.fr/alain/maps/galerielightmapsportejourptrok.wrlthanks  some years ago I had an ancient pupil who was playing on LouiZe One time she invited us to that sort of game : one had to upload on the forum one photo he took , in less than 1 minute , etc We have to do that with coding LOL ( I was supposed to watch "Big Fish" of Tim Burton , with Bertrand , on a CD , but I am not patient to sit on a chair , LOL , .... he is mad at me  btw it is an excellent movie  |
|
 | |
peter le cochon +200

Number of posts: 913 Localisation: deutschland (sniff) Registration date: 2005-05-28
 | Subject: Re: sound Wed 22 Jul - 23:36 | |
| Last question for today : Why does Joan Baez speak french more like Edit Piaff than like Colin McKinlay? Last recomendation for today : Take "Choupy" ... or however your killer-dog (le chien assasin) is called ... with you, to wherever you go for holidays. Enjoy.  _________________ everybody is a stranger almost everywhere
|
|
 | |
alain fondateur


Number of posts: 19534 Localisation: Dompierre sur Veyle ,France Registration date: 2005-04-19
 | Subject: Re: sound Wed 22 Jul - 23:48 | |
| I dont remember why I jumped on that today <embed src="http://www.youtube.com/v/RD_uWZthSmk&hl=fr&fs=1&" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed> ah ! yes I remember now ! it is because I found Cecile Muller , today , on my Facebook . So I "joked " about "amis disparus" , and it remembered me "Rutebeuf " , and I went to Google etc  | Quote: | Les maux ne savent seuls venir; Tout ce qui m'était à venir M'est advenu. Que sont mes amis devenus Que j'avais de si près tenus Et tant aimés ? Je crois qu'ils sont trop clairsemés Ils ne furent pas bien semés Ils m'ont failli. De tels amis m'ont bien trahi Lorsque Dieu m'a assailli De tous côtés. N'en vit un seul en mon logis Le vent je crois, me les a pris, L' amour est morte. Ce sont amis que vent emporte, Et il ventait devant ma porte Les emporta. |
Then I added the song in the 3D sketch I was working on 
that is working with no reason LOL
and , I guess that Joan loved french culture , as many did before this stupid 21ème century LOL
ps : dogs not allowed in Venise 
good night for now 
and re thanx  |
|
 | |
X +200


Number of posts: 496 Age: 63 Localisation: Canada Registration date: 2005-05-09
 | Subject: Nyah, nyah, nyah. nyah, nyah! Thu 23 Jul - 3:00 | |
| | Quote: | | Why does Joan Baez speak french more like Edit Piaff than like Colin McKinlay? |
--- the same reason I speak English better than Celine Dion. Both these women studied alternate languages to increase their fan base. Their careers depended on it. So, there! Nyah, nyah, nyah. nyah, nyah! Give me a villa on the Mediterranean and I'll start speaking French better than both of them put together Nyah, nyah, nyah. nyah, nyah double nyah! pfft!  X |
|
 | |
|