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
Fuel
Animate Image Sequence
Toggle Stay On Top-Button
DirectTransition3D Xtra, Set III
Set ButtonsEnabled Property of a Flash Sprite
BitChecker
Scroll Thumb
Rotate Image Algorithm - Imaging Lingo
Arca Database Xtra
Dervich Pivot Xtra
 

 

 

Behavior Sprite controls

Added on 9/8/2000

 

Compatibilities:
behavior D7 D8 Mac PC Shockwave

This item has not yet been rated

Author: SunilBalan

This is a script to control the sprite animation.

property pControl, pRange, pSpeed, spritenum

on exitframe me
  Case (pControl) of
    "Move horizontally":
      sprite(me.spritenum).loch = sprite(me.spritenum).loch + pRange
    "Move vertically" :
      sprite(me.spritenum).locv = sprite(me.spritenum).locv + pRange
    "Rotate":
      sprite(me.spritenum).rotation = sprite(me.spritenum).rotation + pRange
    "Zoom":
      the Width of sprite(me.spritenum) = the Width of sprite(me.spritenum )+ (the Width of sprite(me.spritenum )* (pSpeed/100.0))
      the Height of sprite(me.spritenum) = the Height of sprite(me.spritenum) + (the Height of sprite(me.spritenum) * (pSpeed/100.0))
  end case
end

on getPropertyDescriptionList
  description =[:]
  addProp description, #pControl,[#comment: "Select your option:", #format:#String,#range:["Move horizontally", "Move vertically", "Rotate", "Zoom"], #default:"Move horizontally"]
  addProp description, #pRange, [#comment: "Speed for rotate and move:", #format:#Integer, #range:[#min:-30,#Max:30],#default:1]
  addprop description, #pSpeed,[#comment:"Speed to zoom (- to zoom in, + to zoom out):",#format:#integer, #default: -10, #range:[#min:-30,#max:30]]
  return description
end

 


Contact

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

Send e-mail