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
Fake-3D Motion
XML Text Renderer v1.1
Set WarpMode of a QTVR Sprite
Set Linked Property of a Flash member
Flip Sprite - Make a sprite appear to rotate in 3-D space.
Check Acrobat Version
rescale
Making Multiple Animated Buttons
PDF Publishing in Multimedia Projects
Pan QTVR Sprite
 

 

 

Behavior Enable/Disable FullScreen of DirectMedia Sprite

Added on 6/12/2000

 

Compatibilities:
behavior D7 D8 PC

This item has not yet been rated

Author: KumarK

Enable/Disable FullScreen of DirectMedia Sprite

---- written for Director 8 ---
---- Kumar.K kumark@icode.com ----
------ Custom Properties ------
property  DirectmediaSprite,MyAction,WhereTo,thedirectmediaspritelist,fullscreenprop

---- Get Behaviour Description List ------
on getBehaviorDescription me
  return
  "This Behavior will Enable/Disable FullScreen of a DirectMedia Sprite " & RETURN & RETURN &
  "Parameters." & RETURN &
  "*  DirectMedia Sprite" & RETURN &
  "*  FullScreen Property True/False" & RETURN &
  "*  Where To Assign this Script"
end getBehaviorDescription
---- Get Behaviour Description List ------

------ Get Behavior Description List ------
on getPropertyDescriptionList me
  set description = [:]
  thedirectmediaspritelist=searchDirectmediaSprites(me)
  if thedirectmediaspritelist.count() > 0 then
    SetaProp description, #DirectmediaSprite, [#comment:"Directmedia Sprite",#format:#integer,
  #range: thedirectmediaspritelist,#default: thedirectmediaspritelist[1]]
  else
    SetaProp description, #DirectmediaSprite, [#comment:"Wait for Which Directmedia Sprite",#format:#integer,
  #default: 1]
  end if
  SetaProp description, #fullscreenprop, [#comment: "Set Full Screen Property To :", #format:#Boolean, #default:True]  
  if the currentspritenum = 0 then
    SetaProp description, #WhereTo, [#comment: "Where To Attach" ,#format:#String,
    #range:["On EnterFrame","On ExitFrame"],#default:"On EnterFrame"]
  else
    SetaProp description, #WhereTo, [#comment: "Where To Attach" ,#format:#String,
    #range:["On MouseUp","On MouseDown","On MouseEnter","On MouseLeave"],#default:"On MouseUp"]    
  end if    
  return description
end getPropertyDescriptionList
------ Get Behavior Description List ------

---- Can be attached both frame script and sprite script ------
on isOKToAttach (me, aSpriteType, aSpriteNum)
  case aSpriteType of
    #script:
      return true
    #graphic:
      return true      
  end case
end isOKToAttach
---- Can be attached both frame script and sprite script ------

------ Search for DirectMedia Member on the Stage ------
on searchDirectmediaSprites me
  set thedirectmediaspritelist = []
  repeat with i=1 to the lastchannel
    if sprite(i).member.type = #TBDIRECTMEDIA then
      thedirectmediaspritelist.append(i)
    end if
  end repeat
  return thedirectmediaspritelist
end
------ Search for DirectMedia Member on the Stage ------

-- Events --
on EnterFrame me
  if WhereTo = "On EnterFrame" then
    enabledisable
  end if
end EnterFrame

on ExitFrame me
  if WhereTo = "On EnterFrame" then
    enabledisable
  end if
end ExitFrame

on MouseUp
  if WhereTo = "On MouseUp" then
    enabledisable
  end if
end MouseUp

on MouseDown
  if WhereTo = "On MouseDown" then
    enabledisable
  end if
end MouseDown

on MouseEnter
  if WhereTo = "On MouseEnter" then
    enabledisable
  end if
end MouseEnter

on MouseLeave
  if WhereTo = "On MouseLeave" then
    enabledisable
  end if
end MouseLeave
-- Events --

--- Enable/Disable FullScreen --
on enabledisable
  if member (sprite(DirectmediaSprite).member).type = #TBDIRECTMEDIA then
    if fullscreenprop=false then
      removefullscreen(sprite DirectmediaSprite)
    else
      setfullscreen(sprite DirectmediaSprite)
    end if
  end if
end
--- Enable/Disable FullScreen --

 


Contact

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

Send e-mail