Search content:

 

Personal Menu
Username:
Password:
Save password

Become a member

Forgot Password?

 

Don't miss these
Drag Sprite with Hotspot
Add to the back list
The Button II
Spam and Faoul language filter for shockwave
3state Button with Cursor change
CatCube
Shell Xtra
DrawXtra
simPPTViewer1.0 Xtra
ScrnXtra
MediaMacros Xtras Mall
 

 

 

Behavior Push Dial-Alphamania

Added on 6/10/1999

 

Compatibilities:
D6_5 D7 D8 Mac PC Script

Required Xtras:
Alphamania
Effector Set I for Alphamania

This item has not yet been rated

Author: MediaLab (website)

Requires Effector Set 1 Behavior Support Scripts.

Property pSpeed, pInterp, pLeftLimit, pRightLimit, pStartDial, midSlope

on getPropertyDescriptionList
  --if not alphamaniacCheck(the currentSpriteNum) then exit
  
  set pList=[:]
  addProp pList,#pSpeed,[format:#integer,comment:"Speed of dial:", Default:6, range:[min:6,max:20]]
  addProp pList,#pLeftLimit,[format:#integer,comment:"Left Limit (degrees):", Default:-90, range:[min:-360,max:360]]
  addProp pList,#pRightLimit,[format:#integer,comment:"Right Limit (degrees):", Default:90, range:[min:-360,max:360]]
  addProp pList,#pStartDial,[format:#integer,comment:"Start Dial Angle (degrees):", Default:0, range:[min:-360,max:360]]
  addProp pList,#pInterp,[format:#symbol,¬
                               comment:"Interpolation:",¬
                               Default:#On,range:[#Off,#On,#Paused]]
  
  return pList
end

on beginSprite me
  set s=the spriteNum of me
  if not alphaManiac(s) then exit
  
  set pInterp=interpolation(pInterp)
  if not EffectActive(s, #rotate) then
    rotate(sprite s, [degrees:pStartDial, interpolation:pInterp])
  end if
  set centerAngle = ((pRightLimit - pLeftLimit) / 2) + pLeftLimit
  if (((centerAngle + 360) mod 360)-90) > 90 then
    set pSpeed  = pSpeed * -1
  end if
end

on mouseDown me
  set s = the spriteNum of me
  --set eighthWidth = (the width of sprite s) / 8
  set centerL = ((the width of the rect of sprite s)/2)  + the left of sprite s
  rotate(sprite s, [animMode:#static])
  repeat while the mouseDown
    set curAngle = GetAngle(sprite s, #rotate)
    if the mouseH > centerL then
      if((curAngle + pSpeed) < pRightLimit) and¬
((curAngle + pSpeed) > pLeftLimit) then
        rotate(sprite s, [deltaDegrees:pSpeed])
      end if
    end if
    if the mouseH < centerL  then
      if((curAngle - pSpeed) > pLeftLimit) and¬
((curAngle - pSpeed) < pRightLimit) then
        set ang = 0 - pSpeed
        rotate(sprite s, [deltaDegrees:ang])
      end if
    end if
    updateStage
  end repeat
end






on getBehaviorDescription me
  set msg= "Your AlphaManiac dial will rotate when it is clicked and held"
  put return & return after msg
  put "Parameters:" & return & "-----------" & return  after msg
  put "*  Speed:  How fast does it turn?" & return after msg
  put "*  Left Limit:  Left extreme of dial." & return after msg
  put "*  Right Limit: Right extreme of dial." & return after msg
  put "*  Start Dial Angle: angle to start the dial." & return after msg
  put "*   Interpolation:   On,Off,or While Paused" after msg
  put return & "-----------" & return & return  & ">>>" && amTip()  after msg
  return msg
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