Search content:

 

Personal Menu
Username:
Password:
Save password

Become a member

Forgot Password?

 

Don't miss these
Kaboom!
Valentina
Macromedia
Cleanup Users Components
Double Char Fix - D 7.0
VideoCodecCheck
cXtraVideoCapture
Binary Convertor
My Paradise Islands
Watcher Window Behavior
MediaMacros Xtras Mall
 

 

 

Behavior Play/ Pause/ Rewind/ StepForward/ StepBackward Video Sprite

Added on 6/15/2000

 

Compatibilities:
behavior D7 D8 PC

This item has not yet been rated

Author: KumarK

Play/ Pause/ Rewind/ StepForward/ StepBackward Video Sprite

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

--- Custom Properties ---
property TheSprite,WhereTo,MyAction,second_steps
--- Get Behavior Description List ---
on getPropertyDescriptionList me
  DigitalvideoSpriteList=searchDigitalVideo (me)
  descriptionlist = [:]
  spriteassignlist=["Mouse Up","Mouse Down", "Mouse Enter","Mouse Leave"]
  frameassignlist=["Exit Frame","Enter Frame"]
  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, #MyAction, [#comment:"Action :", #format:#String,#range:["Play","Pause","Rewind","StepForward","StepBackward"],#default:"Play"]
  addprop descriptionlist, #second_steps, [#comment:"Step With How many seconds(use only with StepForward/backward) :",#format:#float,#range:[#min:0.5,#max:3.0],#default:1.0]
  if the currentspritenum <> 0 then
    addprop descriptionlist, #WhereTo, [#comment:"Where To Assign this Script ?", #format:#String,#range:spriteassignlist,#default:spriteassignlist[1]]
  else
    addprop descriptionlist, #WhereTo, [#comment:"Where To Assign this Script ?", #format:#String,#range:frameassignlist,#default:frameassignlist[2]]
  end if  
  return descriptionlist
end getPropertyDescriptionList
--- Get Behavior Description List ---

-- Get Behavior description --
on getBehaviorDescription
  return "This Behavior controls Digital Video Sprite " & RETURN & RETURN & \
  "Parameters" & RETURN & \
  "* Digital Video Sprite." & RETURN & \
  "* Action" & RETURN & \
  "* Where to attach this Script"
end
-- Get Behavior description --

-- events --
on mouseUp me
  if WhereTo="Mouse Up" then
    ControlVideoSprite
  end if
end

on mouseDown me
  if WhereTo="Mouse Down" then
    ControlVideoSprite
  end if
end

on mouseEnter me
  if WhereTo="Mouse Enter" then
    ControlVideoSprite
  end if
end

on mouseLeave me
  if WhereTo="Mouse Leave" then
    ControlVideoSprite
  end if
end

on enterframe
  if WhereTo="Enter Frame" then
    ControlVideoSprite
  end if
end

on ExitFrame
  if WhereTo="Exit Frame" then
    ControlVideoSprite
  end if
end
-- events --

-- custom handlers --
on ControlVideoSprite
  if member(sprite(TheSprite).member).type=#digitalvideo or member(sprite(TheSprite).member).type=#QuickTimeMedia then
    case MyAction of
      "Play":
        if the movierate of sprite TheSprite=0 then
          the movierate of sprite TheSprite=1
        end if        
      "Pause":the movierate of sprite TheSprite=0
      "Rewind":
        if the movietime of sprite TheSprite<>0 then
          the movierate of sprite TheSprite=0
          the movietime of sprite TheSprite=0
          the movierate of sprite TheSprite=1
        else
          if the movietime of sprite TheSprite=0 and the movierate of sprite TheSprite=0 then
            the movierate of sprite TheSprite=1
          end if
        end if
      "StepForward": set the movietime of sprite TheSprite =the movietime of sprite TheSprite + (second_steps*60)
     "StepBackward": set the movietime of sprite TheSprite =the movietime of sprite TheSprite - (second_steps*60)        
    end case
  end if
end
-- custom handlers --

------ Availbale for both Frame & Sprite Script ------
on isOKToAttach (me, aSpriteType, aSpriteNum)
case aSpriteType of
#graphic:
return true
#script:
return True
end case
end isOKToAttach
------ Availbale for both Frame & Sprite 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