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
Number of CD Tracks - MCI
Append a File
Sprite controls
NetDone() not registering in IE on the Mac
Check and launch dialup
ZGTSB-TextInteractivity
key navigation
Easy Animation
DOMAJ Site and Forum
getSystemTime
 

 

 

Behavior Drag To View

Added on 12/18/2000

 

Compatibilities:
behavior D7 D8 Mac PC Shockwave

This item has not yet been rated

Author: SunilBalan

Allows to enlarge a part of a bitmap/pict within a square

Download PC Source    Download Mac Source
property pView, pBig, pSmall, pConstraint

on exitframe
  sprite(pBig).rect = map(sprite(pSmall).rect, sprite(the currentspritenum).rect, sprite(pView).rect)
end

on beginSprite me
  sprite(the currentspritenum).moveablesprite = TRUE
  sprite(the currentspritenum).constraint = pConstraint
end

on getPropertyDescriptionList
  description = [:]
  addprop description, #pView, [#comment: "Which sprite is a viewfinder", #format:#integer, #default: 1]
  addprop description, #pBig, [#comment: "Which sprite is holding BIG picture", #format:#integer, #default: 2]
  addprop description, #pSmall, [#comment: "Which sprite is holding small picture", #format:#integer, #default: 3]
  addprop description, #pConstraint, [#comment: "Constraint to which sprite", #format:#integer, #default: 5]
  return description
end getPropertyDescriptionList

on getBehaviorDescription
  return "Few things to start up are:"& RETURN & RETURN &¬
  "BIG picture : Default size of the picture you import. ¬
After dropping in score, just below the viewfinder change the ink to DARKEST"& RETURN & RETURN &¬
"small picture : Drop the same picture you imported and drag it to make it small"& RETURN & RETURN &¬
"View finder : Drop this just above the big picture and change the foreground of this sprite to 0 ¬
and the background to 255 from the score"& RETURN & RETURN &¬
"Dragger : Drop this behaviour on it and specify the parameters"& RETURN & RETURN &¬
"NOTE: Always keep in mind about the proportions of the viewfinder bitmap or else you will mess up with ¬
the image sizes. Let the size of viewfinder be four or five times higher than the size of dragger. ¬
In brief I will say that the size should be proportionate to the size of dragger"
end getBehaviorDescription

 


Contact

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

Send e-mail