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
Sprite on/off
123 Flash Menu
Vigenere cipher (Encryption)
Posterize Effect - Imaging Lingo
Face Mouse-Alphamania
Import text as cast members
ZGTSB-ButtonUp
SetMouseXtra
Hold on a frame till Flash finishes playing
Irregular MIAW
 

 

 

Behavior Wait for a DirectMedia CuePoint (Index ID 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 (Index ID as Reference)

---- written for Director 8 ---
---- Kumar.K kumark@icode.com ----
------ Custom Properties ------
property  DirectmediaSprite,MyAction,cueindex


------ Events ------
on ExitFrame me
  if member (sprite(DirectmediaSprite).member).type = #TBDIRECTMEDIA then
    if isPastCuePoint(sprite DirectmediaSprite, cueindex)=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 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 Index Id" & 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, #cueindex, [#comment:"Wait for Which CuePonint Index ID",#format:#integer,
  #range:[#min:1,#max:200],#default: 2]  
  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 ------  

 


Contact

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

Send e-mail