Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sound to play after a certain delay?

Status
Not open for further replies.

ProWannabe

Technical User
Aug 5, 2003
6
0
0
AU
Hey guys I'm new here, I was wondering is there any possible way that I can have my sound to play after a certain delay? I've got a streaming video (AVI) that goes for about 1 minute and 50 seconds, and thereafter I want some music to play... any ideas??

Thanks....


:)
 
Hi,
1st method: Look at the "Timer Question" post.
2nd method:
You can make use of your AVI's movieTime and duration.
For example:
Code:
on exitFrame me
  excessTime = 0
  if(member("avi").movieTime = member("avi").duration +
     excessTime) then 
  -- do something
  end if
end

Hope this helps.
 
Sorry, the 2nd method will not work because
movieTime will stop once the move has finished.

This should do:
Code:
----------------
property t
on exitframe me
  
  excessTime = 100
  s = sprite(1)
  if(s.movieTime >= s.duration) then t = t + 1
  
  if(t = excessTime) then "Do something"
  
end
----------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top