ParallelGraphics Forums
Authoring Tools
You are here:
[Forums]
::
[Authoring Tools]
All forums
How to use forums
Favorites
Services
Registration
Registration
Forgot your password?
Help
Help
Support
Quick search
Subscribe to newsletters
email:
password:
Authoring Tools
[reply]
[back to forum]
[new message]
[all forums]
Subject:
sound nodes conflicting issue-help needed ASAP
Sender:
dangrig@psu.edu
28.06.03 12:43
Hi all, I am trying to add a sound node
in an already complex wrl, which contains
several user tracking timers and sensors.
The world already has a sound in it, and
when the file loads in the browser with
the .wav file, the sound starts for a
sec, then stops, apparently right when
the first proximity sensor starts (this
is a proximity sensor that send data if
and when the user passed a certain object
in the world). Can anyone help me with
this, telling me what's conflicting?
Here's the main wrl (I can send a zip
folder with all resources for anyone
willing to help). Any help would be
appreciated, as i'm pressured undera
deadline by this coming Monday. Thanks a
lot. Here's the main wrl:
#VRML V2.0 utf8
EXTERNPROTO REACTION_TEST
[
eventOut SFTime reactionTime
eventIn SFTime startTest
eventIn SFVec3f viewerPosition
eventIn SFRotation
viewerOrientation
exposedField SFTime testDuration
exposedField SFVec3f
testPositionOnCarpet
] "PROTO_TEST_CARPET.wrl#REACTION_TEST"
EXTERNPROTO ADD_VIEW_TEST
[
eventOut SFTime addViewTime
exposedField MFString url
field SFInt32 AddId
exposedField SFVec3f visSensorSize
]"PROTO_TEST_VIEW.wrl"
NavigationInfo {
type ["WALK"]
#avatarSize [0.25, 1.6, 0.75]
}
Transform {children [Inline {url "43.
wrl"}]} #put your world geometry here
Transform { scale 1 1 1 #scale your
test for the world size
children [
DEF ViewerLocator
ProximitySensor {
size 1000 1000 1000 #has to
cover all world!
}
DEF ReactionTest REACTION_TEST {
testDuration 5 #should be
over before the next test starts
testPositionOnCarpet -.2 0 -.
6 #play with box position here
# or remove testPositionOnCarpet.
.. and control it in PROTO
}
DEF TS1 TimeSensor {
startTime 0
cycleInterval 180
}
DEF Load_Script1 Script {
eventIn SFBool
bolean1
url "javascript:
function
bolean1(check){
if(check == FALSE)
Browser.loadURL(new
MFString('
http://www.personal.psu.
edu/users/d/m/dmg261/15070p/q/slp13.
html'),new MFString('target=_top'));
}
"
}
DEF WorldTimer TimeSensor {
loop TRUE
startTime 0
cycleInterval 60 #start test
each 60 seconds
}
DEF WorldScript Script {
eventIn SFFloat
current_fraction
field SFFloat prev_
fraction 0
eventOut SFTime startN
extReactionTest
url "JavaScript:
function current_fraction (value,
time){
if(value < prev_fraction) {
startNextReactionTest = time;
}
prev_fraction = value;
}
"
}
DEF GetReactionData Script {
field MFString cone
Func ""
eventIn SFTime onCo
neClick
url "JavaScript:
// send the time that it took
the user to click the box to javascript
function onConeClick(value,
time) {
var reflexTime = value;
coneFunc[0] = 'javascript:
trackConeClick('+reflexTime+');';
Browser.loadURL(coneFunc,
new MFString());
}"
}
Sound {
source DEF OpenPara1 AudioClip
{url "paragraph1.wav"}
}
Transform
{
#translation 8.25341 1.2581 2.3835
translation 79.8973 -18.4867 95.3406
scale 80 80 80
#rotation -90 0 -135
rotation -0.28 -0.68 -0.68 2.59
children
[
DEF AddViewTest1 ADD_VIEW_TEST {
url "8810scaled/8810_scaled.wrl"
visSensorSize 1 1 1
AddId 1
}
]
}
Transform {
scale 2.47757 2.47757 2.47757
#rotation 0 -45 0
rotation 0 -1 0 0.79
translation 35.2513 -15.1568 29.2237
children
[
DEF AddViewTest2 ADD_VIEW_TEST {
url "bmw/bmw_reflect.wrl"
visSensorSize 1 1 1
AddId 2
}
]
}
Transform {
scale 0.189996 0.189996 0.
189996
translation 4.70816 -8.05509
-6.16914
#rotation 90 0 0
rotation 1 0 0 1.57
children
[
DEF AddViewTest3 ADD_VIEW_TEST {
url "pepsi_can_3ds/pepsi can.wrl"
visSensorSize 1 1 1
AddId 3
}
]
}
Transform
{
scale 0.0120343 0.0120343 0.
0120343
#rotation 90 0 90
rotation 0.58 -0.58 0.58 2.09
translation -40.4684 -7.29453
-23.3718
center 0 0 0
children
[
# any of the solar panels should be
ImageTextured on this billboard, and
perhaps 2-4 copied and spread through the
worlds
#right now, there's a Pepsi banner on
it.I gave up the ads as banners in this
study, will do it for a follow up to this
some other time
# tehre also needs to have rotation,
where necessary, eg., the BMW is rotated
but for some reason I couldn't type
rotation under translation of the
Tranform
DEF AddViewTest4 ADD_VIEW_TEST {
url "billbrds_3ds/billbrd2bmw.wrl"
visSensorSize 1 1 1
AddId 4
}
]
}
Transform
{
#translation 8.25341 1.2581 2.3835
translation 28.6448 13.9859 77.8253
scale 0.0332371 0.0332371 0.0332371
#rotation 90 0 -180
rotation 0 0.71 -0.71 3.14
children
[
DEF AddViewTest5 ADD_VIEW_TEST {
url "billbrds_3ds/billbrd2solar.
wrl"
visSensorSize 1 1 1
AddId 5
}
]
}
Transform {
scale 0.0332371 0.0332371 0.
0332371
#rotation 90 0 -180
rotation 0 0.71 -0.71 3.14
translation -67.2642 -11.1295 -11.
6973
children
[
DEF AddViewTest6 ADD_VIEW_TEST {
url "billbrds_3ds/billbrd2pepsi.
wrl"
visSensorSize 1 1 1
AddId 6
}
]
}
Transform {
scale 0.0332371 0.0332371 0.
0332371
translation 34.945 -11.1295
-16.3735
#rotation 90 0 -90
rotation 0.58 0.58 -0.58 2.09
children
[
DEF AddViewTest7 ADD_VIEW_TEST {
url "billbrds_3ds/billbrd2nokia.
wrl"
visSensorSize 1 1 1
AddId 7
}
]
}
Transform
{
translation 1.49596 -21.8904 124.16
scale 5 5 5
#rotation 97 -86 -113
rotation 0.69 0.21 -0.69 3.46
children
[
# any of the solar panels should be
ImageTextured on this billboard, and
perhaps 2-4 copied and spread through the
worlds
#right now, there's a Pepsi banner on
it.I gave up the ads as banners in this
study, will do it for a follow up to this
some other time
# tehre also needs to have rotation,
where necessary, eg., the BMW is rotated
but for some reason I couldn't type
rotation under translation of the
Tranform
DEF AddViewTest8 ADD_VIEW_TEST {
url "solar panels/solarpanel.wrl"
visSensorSize 1 1 1
AddId 8
}
]
}
#ADD Script for SQL here
DEF GetVisibilityData Script {
field MFString visbFun
c ""
eventIn SFTime onVi
sibility
url "JavaScript:
// send the object id to the
server..
function onVisibility(value,
time) {
visbFunc[0] =
'javascript:trackAddVisibility('+value+')
;';
Browser.loadURL(visbFunc,
new MFString());
}"
}
]}
ROUTE AddViewTest1.addViewTime TO
GetVisibilityData.onVisibility
ROUTE AddViewTest2.addViewTime TO
GetVisibilityData.onVisibility
ROUTE AddViewTest3.addViewTime TO
GetVisibilityData.onVisibility
ROUTE AddViewTest4.addViewTime TO
GetVisibilityData.onVisibility
ROUTE AddViewTest5.addViewTime TO
GetVisibilityData.onVisibility
ROUTE AddViewTest6.addViewTime TO
GetVisibilityData.onVisibility
ROUTE AddViewTest7.addViewTime TO
GetVisibilityData.onVisibility
ROUTE AddViewTest8.addViewTime TO
GetVisibilityData.onVisibility
#ROUTE AddViewTest.addViewTime TO
GetReactionData.onConeClick
#ROUTE AddViewTest4.addViewTime TO
StartSoundSpot.startTime
#ROUTE AddViewTest4.
ROUTE ViewerLocator.
position_changed TO ReactionTest.
viewerPosition
ROUTE ViewerLocator.
orientation_changed TO ReactionTest.
viewerOrientation
ROUTE WorldTimer.
fraction_changed TO WorldScript.
current_fraction
ROUTE WorldScript.startNextReactionTest
TO ReactionTest.startTest
ROUTE ReactionTest.reactionTime
TO GetReactionData.onConeClick
#ROUTE ViewerLocator.startTime TO TS1.
set_startTime
ROUTE ViewerLocator.enterTime TO TS1.
set_startTime
ROUTE TS1.isActive TO Load_Script1.
bolean1
#ROUTE TS1.startTime TO OpenPara1.
startTime
(the problematic sound is "OpenPara1".
THanks again.
[reply]
[back to forum]
[new message]
[all forums]
sound nodes conflicting issue-help needed ASAP
/
dangrig@psu.edu
/ 28.06.03 12:43
Messages in thread:
1
[reply]
[back to forum]
[new message]
[all forums]
© 1998-2007
ParallelGraphics
. All rights reserved.
Terms of use
.