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
Copy My Text
QuickTime VR 2
Blend Mode Algorithms - Imaging Lingo
DirMPEG
Director To Go
Save text to a file
cXtraStringGrid
Arca Database Xtra
Sending Email
Getting full error messages
 

 

 

Behavior ZoomIn/ZoomOut QTVR Sprite

Added on 6/15/2000

 

Compatibilities:
behavior D7 D8 PC

This item has not yet been rated

Author: KumarK

ZoomIn/ZoomOut QTVR Sprite

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

--- Custom Properties ---
property TheSprite,WhereTo,MyAction,zoomLevel,MyCursor,spritenum
--- 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,#MyAction,[#comment:"Action :",#format:#String,#range:["Zoom In","Zoom Out"],#default:"Zoom In"]
   addprop descriptionlist,#zoomLevel,[#comment:"Select ZoomLevel :",#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 ZoomIn/ZoomOut QTVR Sprite " & RETURN & RETURN &
  "Parameters" & RETURN &
  "* QTVR Sprite." & RETURN &
  "* ZoomIn/ZoomOut"
end
-- Get Behavior description --

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

on mousedown  
  if sprite(TheSprite).IsVrMovie then
    if MyAction="Zoom In" then
      repeat while the stilldown
        the fieldOfView of sprite TheSprite = the fieldOfView of sprite TheSprite - zoomlevel
        updatestage
      end repeat
    end if
    
    if MyAction="Zoom Out" then
      repeat while the stilldown
        the fieldOfView of sprite TheSprite = the fieldOfView of sprite TheSprite + zoomlevel
        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