-
1. Re: Sound fade out syntax?
SeanWilson Mar 16, 2010 4:25 PM (in response to onefiftymph)Check the docs. You need to provide a sound channel object and the milliseconds you want to fade over. So, assuming your sound is playing in channel 1, it might be
on exitFrame me -- your 5 * 60 looks like a 'ticks' value -- in which case it's 5 seconds or 5000 ms sound(1).fadeOut(5000) end
-
2. Re: Sound fade out syntax?
onefiftymph Mar 16, 2010 7:33 PM (in response to SeanWilson)Thanks so much Sean. Since that seemed to be so easy...;0)..... here's my next old script that doesn't work:
on mouseDown
set the membernum of sprite 34 to 6
puppetsound "snap1"
updatestage
repeat while the mousedown
nothing
end repeat
end
on mouseUp
puppetsound "snap8"
set the membernum of sprite 34 to 5
updatestage
if rollover(34) then
go next
end if
end
This used to work well for what I'm doing.... I tried making it on mouseDown me and on mouseUp me, but that didn't do it...
Would appreciate some pointers... thanks.
-
3. Re: Sound fade out syntax?
SeanWilson Mar 16, 2010 8:54 PM (in response to onefiftymph)Try:
on mouseDown me sprite(34).member = member(6, 1) sound(1).play( member("snap1") ) _movie.updateStage() repeat while _mouse.mouseDown nothing end repeat end on mouseUp me sprite(34).member = member(5, 1) sound(1).play( member("snap8") ) _movie.updateStage() if _movie.rollover(34) then go next end if endNote: it's better to name members and then refer to them by name instead of number ( for example: member(6, 1) ) because if they are named you can move them anywhere in the castLib without breaking your code, but if they are referred to by number they have to stay where they are.
-
4. Re: Sound fade out syntax?
onefiftymph Mar 16, 2010 11:29 PM (in response to SeanWilson)hmmm....doesn't seem to work any better....just doesn't wanna "go next"... ornery i s'pose...
-
5. Re: Sound fade out syntax?
SeanWilson Mar 17, 2010 12:29 PM (in response to onefiftymph)Sorry - I didn't understand that it was the go() command that was giving you problems. Time for some debugging - refer to your message window for output:
on mouseDown me
sprite(34).member = member(6, 1)
sound(1).play( member("snap1") )
_movie.updateStage()
repeat while _mouse.mouseDown
nothing
end repeat
end
on mouseUp me
sprite(34).member = member(5, 1)
sound(1).play( member("snap8") )
_movie.updateStage()
put "rollOver:", _movie.rollOver()
if _movie.rollover(34) then
put "frame before:", the frame
_movie.goNext()
put "frame after:", the frame
end if
end

