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
Psycho Pong
Pretty Script
Prevent Hour Glass Cursor after AVI Ends
Hex Display
Tabuleiro Nebulae MultiUserServer
Vector Shape - Create Star
PDF export: text and vector shapes
All purpose status bar
De-Xplode that text position relative
File Save as..
 

 

 

Behavior Puzzle maker

Added on 6/6/2004

 

Compatibilities:

This item has not yet been rated

Author: spiderman3388

put the behavior on a sprite which is not on the right place and the behabiorwill ask for which sprite do u want to link the position which is the sprite in the right loc on the puzzle

property mysprite
property other
property f
property myloch
property mylocv
property initialh
property initialv
property wrong
property rightv
Property which

on beginsprite me
  mysprite=sprite(me.spritenum)
  other=sprite(which)
  myloch=other.loch
  mylocv=other.locv
  
  
  
  
on mousedown me
  put 1 into f
  mysprite.moveablesprite=1
  initialh=mysprite.loch
  initialv=mysprite.locv
  cursor 290
end

on mouseup me
  put 0 into f
  if mysprite.intersects (which)   then
    set the loch of mysprite to myloch
  else
    set the loch of mysprite to initialh
  end if
  
  
  if mysprite.intersects (which)  then
    set the locv of mysprite to mylocv
  else
    set the locv of mysprite to initialv
  end if
  
  cursor 260
  
on exitframe me
  --to drag and drop
  if f=1 then
    mysprite.moveablesprite=1
  end if
  ---------------------------------
  
end


on getPropertyDescriptionList me
  set props= [:]
  props.addProp(#which, [#format: #integer, #default: 50, #comment: "whichsprite"])
  
  return props
end

 


Contact

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

Send e-mail