Contents
Articles
Behaviors
Books
Director News
Director Web Sites
FAQ
Games
Mailing Lists
News Groups
Project Examples
Reviews
Software
Tools
Useful Web Sites
Utilities
Xtras

Don't miss these
Mudbox
Round floating point numbers off to nearest ten
Sprite Blender - Distance
The Complete Uninstall
Set actionsEnabled Property of a Flash Member
Sound not playing in Shockwave
Face Sprite-Alphamania
ToolTip Behavior
Puzzler II - Slide Puzzle
Puzzle maker
 

 

 

Behavior Sound 2 CuePoint

Added on 7/14/1999

 

Compatibilities:
behavior D6_5 D7 D8 Mac PC

This item has not yet been rated

Author: BrianCassell

Recognizes the sound and cue points in Sound Channel 2. Film Loops and rollovers will still play as opposed to the tempo channel"s built in Wait for Cue Point.

--Sound 2 CuePoint Behavior
--©1999 Brian Cassell, iXL (a cog in the machine)

-----------------------------------
--Description
-----------------------------------

on getBehaviorDescription me
  return ¬
"Sound 2 Cue Point Behavior"&RETURN&¬
"©1999 Brian Cassell, iXL (a cog in the machine)"&RETURN&RETURN&¬
"Recognizes the sound and cue points in Sound Channel 2."&RETURN&¬
"Film Loops and rollovers will still play as opposed to the tempo channel's built in Wait for Cue Point."&RETURN&RETURN&¬
"PARAMETERS:"&RETURN&¬
"*Cue Point Name:"&RETURN&¬
" Choose the Cue Point name to wait for. Default value is the first cue point."&RETURN&RETURN&¬
"*Go to the Frame (+):"&Return&¬
" When 'Go to Frame' is checked the movie will go to the current frame + the number of frames specified in the pulldown."&Return&¬
"Possible Values: 1,2 or 3."&RETURN&&RETURN&¬
"*Destination Marker:"&Return&¬
" When 'Go to Marker' is checked the movie will go to the marker selected in the pulldown."&Return&¬
" Possible values: Next, Previous, Loop and any marker available in the current movie."&RETURN&RETURN&¬
"NOTES: 'Go to specific marker' will always over ride the 'Go to the frame (+)' if both are checked."  
end

-----------------------------------
--Notes
-----------------------------------

--Written May 1999
--Modified May,24 1999 (added support to wait for END of sound)

--Far superior to Director's built in wait features.
--They kill interactivity (rollovers, animation, film loops) until the cue has been reached.
--All interactivity is maintained with the Sound 2 CuePoint Behavior.

-----------------------------------
--Properties
-----------------------------------

property whichCuePoint   --holds the selected cuePoint name or number
property goFrame         --flag for going to a frame after cuePassed
property whichFrame      --holds selected number of frames to add to current frame to go to
property goMarker        --flag for going to a marker after cuePassed
property whichMarker     --holds selected marker to go to after cuePassed

-----------------------------------
--Event handlers
-----------------------------------

on exitFrame me
  if whichCuePoint = "{End}" then
    if soundBusy(2) then go the frame
    else
      if goMarker then
        go to frame whichMarker
      else
        go to the frame + whichFrame
      end if
    end if
  else
    if isPastCuePoint (sound 2, whichCuePoint) then
      if goMarker then
        go to frame whichMarker
      else
        go to the frame + whichFrame
      end if
    end if
  end if
  go the frame
end



on getPropertyDescriptionList me
  set mySound = the frameSound2  --the memberNumber of the sound in the sound channel
  
  if mySound = 0 then
    alert "This behavior requires a sound in channel 2."
    exit
  else
    set theCues = the cuePointNames of member mySound  --putting cues into a list to pass
  end if
  
  add theCues,"{End}"
  
  -----------------------------------
  --Parameters
  -----------------------------------
  
  set p_list = [ #whichCuePoint: [#comment:"Wait for Cue Point:", #format:#symbol, #range:theCues, #default:getAt(theCues,1)],¬
                 #goFrame: [#comment:"Go to the frame (+)  ON:", #format: #boolean, #default:TRUE],¬
                 #whichFrame: [#comment:"Go to the frame (+) :", #format: #integer, #range:[1,2,3], #default: 1],¬
                 #goMarker: [#comment:"Go to specific marker ON:", #format: #boolean, #default: FALSE],¬
                 #whichMarker: [#comment:"Destination marker:", #format:#marker, #default:#next]]
  return p_list  
end

 


Contact

MMI
36 South Court Sq
Suite 300
Newnan, GA 30263
USA

Send e-mail