Search content:

 

Personal Menu
Username:
Password:
Save password

Become a member

Forgot Password?

 

Don't miss these
Text Services API
Hyper Midi
Digital Clock Puzzle
Vector Shape - Create Grid
Drag Install
MoonRaker
Bitbull
DirectConnection
Toggle Button
Direct Media Volume Slider
MediaMacros Xtras Mall
 

 

 

Behavior Wait for a DirectMedia CuePoint(Name as Reference)

Added on 6/12/2000

 

Compatibilities:
behavior D7 D8 PC

This item has not yet been rated

Author: KumarK

Wait for a DirectMedia CuePoint(Name as Reference)

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

property DirectmediaSprite,cuepointname,MyAction,search,cueid

------ Events ------
on prepareframe
  if search=false then  
    getcuepoinid  cuepointname  
  end if
end

on ExitFrame me
  if member (sprite(DirectmediaSprite).member).type = #TBDIRECTMEDIA and cueid <>-1 then
    if isPastCuePoint(sprite DirectmediaSprite, cueid) = false then
      go the frame
    else
      case(MyAction) of
        "Go to NextFrame": Go the Frame+1
        "Go to Next Marker": Go Next
        "Go Previous Marker": Go previous
        "Go Loop": Go Loop
        "Quit": quit
      end case
    end if
  end if
end ExitFrame
------ Events ------

---get cuepoint id--
on getcuepoinid cuename
  if member (sprite(DirectmediaSprite).member).type = #TBDIRECTMEDIA then
    nameslist=the cuepointnames of member(sprite(DirectmediaSprite).member)
    repeat with i=1 to nameslist.count
      if cuename= nameslist[i] then
        set search=true
        cueid=i
      else
        cueid=-1
      end if
    end repeat
  end if
end
---get cuepoint id--
------ Get Behaviour Description List ------
on getBehaviorDescription me
  return
  "This Behavior will hold on the frame till the specified Cuepint of a DirectMedia Sprite is past" & RETURN & RETURN &
  "Parameters." & RETURN &
  "*  DirectMedia Sprite" & RETURN &
  "*  Cuepoint Name" & RETURN &
  "*  Action(go NextFrame or Go NextMarkeror Go Previous Marker or Go Loop or Quit)"
end getBehaviorDescription
------ Get Behaviour Description List ------

------ Get Behavior Description List ------
on getPropertyDescriptionList me
  if the currentspritenum <> 0 then exit
  thedirectmediaspritelist = searchDirectmediaSprites(me)
  propslist=[:]  
  if thedirectmediaspritelist.count() > 0 then
    SetaProp propslist, #DirectmediaSprite, [#comment:"Directmedia Sprite",#format:#integer,
  #range: thedirectmediaspritelist,#default: thedirectmediaspritelist[1]]
  else
    SetaProp propslist, #DirectmediaSprite, [#comment:"Wait for Which Directmedia Sprite",#format:#integer,
  #default: 1]
  end if  
    SetaProp propslist, #cuepointname, [#comment:"Wait for Which CuePonint(Name of Cue Point",#format:#String,
  #default: "enter Name here"]  
  SetaProp propslist, #MyAction, [#comment: "What Next?" ,#format:#String,
#range:["Go to NextFrame","Go to Next Marker","Go Previous Marker","Go Loop","Quit" ],#default:"Go to NextFrame"]
  return propslist
end getPropertyDescriptionList
------ Get Behavior Description List ------

------ Can be attached to only Frame script ------
on isOKToAttach (me, aSpriteType, aSpriteNum)
    case aSpriteType of
      #script:
        return true
    end case
  end if
end isOKToAttach
------ Can be attached to only Frame script ------

------ Search for DirectMedia Member on the Stage ------
on searchDirectmediaSprites me
  set thedirectmediaspritelist = []
  repeat with i=1 to the lastchannel
    if sprite(i).member.type = #TBDIRECTMEDIA then
      thedirectmediaspritelist.append(i)
    end if
  end repeat
  return thedirectmediaspritelist
end
------ Search for DirectMedia Member on the Stage ------  

 


Upload Provided by ABCUpload ASP

Contact

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

Fax - (206) 339-5833

Send e-mail