Search content:

 

Personal Menu
Username:
Password:
Save password

Become a member

Forgot Password?

 

Don't miss these
Avance de imagenes continuo - Continuous advance of imagenes
SmartOLE Xtra
BASS Xtra v1.0
Shockwave Safe Xtras
VarLord
DMFade
PopUp Menu
Icon Forge
Standard 3 state button
Set ImageEnabled Property of a Flash Sprite
MediaMacros Xtras Mall
 

 

 

Behavior More Maze Handlers

Added on 6/30/1999

 

Compatibilities:
behavior D6_5 D7 D8 Mac PC

This item has not yet been rated

Author: LonKoenig

Maze handler script. The visible sprites are placed using Matte Ink.

on mouseDown
  -- Constants:
  set hiddenSprite=48   -- Channel used to pre-test object"s location
  set mapSprite=1       -- Map of allowable area
  set testX=the mouseH  -- save the mouse position RIGHT NOW!
  set testY=the mouseV
  set me to the clickOn -- Remember which channel this object is using
  -- Calculate the mouse"s offset from the object"s registration point
  set offsetestX to the locH of sprite me
  set offsetestY to the locV of sprite me
  set offsetestX=offsetestX-testX
  set offsetestY=offsetestY-testY
  set the castNum of sprite hiddenSprite to the castNum of sprite me
  set the visible of sprite hiddenSprite to FALSE
  set goodX=the mouseH+offsetestX
  set goodY=the mouseV+offsetestY
  --Track the movement:
  repeat while the stillDown
    -- Test for the collision:
    set testX=the mouseH+offsetestX
    set testY=the mouseV+offsetestY
    set the loc of sprite hiddenSprite to point(testX, testY)
    updateStage
    if (sprite hiddenSprite within mapSprite) then
      set the loc of sprite me to point(testX, testY)
      set goodX=testX
      set goodY=testY
    else
      set the loc of sprite me to point(goodX, goodY)
      updateStage
    end if
  end repeat
end mouseDown

 


Upload Provided by ABCUpload ASP

Contact

MMI
22 West Court Sq
Suite 2C
Newnan, GA 30263
USA

Fax - (206) 339-5833

Send e-mail