Search content:

 

Personal Menu
Username:
Password:
Save password

Become a member

Forgot Password?

 

Don't miss these
Director 8 & Lingo Fast and Easy Web Development (With CD-ROM)
rescale
sequenceXtra
How to find all special system folders
Scuba
ECD
XML Parser List Converter
Toggle ImageEnabled Property of a Flash Member
MM-XDK-L (Developers of Xtras)
MP3 in Director
MediaMacros Xtras Mall
 

 

 

Behavior Elliptical Sprite Behavior

Added on 7/7/2000

 

Compatibilities:
behavior D7 D8 Mac PC Shockwave

This item has not yet been rated

Author: ChristianKrauter

Attached to a sprite it will move the sprite on a elliptical Path with your coordinates to adjust the elliptical Path and steps

-- copywrite christian krauter
-- free to use for all regular MediaMacros visitors
-- if you have any comments pls email me
-- christian@simplicityhq.com

-- Elliptical Sprite Behavior

property pCenterX, pCenterY, pAxisX, pAxisY, pSteps, pStepSize, pTheta

on getPropertyDescriptionList me
  list = [:]
  addProp list, #pCenterX, [#comment:"Center x", #format: #integer, #default:(the stageRight - the stageLeft)/2]
  addProp list, #pCenterY, [#comment: "Center y", #format: #integer,#default:(the stageBottom - the stageTop)/2]
  addProp list, #pAxisX, [#comment: "Radius x", #format: #integer,#default:(the stageRight - the stageLeft)/4]
  addProp list, #pAxisY, [#comment: "Radius y", #format: #integer,#default:(the stageBottom - the stageTop)/4]
  addProp list, #pSteps, [#comment: "Steps per rotation", #format: #integer,#default: 30]
  return list
end

on beginSprite me
  pStepSize = (2 * pi) / pSteps
  pTheta = 0
end

on exitFrame me
  x = pAxisX * sin(pTheta) + pCenterX
  y = pAxisY * cos(pTheta) + pCenterY
  sprite(me.spriteNum).loc = point (x, y)
  pTheta = pTheta + pStepSize
end  

 


Upload Provided by ABCUpload ASP

Contact

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

Fax - (206) 339-5833

Send e-mail