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
Side Scroller
Delete a file
OS Control
Acrobat in Director
Help Studio 2000
Morph a Vector graphics
Increase/ Decrease Digital Video Volume
Generic MP3 Player
Check For Asset
ZGTSB-Shape Or Vector Shape Slider Scroll
 

 

 

Behavior Flash Rotator

Added on 6/7/1999

 

Compatibilities:
behavior D6_5 Mac PC Shockwave

This item has not yet been rated

Author: TorKristensen (website)

Rotates a Flash Sprite

--Code by Tor Kristensen (tor@araneum.dk)

---------------------------
-- code by tor kristensen
-- tor@araneum.dk
-- www.araneum.dk/tor
-- redistribution permitted as long as this header is not removed
---------------------------

property pMyFlash,pDir,pRotate,pSmooth

on new me
  return me
end

on mouseDown me
  
  IF pSmooth = #true THEN
    
    repeat while the mouseDown  
      case (TRUE) of
          
        (pDir=#left):
          set the rotation of sprite pMyFlash to the rotation of sprite pMyFlash-pRotate
          updateStage
          if the rotation of sprite pMyFlash = -360 THEN set the rotation of sprite pMyFlash to 0
          
        (pDir=#right):
          set the rotation of sprite pMyFlash to the rotation of sprite pMyFlash+pRotate
          updateStage
          if the rotation of sprite pMyFlash = 360 THEN set the rotation of sprite pMyFlash to -360
          
      end case
    end repeat
    
  END IF    
  
end


on mouseUp me
  case (TRUE) of
    (pDir=#left):
      set the rotation  of sprite pMyFlash to the rotation of sprite pMyFlash-pRotate
      
    (pDir=#right):
      set the rotation  of sprite pMyFlash to the rotation of sprite pMyFlash+pRotate
      
  end case
  
end


------------------------------------------------------------------------------------
on getPropertyDescriptionList
  set description = [:]  
  
  addProp description, #pMyFlash,[#default:"1",#format:#integer,#comment:"The Number of the Flash Sprite"]
  
  addProp description, #pRotate,[#default:"10",#format:#integer,#comment:"Rotate View By?"]
  
  addProp description, #pDir,[#default:#left,#format:#symbol,#comment:"Which Direction is it going?",#range: [#left,#right]]
  addProp description, #pSmooth,[#default:"#FALSE",#format:#symbol,#comment:"Zoom while the mouseDown?",#range: [#TRUE,#FALSE]]
  
  return description  
end

on getBehaviorDescription
  return ¬
              "picks a random member from a list of member numbers"
end

 


Contact

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

Send e-mail