Search content:

 

Personal Menu
Username:
Password:
Save password

Become a member

Forgot Password?

 

Don't miss these
sound volum
Set Linked Property of a Flash member
Write a file
ADOXtra Lite
Play/Pause/Rewind a Animated Gif Sprite
Convert Data
myMailTo
getSystemTime
Case sensitive string comparison
FindAll
MediaMacros Xtras Mall
 

 

 

Behavior Wait for SWA Member finishes Playing(sprite as reference)

Added on 6/19/2000

 

Compatibilities:
behavior D8 Mac PC Shockwave

This item has not yet been rated

Author: KumarK

Wait for SWA Member finishes Playing(sprite as reference)

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


property  theSprite,MyAction

-- Events --
on ExitFrame me
  if float(the duration of member (sprite(theSprite).member)) > the currentTime of sprite theSprite then
    case MyAction of
      "Go NextFrame": Go the frame +1
      "Go Next Marker":Go Next
      "Go Previous Marker":Go Previous
      "Exit":quit
    end case    
  else
    go the frame    
  end if
end ExitFrame
------ Events ------
------ Get Behavior Description List ------
on getPropertyDescriptionList me
  if the currentspritenum <> 0 then exit  
  SWASpriterlist = searchSWAMember(me)
  if  SWASpriterlist.count() > 0 then
    set description = [:]
    addProp description, #theSprite, [#format:#integer, #comment: "Wait for Which SWA(Shockwave Audio) Sprite ?",
    range:SWASpriterlist,#default:SWASpriterlist[1]]    
    addProp description, #MyAction, [#format:#String, #comment: "Action(What after Sound Finishes Playing):",
    #range:["Go NextFrame","Go Next Marker","Go Previous Marker","Exit"],#default:"Go NextFrame"]
    return description
  else
    exit
  end if  
end getPropertyDescriptionList
------ Get Behavior Description List ------

-- Get Behavior description --
on getBehaviorDescription
  return "This Behavior Waits for the SWA Sprite to finish Playing." & RETURN & RETURN &
  "Parameters" & RETURN &
  "* SWA Sprite." & RETURN &
  "* Action."
end

------ 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 SWA Member ------
on searchSWAMember me
  SWASpriterlist = []
  repeat with i=1 to the lastchannel
    if member(sprite(i).member).type=#swa then
      SWASpriterlist.append(i)
    end if
  end repeat
  return SWASpriterlist
end
------ Search for SWA Member ------  

 


Upload Provided by ABCUpload ASP

Contact

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

Fax - (206) 339-5833

Send e-mail