Search content:

 

Personal Menu
Username:
Password:
Save password

Become a member

Forgot Password?

 

Don't miss these
RC4 Encryption Algorithm Script
GkSetup
RadioGroup
Install Maker
Text Search Engine
Change ShapeType of a Shape cast member
Return the name of the current user
file browser
Move To Top
To activate previous instance and quit
MediaMacros Xtras Mall
 

 

 

Behavior Wait for DigitalVideo Cuepoint

Added on 6/15/2000

 

Compatibilities:
behavior D7 D8 PC

This item has not yet been rated

Author: KumarK

Wait for DigitalVideo Cuepoint

---- written for Director 8 ---
---- Kumar.K kumark@icode.com ----

--- Custom Properties ---
property TheSprite,whatnext,cuename,cuetrue
--- Get Behavior Description List ---
on getPropertyDescriptionList me
    if not the currentspritenum=0 then exit
  DigitalvideoSpriteList=searchDigitalVideo (me)
  descriptionlist = [:]
  actionlist=["Go NextFrame","Go Next Marker","Go Previous Marker","Go Loop","Exit"]
  if DigitalvideoSpriteList.count > 0 then
    addprop descriptionlist,#TheSprite,[#comment:"Digital Video Sprite Number :",  
    #format:#String,#range:DigitalvideoSpriteList,#default:DigitalvideoSpriteList[1]]
  else
    addprop descriptionlist,#TheSprite,[#comment:"Digital Video Sprite Number :",#format:#Integer,#range:[#min:1,max:the lastchannel],#default:1]
  end if
  addprop descriptionlist,#cuename,[#comment:"Cue Point Name :",#format:#string,#default:"Enter CuePoint Name Here"]  
  addprop descriptionlist,#whatnext,[#comment:"What Next ?",#format:#string,#range:actionlist,#default:actionlist[1]]
  return descriptionlist
end getPropertyDescriptionList
--- Get Behavior Description List ---

-- Get Behavior description --
on getBehaviorDescription
  return "This Behavior waits for CuePoint of a Digital Video Sprite " & RETURN & RETURN &
  "Parameters" & RETURN &
  "* Digital Video Sprite." & RETURN &
  "* CuePoint Name." & RETURN &
  "* What after Digital Video finishes playing CuePoint."
end
-- Get Behavior description --

-- events --
on prepareframe
  if cuetrue=false and (member(sprite(TheSprite).member).type=#digitalvideo or member(sprite(TheSprite).member).type=#QuickTimeMedia) then
    thecuepointnamelist=member(sprite(TheSprite).member).cuePointNames
    repeat with i=1 to thecuepointnamelist.count
      if thecuepointnamelist[i]=cuename then
        cuetrue=true
      else
        cuetrue=false
      end if
    end repeat
  end if
end

on ExitFrame
  if (member(sprite(TheSprite).member).type=#digitalvideo or member(sprite(TheSprite).member).type=#QuickTimeMedia) and cuetrue= true then
    if  (isPastCuePoint(sprite TheSprite, cuename)=1) then
      case whatnext of
        "Go NextFrame":Go The frame+1
        "Go Next Marker":Go Next
        "Go Previous Marker":Go Previous
        "Go Loop":Go Loop
        "Exit":quit
      end case
    else
      go the frame
    end if
  end if
end
-- events --

------ Availbale for only Frame Script ------
on isOKToAttach (me, aSpriteType, aSpriteNum)
  case aSpriteType of
    #graphic:
      return false
    #script:
      return True
  end case
end isOKToAttach
------ Availbale for only Frame Script ------


------ Search for QT/AVI Sprite ------
on searchDigitalVideo me
  DigitalvideoSpriteList = []
  repeat with i = 1 to the lastchannel
    if member(sprite(i).member).type=#digitalvideo or member(sprite(i).member).type=#QuickTimeMedia then
      DigitalvideoSpriteList.append(i)
    end if
  end repeat
  return DigitalvideoSpriteList
end
------ Search for QT/AVI Sprite ------  

 


Upload Provided by ABCUpload ASP

Contact

MMI
22 West Court Sq
Suite 2C
Newnan, GA 30263
USA

Fax - (206) 339-5833

Send e-mail