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
Check for DirectShow Installation
Simple Distance Blend
Snow Falling
Valentina Spider 1.0
Image Resizer v1.0
Overlay Dragger
change LocZ
Protected Code
Fast Start Projector
Print Dialog Behavior
 

 

 

Behavior CloneIt

Added on 1/30/2001

 

Compatibilities:
behavior D7 D8 Mac PC Shockwave

This item has not yet been rated

Author: KurtKoenig (website)

Allows to partly, or entirely duplicate a bitmapped image with different sizes of brushes.

property spritenum, pSourceImage, pTargetImage, pSourceBrushRect, pTargetBrushRect

on getpropertydescriptionlist
  pdllist = [:]
  
  addProp pdllist, #pSourceImage, [#comment: "The member of the sourceImage:", #format: #bitmap, #default:""]
  addProp pdllist, #pTargetImage, [#comment: "The member of the TargetImage:", #format: #bitmap, #default:""]
  addProp pdllist, #pSourceBrushRect, [#comment: "The spritenumber of the Sourcebrushrect:", #format: #integer, #default:""]
  addProp pdllist, #pTargetBrushRect, [#comment: "The spritenumber of the Targetbrushrect:", #format: #integer, #default:""]
  
  return pdllist
  
end getpropertydescriptionlist


on enterframe
  
  if the mousedown then
    member(pTargetImage).image.copyPixels(member(pSourceImage)
.image,(sprite pSourceBrushRect).rect, (sprite pSourceBrushRect).rect)
  end if
  
end enterframe

on prepareframe me
  
  if inside (the mouseloc(sprite (me.spritenum)).rect) then
    cursor 200
    (sprite pSourceBrushRect).visible = true
    (sprite pTargetBrushRect).visible = true
  else
    (sprite pSourceBrushRect).visible = false
    (sprite pTargetBrushRect).visible = false
    cursor - 1
  end if
  
  (sprite pSourceBrushRect).lineSize = 1
  (sprite pSourceBrushRect).loc = the mouseloc
  (sprite pTargetBrushRect).lineSize = 1
  (sprite pTargetBrushRect).loc = (the mouseloc) + point
((sprite(me.spritenum).right + 10),0)
end prepareframe

 


Contact

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

Send e-mail