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
Valentina Spider 1.0
Director in a Nutshell
Standard 3 state button
Inspect
Ripple Follow Sprite-Alphamania
RoboHelp 5 Review
Macromedia Licensing
Imaging Lingo Table
space crawling
Macromedia Director Game Development: From Concept to Creation
 

 

 

Behavior Set Quality of a QTVR Sprite

Added on 6/15/2000

 

Compatibilities:
behavior D7 D8 PC

Rating:

Author: KumarK

Set Quality of a QTVR Sprite

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

--- Custom Properties ---
property TheSprite,WhereTo,Motionqulaity,StaticQuality
--- Get Behavior Description List ---
on getPropertyDescriptionList me
  DigitalvideoSpriteList=searchDigitalVideo (me)
  descriptionlist = [:]
  qualitylist=["Normal","Minimum","Maximum"]
  spriteassignlist=["Mouse Up","Mouse Down", "Mouse Enter","Mouse Leave"]
  frameassignlist=["Exit Frame","Enter Frame"]
  if DigitalvideoSpriteList.count > 0 then
    addprop descriptionlist,#TheSprite,[#comment:"QTVR Sprite Number :",  
    #format:#String,#range:DigitalvideoSpriteList,#default:DigitalvideoSpriteList[1]]
  else
    addprop descriptionlist,#TheSprite,[#comment:"QTVR Sprite Number :",#format:#Integer,#range:[#min:1,max:the lastchannel],#default:1]
  end if
  addprop descriptionlist,#Motionqulaity,[#comment:"Set Motion Quality Level to :",#format:#String,#range:qualitylist,#default:qualitylist[1] ]
  addprop descriptionlist,#StaticQuality,[#comment:"Set Static Quality Level to :",#format:#String,#range:qualitylist,#default:qualitylist[1] ]
  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 Sets The quality of a QTVR Sprite " & RETURN & RETURN &
  "Parameters" & RETURN &
  "* QTVR Sprite." & RETURN &
  "* QualityLevel" & RETURN &
  "* Where to attach this Script"
end
-- Get Behavior description --

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

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

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

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

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

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

-- custom handlers --
on SetQuality
  if sprite(TheSprite).isVrMovie then
    case Motionqulaity of
      "Normal":sprite(TheSprite).motionQuality = #normalQuality
      "Minimum":sprite(TheSprite).motionQuality = #minQuality
      "Maximum":sprite(TheSprite).motionQuality = #maxQuality
    end case
  end if
    case StaticQuality of
      "Normal":sprite(TheSprite).staticQuality = #normalQuality
      "Minimum":sprite(TheSprite).staticQuality = #minQuality
      "Maximum":sprite(TheSprite).staticQuality = #maxQuality
    end case  
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 QTVR 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 QTVR Sprite ------  

 


Contact

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

Send e-mail