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
Generic MP3 Player
Sprite Group Movement behavior
Download Net Thing
Play/Pause/Stop SWA(Shockwave Audio)
Dr.Explain - help file tool
Go To The Frame - Blog about Lingo
Face Sprite-Alphamania
Checking for an internet connection
simDirectShow Xtra
toggle a global variable with button
 

 

 

Behavior Pan QTVR Sprite

Added on 6/15/2000

 

Compatibilities:
behavior D7 D8 PC

This item has not yet been rated

Author: KumarK

Pan QTVR Sprite

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

--- Custom Properties ---
property TheSprite,WhereTo,PanLevel,MyCursor,spritenum,PanOption
--- Get Behavior Description List ---
on getPropertyDescriptionList me
  if not the currentspritenum<>0 then exit
  DigitalvideoSpriteList=searchDigitalVideo (me)
  descriptionlist = [:]
  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,#PanOption,[#comment:"Action :",#format:#String,#range:["Pan Left to Right","Pan Right To Left"],#default:"Pan Left to Right"]  
  addprop descriptionlist,#PanLevel,[#comment:"Select PanLevel :",#format:#Integer,#range:[#Min:1,#Max:10],#default:5]
  addprop descriptionlist,#MyCursor,[#comment:"Select the Cursor :",#format:#Cursor,#default:280]
  return descriptionlist
end getPropertyDescriptionList

on getBehaviorDescription
  return "This Behavior Pans QTVR Sprite " & RETURN & RETURN &
  "Parameters" & RETURN &
  "* QTVR Sprite." & RETURN &
  "* Pan Level"
end
-- Get Behavior description --

-- events --
on mousewithin
  sprite(spritenum).cursor=MyCursor
end

on mousedown  
  if sprite(TheSprite).IsVrMovie then
    if PanOption = "Pan Left to Right" then
      repeat while the stilldown
        Set the pan of sprite TheSprite= the pan of sprite TheSprite - PanLevel
        updatestage
      end repeat
    end if
    if PanOption = "Pan Right To Left" then
      repeat while the stilldown
        Set the pan of sprite TheSprite= the pan of sprite TheSprite + PanLevel
        updatestage
      end repeat
    end if
   end if
end
-- events --

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


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

 


Contact

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

Send e-mail