Search content:

 

Personal Menu
Username:
Password:
Save password

Become a member

Forgot Password?

 

Don't miss these
SarSoft MediaPlayer - All in one video
Xtrema - Unicode String Class [ public beta ]
Show Me Movies
RotateWithSound
Replace tabs with spaces
OSControl Xtra Review
Set the blend of Sprite
SmartOLE Xtra
Internet Explorer 4 - Mac
AppSafe Xtra for Authorware and Director
MediaMacros Xtras Mall
 

 

 

Behavior RotateWithSound

Added on 7/24/2000

 

Compatibilities:
behavior D7 D8 Mac PC Shockwave

This item has not yet been rated

Author: KurtKoenig (website)

Rotate a Sprite clockwise or counterclockwise while sound behavior

Download PC Source    Download Mac Source
--Rotate a Sprite clockwise or counterclockwise while sound behavior.
---------------------------------------------------------------------
---------------------------------------------------------------------

--   Kurt Koenig * Belgium

------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------

property WhichSprite, HowFast,RotSound, ¬
WhichSound, WhichChannel, CCW

on getPropertyDescriptionList
  desclist = [:]
  
  addprop desclist, #WhichSprite, [#comment : "The rotating Sprite is Spritenumber", ¬
# format : #integer, # default : ""]
  addprop desclist, #HowFast, [#comment : "The Sprites rotation speed is", ¬
# format : #integer, # default : 5, #range : [#min:1, #max:10]]
  addprop desclist, #CCW, [#comment : "Rotate CounterClockWise ?", ¬
# format : #boolean, # default : False]
  addprop desclist, #RotSound, [#comment : "Play sound during rotation ?", ¬
# format : #boolean, # default : False]
  addprop desclist, #WhichSound, [#comment : "Choose a soundmember to play", ¬
# format : #member, # default : ""]
  addprop desclist, #WhichChannel, [#comment : "Play sound in which soundchannel (1-8) ?", ¬
# format : #integer, # default : "3"]
  return desclist
end getPropertyDescriptionList


on getbehaviordescription
  return "Rotate a Sprite clockwise or counterclockwise."&RETURN&"¬
You can set a rotation speed, and use a sound "&RETURN&"¬
while rotating.This behavior acts on mousedown."&RETURN&"¬
Drop on a Sprite to rotate directly, or drop it on "&RETURN&"¬
a button to rotate a given sprite."
end getbehaviordescription


on getbehaviortooltip
  return "Rotate a Sprite clockwise or counterclockwise"
end getbehaviortooltip  


on mousedown
  if RotSound  = true then puppetsound WhichChannel, whichSound
  repeat while the mousedown
    if CCW = FALSE then
      sprite (WhichSprite) . rotation = sprite (WhichSprite) . rotation + HowFast
    else
      sprite (WhichSprite) . rotation = sprite (WhichSprite) . rotation - HowFast
    end if
    updatestage
  end repeat
end mousedown


on mouseup me
  puppetSound WhichChannel, 0
end mouseup

 


Upload Provided by ABCUpload ASP

Contact

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

Fax - (206) 339-5833

Send e-mail