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
Full control of sprite
OS Control
Director 8 Workshop
DirectImage Xtra
Acrobat Reader
Bitmap text
Ripple image when clicked using Imaging Lingo
Rotate Click-Alphamania
Fade In and Out plus other commands
Toggle ActionsEnabled Property of a Flash Sprite
 

 

 

Behavior M-Trail v1

Added on 12/18/2000

 

Compatibilities:
behavior D7 D8 Mac PC Shockwave

This item has not yet been rated

Author: JohannesHansen

Allows text to follow the cursor...

global onSwitch
property pFirstSprite, pLastSprite, hDist, vDist, pSpeed

on exitFrame
  if onSwitch = true then
    sprite(pFirstSprite).loc = the mouseLoc + point(hDist,vDist)
  else
    sprite(pFirstSprite).loc = point(10,10)
  end if
  repeat with i = (pFirstSprite + 1) to pLastsprite
    targetLoc = sprite(i-1).loc + point(hDist,vDist)
    deltaLoc = targetLoc - sprite(i).loc
    sprite(i).loc = sprite(i).loc + (deltaLoc/pSpeed)
  end repeat
end


on getPropertyDescriptionList me
pdlist = [:]
addprop pdlist, #pFirstSprite, [#comment:"First sprite:", #format:#integer,
#default:1]
addprop pdlist, #pLastSprite, [#comment:"Last sprite:", #format:#integer,
#default:10]
addprop pdlist, #hDist, [#comment:"Horisontal distance between each sprite:",
#format:#integer, #default:0]
addprop pdlist, #vDist, [#comment:"Vertical distance between each sprite:",
#format:#integer, #default:0]
addprop pdlist, #pSpeed, [#comment:"Speed:", #format:#float, #default:1.50,
#range:[#min:1.00, #max:1.95]]
return pdlist
end getPropertyDescriptionList

 


Contact

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

Send e-mail