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
Developing Projects Using Director and ASP
QuickTime Silent Install
NAB - 'Not Another Button'
Royalty Free Music from NEO Sounds
Can't change field value - Valentina
MediaPlayer Xtra
Text Outliner
Foundation Flash 5
FlushEventsXtra
Install QuickTime
 

 

 

Behavior playheadSlider

Added on 7/31/2001

 

Compatibilities:
behavior D8

This item has not yet been rated

Author: Ulla (website)

controlls the playhead to go forwards or backwards. Can be used in connection with "StartFramesScript" + "MostFramesScript" + "EndFramesScript", which controlls the playhead with mouseposition, and uses the Slider as Indikator

Download PC Source
-- DESCRIPTION --

on getBehaviorDescription me
  return \
    "sliderbuttonBehavior" & RETURN & RETURN & \
    "Drop this behavior on the sliderbuttonSprite." & \
    "Controlls the playhead to go forwards or backwards." & RETURN & RETURN & \
    "the slider needs to be exactly (=(½ x the total number of framesToGo)-5)pixels wide." & RETURN & RETURN & \
    "to prevent the button from going too far or too short." & RETURN & RETURN & \
    "Not tested for compatibility with Java." & RETURN & RETURN & \
    "PARAMETERS: None"
end getBehaviorDescription


on getBehaviorTooltip me
  return \
    "SpriteBehavior. " & \
    "Drop on the sliderbuttonSprite" & \
    "Controlls the playhead to go forwards or backwards." & \
    "Not tested for compatibility with Java."
end getBehaviorTooltip



-- HISTORY --

-- 15. June  2001, written by Ulla Bensby, www.uebweb.dk as an assignment  
-- for Kjell Yngve Petersen, www.boxiganga.dk. ....WARNING! don't work for him without written agreement!
-- Unfortunately, after I've been working (slaving, in fact) for him one whole month, full-time,
-- I asked for an extra 2,5$ fee pr. change of  elements already made according to agreement,
-- and then he fired me without payment. What a shame, he seemed so nice!
-- Hopefully the behaviors can be usefull to someone else


property pFrameOffset, pThisFrame, pOffset
property pNewloc, pAbs, pAbsH, pPressed, pClickDiff





on mouseEnter me
  cursor 260
end
on mouseWithin me
  cursor 260
end


on mouseLeave me
  cursor -1
  
end

on mouseDown me
  pThisFrame = the frame
  pAbsH = sprite(me.spriteNum).locH
  pPressed = True
  sprite(me.spriteNum).moveableSprite = True
  sendSprite(0,#Drag)
  pClickDiff = sprite(me.spriteNum).loc - the clickLoc
  cursor 290
  updateStage
  
end

on exitframe me
  if pPressed = True then
    sprite(me.spriteNum).loc = the mouseLoc
  end if
  
end exitframe me


on mouseUp me
  pPressed = False
  sendSprite(0,#Release)
  sprite(me.spriteNum).loc = the mouseLoc + pClickDiff
  pNewloc = sprite(me.spriteNum).locH
  pOffset = pNewloc - pAbsH
  go to frame pThisFrame + (2*pOffset)
  UpdateStage
  cursor 260
  
  
end

 


Contact

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

Send e-mail