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
Behaviour to copy files, handy for backup files
True Lingo Color Wheel 1.0
Set ImageEnabled Property of a Flash Sprite
Diffusion Effect - Imaging Lingo
27 Sum Game-Game Fields
Popup Xtra
ZGTSB-TextScroll
To activate previous instance and quit
PDF files on the fly
Enhancer Xtra
 

 

 

Behavior Sound 1 CuePoint

Added on 7/14/1999

 

Compatibilities:
behavior D6_5 D7 D8 Mac PC

Rating:

Author: BrianCassell

Recognizes the sound and cue points in Sound Channel 1.If there aren"t any cuepoints the behavior can be used to also wait for the end of the sound to finish before giog to the next frame. Film Loops and rollovers will still play as opposed to the tempo channel"s built in Wait for Cue Point and Wait for end of sound.

--Sound 1 CuePoint Behavior

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

on getBehaviorDescription me
  return ¬
"Sound 1 Cue Point Behavior"&RETURN&¬
"©1999 Brian Cassell, iXL (a cog in the machine)"&RETURN&RETURN&¬
"Recognizes the sound and cue points in Sound Channel 1."&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 1 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(1) 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 1, 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 frameSound1  --the memberNumber of the sound in the sound channel
  
  if mySound = 0 then
    alert "This behavior requires a sound in channel 1."
    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