QuickTime movie and sound

Hi!
I do want to skip in a movie to different positions and fade sound files in and out at the same time.
The movie has to stay in presentation mode all the time.
In my script the movie does not jump forward.
Can anybody hlep me?
Here is my script:


tell application "QuickTime Player"
	open file "Mac OS X:Users:rainerwarrings:Desktop:RYS08_DSCHUNGEL_FINAL:RYS08_RAUM1_FINAL:RYS08_1_FINAL.MOV"
	open file "Mac OS X:Users:rainerwarrings:Desktop:RYS08_DSCHUNGEL_FINAL:RYS08_AUDIO_FINAL:Raum1:AIFF:3_laufen.AIF"
	open file "Mac OS X:Users:rainerwarrings:Desktop:RYS08_DSCHUNGEL_FINAL:RYS08_AUDIO_FINAL:Raum1:AIFF:4_schwarzesLoch1.AIF"
	tell document 1
		set current time to 0
		set sound volume to 0
		play
		set sound volume to 256
	end tell
	
	tell document 3
		set pointX to current time
		set current time to 9471
		play
	end tell
	
	set vol2start to 256
	repeat with volChange from 0 to 256 by 32
		set vol2 to vol2start + (volChange * -1)
		delay 0.1
		tell document 2 to set sound volume to vol2
	end repeat
	tell document 2 to stop
		end tell

Thanks!
Rainer

Hallo Rainer,

on my machine everything works fine as expected, maybe it could help to reference the documents directly.
I also optimized the repeat loop for decreasing the sound volume


set baseFolder to ((path to desktop as text) & "RYS08_DSCHUNGEL_FINAL:")
tell application "QuickTime Player"
	set theMovie to item 1 of (open file (baseFolder & "RYS08_RAUM1_FINAL:RYS08_1_FINAL.MOV"))
	set Audio1 to item 1 of (open file (baseFolder & "RYS08_AUDIO_FINAL:Raum1:AIFF:3_laufen.AIF"))
	set Audio2 to item 1 of (open file (baseFolder & "RYS08_AUDIO_FINAL:Raum1:AIFF:4_schwarzesLoch1.AIF"))
	
	tell Audio2
		set current time to 0
		set sound volume to 0
		play
		set sound volume to 256
	end tell
	
	tell theMovie
		set pointX to current time
		set current time to 9471
		play
	end tell
	
	repeat with volChange from 256 to 0 by -32
		delay 0.1
		tell Audio1 to set sound volume to volChange
	end repeat
	tell Audio1 to stop
end tell

Hi Stefan!
Thanks for your help and quick reply.
I tried to use your modified script but I got an error answer:
“Could not open the movie” and “part of expression (item 1) has no result”

Any idea?

Best wishes
Rainer

When I open a file in QuickTime Player, the result is a list.
Therefore I included item 1 of
You can also omit file like these lines.
If it doesn’t work, try to delete item 1 of


.
set theMovie to item 1 of (open baseFolder & "RYS08_RAUM1_FINAL:RYS08_1_FINAL.MOV")
set Audio1 to item 1 of (open baseFolder & "RYS08_AUDIO_FINAL:Raum1:AIFF:3_laufen.AIF")
set Audio2 to item 1 of (open baseFolder & "RYS08_AUDIO_FINAL:Raum1:AIFF:4_schwarzesLoch1.AIF")
.