XFIR39VMpami~:*YEKt muhT&muhT' muhT muhT8muhT#muhT$muhT%muhT"muhT0(muhT1)muhT2*muhT93muhT=*SAC fniCFCRDXtcL SREV SREV SREV6 lccFCRDTT:: <Display which member on click-back ?(should be your Original) lccpamFknujAFCRDTT: :V?. .tSAC  $$$$$$888888<@D--This behavior is for use with the generic slider behavior. Script below will report the sliders value to the text field that this behavior is dragged on. on showValue me, currentVal sprite(me.spriteNum).member.text = string(currentVal) end showValueReportSliderValueTi,:M?. .rcsL\ \\\jKa CW p KCWkb lknujAmuhT5 +PP*UU#Uǣǣǣ1#ě|ǣȣǣ #Pzǣȣǣǣ #䚚㝤ǣǣǣǣ#u㚚ǣǣǣǤ P䚚zǣǣǤ[ + uȣǣǣ17Chb==0+䚚Uȣ1 8=h=C=h  u0\  8=CC=CC  8==h=C=1  8=h=CCh 87C==h=         ###XtcL `  L$ 8!|-}.~(/tSAC5 ' --Moves a sprite Via Rollover --Attach to the sprite to be moved --Behavior will ask for a left, right, up and down buton that you are wanting to be the triggers of the rollover --If you want to constrain it to either horizontal or vertical, then choose a sprite number/channel that does not have anything in it for the buttons/direction you do not want --speed can also be adjusted ---Props Used-------------------- property psprite, pspeed, leftbuttnumber, rightbuttnumber, movementspeed, Upbuttnumber, Downbuttnumber --------Events---------------------------- on beginsprite me psprite = sprite(me.spritenum) pspeed = movementspeed end on exitframe case the rollover of rightbuttnumber: moveitR leftbuttnumber: moveitL Upbuttnumber: moveitUp Downbuttnumber: moveitDown end case end -----Custom Handlers------------------------------------ on moveitR psprite.locH = psprite.locH + pspeed end on moveitL psprite.locH = psprite.locH - pspeed end on moveitUp psprite.locV = psprite.locV + pspeed end on moveitDown psprite.locV = psprite.locV - pspeed end ------Dialogue Box Properties------------------------------------------- on getpropertydescriptionlist PDL=[:] setaprop PDL, #leftbuttnumber, [comment: "What is the sprite # of the left button", #format: #integer, #range: [#min: 1, #max: 20], #default: 2] setaprop PDL, #rightbuttnumber, [#comment: "What is the sprite # of the right button",#format: #integer, #range: [#min: 1, #max: 20], #default: 3] setaprop PDL, #Upbuttnumber, [comment: "What is the sprite # of the Up button", #format: #integer, #range: [#min: 1, #max: 20], #default: 4] setaprop PDL, #Downbuttnumber, [#comment: "What is the sprite # of the Down button",#format: #integer, #range: [#min: 1, #max: 20], #default: 5] setaprop PDL, #movementspeed, [#comment: "What is the speed of the sprite you are moving",#format: #integer, #range: [#min: 1, #max: 20], #default: 5] return PDL end Move Sprite Via Rollover[#leftbuttnumber: [#comment: "What is the sprite # of the left button", #format: #integer, #range: [#min: 1, #max: 20], #default: 2], #rightbuttnumber: [#comment: "What is the sprite # of the right button", #format: #integer, #range: [#min: 1, #max: 20], #default: 3], #Upbuttnumber: [#comment: "What is the sprite # of the Up button", #format: #integer, #range: [#min: 1, #max: 20], #default: 4], #Downbuttnumber: [#comment: "What is the sprite # of the Down button", #format: #integer, #range: [#min: 1, #max: 20], #default: 5], #movementspeed: [#comment: "What is the speed of the sprite you are moving", #format: #integer, #range: [#min: 1, #max: 20], #default: 5]]r],=%?. .utSAC? 1c--On Click Member Change --authored by Kyle Gonyer June 2003 --Similar to On Click Member Change except the member reverts back to the original member immediately instead of staying in an "on" state. It also does not require a global list. --Surprisingly, this behavior also was never built into director's library behaviors --attach this behavior to a sprite that you want to change its appearance (swap its member) on click. You will receive pulldown menus that allow you to select your members. --This behavior will basically highlight your button on the click and revert back to the original immediately similar to how many standard buttons work ------------------------------------------------ property spriteNum property myClickSwapMember property myOriginalMember ---------------------------------------------------- on mousedown sprite(spritenum).member=member(myClickSwapMember) end on mouseup sprite(spritenum).member=member(myOriginalMember) end ----------------------------------------- on getPropertyDescriptionList PDL=[:] setaprop PDL, #myClickSwapMember, [#comment: "Display which member on click?",#format: #graphic, #default: member "Pick your member"] setaprop PDL, #myOriginalMember, [#comment: "Display which member on click-back ?(should be your Original)",#format: #graphic, #default: member "Pick your member"] return PDL end On Click Mem Highlight Briefly[#myClickSwapMember: [#comment: "Display which member on click?", #format: #graphic, #default: (member -1 of castLib 1)], #myOriginalMember: [#comment: "Display which member on click-back ?(should be your Original)", #format: #graphic, #default: (member -1 of castLib 1)]]kR,>?. ."tSAC4 &--Will change the Rollover and Mousedown to different cursors. --When using with the a scroller component, make sure this is the first behavior added to the buton/thumb graphic as the mousedown portion may behave differenty if the button/thumb has other mousedown behaviors. I have seen it behave as a mouseup (not sure why). Make it the first behavior and their should be no problem. property mycursorover property mycursordown on mouseEnter --change to hand cursor mycursorover end on mousedown -- change to closed hand cursor mycursordown end on mouseup -- change to hand cursor mycursorover end on mouseLeave --restore back to original cursor -1 end on getPropertyDescriptionList PDL = [ :] setaprop PDL, #mycursorover, [#comment: "cursor to use on over:", #format: #cursor, #default: 260] setaprop PDL, #mycursordown, [#comment: "cursor to use on mousedown:", #format: #cursor, #default: 280] return PDL end Rollover & On Down Cursor Change[#mycursorover: [#comment: "cursor to use on over:", #format: #cursor, #default: 260], #mycursordown: [#comment: "cursor to use on mousedown:", #format: #cursor, #default: 280]]_7bb,?~e?. .tSAC    m-- This behavior creates a slider from 3 graphics. You will need 1 of each of the following: --an image to represent the "thumb" handle --an image to represent the slider (will still work without it, but will not visually make sense) --OPTIONAL- a text field to send the slider's value to --behavior contains a Parameters Dialogue Box in which many parameters can be set including slider direction and range ------------------------------------------------------------ property pDirection property pMinPixel property pMaxPixel property pMinValue property pMaxValue property pMessageSprite property pMessage property pIncrement property pStatus property pSprite property pCurrentPos property pCurrentVal property pOutputFormat on beginSprite me valueRange = pMaxValue - pMinValue segments = valueRange distance = abs(pMaxPixel - pMinPixel) if distance < segments then alert "Value range exceeds slider distance." halt end if pIncrement = distance/(segments *1.0000) pSprite = sprite(me.spriteNum) if pDirection = #horizontal then pCurrentPos = pSprite.locH else pCurrentPos = pSprite.locV end if calculateVal me sendMessage me end beginSprite on mouseDown me pStatus = #slide end mouseDown on mouseUp me pStatus = #static end mouseUp on mouseUpOutSide me mouseUp me end mouseUpOutSide on exitFrame me if pStatus = #slide then positionThumb me calculateVal me sendMessage me end if end exitFrame -------------------------------------------- on positionThumb me if pDirection = #horizontal then if the mouseH > pSprite.locH then pCurrentPos = min(the mouseH, pMaxPixel) else if the mouseH < pSprite.locH then pCurrentPos = max(the mouseH, pMinPixel) end if pSprite.locH = pCurrentPos else -- vertical slider if the mouseV > pSprite.locV then pCurrentPos = min(the mouseV, max(pMinPixel,pMaxPixel)) else if the mouseV < pSprite.locV then pCurrentPos = max(the mouseV, min(pMinPixel, pMaxPixel)) end if pSprite.locV = pCurrentPos end if end positionThumb --------------------------------------- on calculateVal me distance = abs(pCurrentPos - pMinPixel) pCurrentVal = (distance/pIncrement) + pMinValue if pOutputFormat = #integerValue then pCurrentVal = integer(pCurrentVal) end calculateVal on sendMessage me sendSprite(pMessageSprite, pMessage, pCurrentVal) end sendMessage --------------------------------------------------------- on getPropertyDescriptionList pList = [:] pList[#pDirection] = [ \ #comment: "Direction:", \ #format: #symbol, \ #default: #horizontal,\ #range: [#horizontal, #vertical]] pList[#pMinPixel] = [ \ #comment: "Min pixel:", \ #format: #integer, \ #default: 10] pList[#pMaxPixel] = [ \ #comment: "Max pixel:", \ #format: #integer, \ #default: 90] pList[#pMinValue] = [ \ #comment: "Min Value:", \ #format: #integer, \ #default: 0] pList[#pMaxValue] = [ \ #comment: "Max Value:", \ #format: #integer, \ #default: 10] pList[#pMessageSprite] = [ \ #comment: "Message spriteNum:", \ #format: #integer, \ #default: 1] pList[#pMessage] = [ \ #comment: "Message:", \ #format: #symbol, \ #default: #message] pList[#pOutputFormat] = [ \ #comment: "Output value as:", \ #format: #symbol, \ #default: #integerValue,\ #range: [#integerValue, #floatValue]] return pList end getPropertyDescriptionList GenericSlider[#pDirection: [#comment: "Direction:", #format: #symbol, #default: #horizontal, #range: [#horizontal, #vertical]], #pMinPixel: [#comment: "Min pixel:", #format: #integer, #default: 10], #pMaxPixel: [#comment: "Max pixel:", #format: #integer, #default: 90], #pMinValue: [#comment: "Min Value:", #format: #integer, #default: 0], #pMaxValue: [#comment: "Max Value:", #format: #integer, #default: 10], #pMessageSprite: [#comment: "Message spriteNum:", #format: #integer, #default: 1], #pMessage: [#comment: "Message:", #format: #symbol, #default: #message], #pOutputFormat: [#comment: "Output value as:", #format: #symbol, #default: #integerValue, #range: [#integerValue, #floatValue]]]c= ,:I?. .-tSAC   Pbbbm property displayanswerfield property displayvaluefield on mouseup if member(displayvaluefield).text="8" then member(displayanswerfield).text="Correct?" else member("displayanswer").text="Incorrect?" end if end on beginsprite member("displayanswer").text="" end on getpropertydescriptionlist PDL=[:] PDL[#displayanswerfield]=[#comment: "Name of text field that will recieve the answer:", #format: #graphic,#default: "displayanswer"] PDL[#displayvaluefield]=[#comment: "Name of text field that will display the slider value:", #format: #graphic,#default: "displayvalue"] return PDL end CheckSliderAnswer[#displayanswerfield: [#comment: "Name of text field that will recieve the answer:", #format: #graphic, #default: "displayanswer"], #displayvaluefield: [#comment: "Name of text field that will display the slider value:", #format: #graphic, #default: "displayvalue"]]c=,?C?. .itSAC  + ? ? ? ? ? ? S S [ [ [ [ [ _ c-- Copyright c. 1998, ZZP Online, LLC. Free use for readers of Director Online's "The Multimedia Handyman". Visit Director Online at http://www.director-online.com. ----This behavior allows the author to select the direction that the sprites (with this behavior), will move. --It uses a global variable which is incremented by its accompaning behaviors. To make this work, you must use the accompaning behaviors mentioned below on the pieces that make up the actual scroller you are using. Extra behaviors are: --Scroller Thumb --Scroller Track --Scroller Arrow Button --NOTE: the motion of the sprite is opposite the direction of the scroll arrow and the scroller thumb in order to simulate a real scroll bar. ----------------------------------------------------- --PROPERTIES property pMyRange -- number of pixels that the sprite may move property pMyIncrement -- number of pixels that the thumb sprite will advance on the track per click property pMyStartV -- initial locV of the thumb sprite property pMyStartH -- initial locH of the thumb sprite global gScrollV -- amount scroll has been incremented Vertically from initial value global gScrollH -- amount scroll has been incremented Horizontally from initial value ------------------------------------------------------------------------- --EVENTS on beginSprite me set pMyStartH = the locH of sprite the spriteNum of me set pMyStartV = the locV of sprite the spriteNum of me -- keeps the sprite in its orinial position initially end on setThumbH me, thumbRange, thumbSprite -- Only affects if you have a Horizontal scroller set pMyIncrement = pMyRange * 1.00/thumbRange -- moves the sprite the move distance the thumbscroller is set at set the locH of sprite the spriteNum of me = pMyStartH - integer(gScrollH * pMyIncrement)--Move sprite the current location minus the integer the thumb increment is set to move. Note: Minus is being used because "the motion of the sprite is opposite the direction of the scroll arrow and scroll thumb in order to simulate a real scroll bar." end on setThumbV me, thumbRange, thumbSprite -- Only affects if you have a Vertical scroller set pMyIncrement = pMyRange * 1.00/thumbRange -- moves the sprite the move distance the thumbscroller is set at set the locV of sprite the spriteNum of me = pMyStartV - integer(gScrollV * pMyIncrement)--See "on setThumbH" handler above end on scrollH me set the locH of sprite the spriteNum of me = pMyStartH - integer(gScrollH * pMyIncrement)-- moves the sprite the move distance horitz the thumbscroller is set at when on scrollH is called end on scrollV me set the locV of sprite the spriteNum of me = pMyStartV - integer(gScrollV * pMyIncrement)-- moves the sprite the move distance vertical the thumbscroller is set at when on scrollV is called end ------------------------------------------------------ --PROPERTIES/PARAMETERS --These properties are based on your layout. You must test with the numbers to get it right. on getPropertyDescriptionList set directionList = [#HORIZONTAL, #VERTICAL] PDL = [ :] setaprop PDL, #pMyRange, [ #comment: "Range of motion (in pixels)", #format: #integer, #default: 100] return pDL end Scroll Sprites Via Slider[#pMyRange: [#comment: "Range of motion (in pixels)", #format: #integer, #default: 100]]_7,j?. .stSACS E -- Copyright c. 1998, ZZP Online, LLC. Free use for readers of Director Online's "The Multimedia Handyman". Visit Director Online at http://www.director-online.com. This behavior is for use with ScrollSpriteViaSlider. --This behavior allows the author to select the orientation for the scroller's track (horz or vert). When applied to a graphic representing the track, the behavior will allow the user to click anywhere in the track to advance the thumb sprite in increments towards that clicked spot. --Like the others, this behavior sends the position out as a global varible. (gscrollV & gScrollH) --------------------------------------------------------------- property pMyDirection -- options are Horizontal and Vertical property pMyIncrement -- number of pixels that the thumb sprite will advance per click property pThumbSprite -- the sprite number for the scroll thumb property pThumbRange -- the range of motion for the Thumb sprite global gScrollV -- amount scroll has been incremented Vertically from initial value global gScrollH -- amount scroll has been incremented Horizontally from initial value --------------------------------------------- on getPropertyDescriptionList set directionList = [#HORIZONTAL, #VERTICAL] set plist = [:] setaprop plist, #pMyDirection, [ #comment: "Direction of Slider Track", #format: #symbol, #range: directionList,#default: #VERTICAL] setaprop plist, #pMyIncrement,[ #comment: "Incremental change per click (in pixels)", #format: #integer,#default: 40] return plist end ------------------------------------------------------------------------- on setThumbV me, range, thumbSprite --the range will be refered to as "thumbSprite" when "setThumbV" is called set pThumbRange = range -- anytime the handler "pTHumbRange" is used it will represent the range set pThumbSprite = thumbSprite -- anytime "pTHumbSprite" is used it will represent thumbsprite the (range) end on setThumbH me, range, thumbsprite -- same as above except horizont set pThumbRange = range set pThumbSprite = thumbSprite end on mouseDown me if pMyDirection = #VERTICAL then if the locV of sprite pThumbSprite < the mouseV then --if the range that is currently representing the integer is less than the mouse's vertical position then... set gScrollV = min (pThumbRange, gScrollV + pMyIncrement)--position is to be else set gScrollV = max (0, gScrollV - pMyIncrement)--position is to be somewhere between 0 and where the thumb currently is end if sendSprite (pThumbSprite, #scrollThumbV)--sends vertical position to "pThumbsprite". The varible "scrollThumbV" refers to an event in the thumb scroler behavior. See this script for further definition. sendAllSprites (#scrollV) -- sends all sprites the global varible (scrollV) with vertical position of the thumb sprite else if the locH of sprite pThumbSprite < the mouseH then -- same as above but for use if the slider is horiz set gScrollH = min (pThumbRange, gScrollH + pMyIncrement) else set gScrollH = max (0, gScrollH - pMyIncrement) end if sendSprite (pThumbSprite, #scrollThumbH) sendAllSprites (#scrollH) end if end Scroller Track[#pMyDirection: [#comment: "Direction of Slider Track", #format: #symbol, #range: [#horizontal, #VERTICAL], #default: #VERTICAL], #pMyIncrement: [#comment: "Incremental change per click (in pixels)", #format: #integer, #default: 40]]c= ,-j?. .otSAC? 1-- Copyright c. 1998, ZZP Online, LLC. Free use for readers of Director Online's "The Multimedia Handyman". Visit Director Online at http://www.director-online.com. --This behavior allows the author to select the direction for which the scroller thumb will be moved when called by the Scroller Arrow Button behaviors. --It uses a global variable (gScrollV, gScrollH) which is constantly updated by the other scroller behaviors as well. --Note: After adding this behavior, you'll notice that in order to drag the scroller thumb initially you are required to click an arrow button or anywhere in the track first to initional move the thumb. The thumb scroller graphic can not initially be dragged until it is moved first by some other means. --To work around this glitch, attch a scroller track behavior to the scroller thumb graphic and give it an increment of 1 so that when you click it it moves one pixel down and frees you up to move as if it was allowed to move initially. If anyone can find a better work around or can figure out why this anomily is happening let me know by sending feedback on my site. property pMyDirection -- options are Horizontal and Vertical property pMyRange -- number of pixels that the thumb sprite may move property pMyStartV -- initial locV of the thumb sprite property pMyStartH -- initial locH of the thumb sprite global gScrollV -- amount scroll has been incremented Vertically from initial value global gScrollH -- amount scroll has been incremented Horizontally from initial value ---------------------------------------------------- on getPropertyDescriptionList set directionList = [#HORIZONTAL, #VERTICAL] plist = [:] setaprop plist, #pMyDirection, [ #comment: "Direction of Button Arrow", #format: #symbol, #range: directionList,#default: #VERTICAL], setaprop plist, #pMyRange, [ #comment: "Range of motion (in pixels)", #format: #integer,#default: 100] return plist end -------------------------------------------------------------------------- on beginSprite me if pMyDirection = #HORIZONTAL then sendAllSprites (#setThumbH, pMyRange, the spriteNum of me)--send all sprites the correct horizontal position set pMyStartH = the locH of sprite the spriteNum of me--the starting position of the thumb if gScrollH < pMyRange then set the locH of sprite the spriteNum of me = pMyStartH + gScrollH else set the locH of sprite the spriteNum of me = pMyStartH + pMyRange--forces the thumb sprite to be at the correct start point as well end if else--otherwise recognize that the scroller is vertical and do the same thing using vertical settings sendAllSprites (#setThumbV, pMyRange, the spriteNum of me) set pMyStartV = the locV of sprite the spriteNum of me if gScrollV < pMyRange then set the locV of sprite the spriteNum of me = pMyStartV + gScrollV else set the locV of sprite the spriteNum of me = pMyStartV + pMyRange end if end if end on scrollThumbH me if pMyDirection = #HORIZONTAL then--put the thumb sprite from its current position to where it needs to be according to the global varibles (gScroll). Remember gScroll is constantly being updated by the other sprites that are with the slider. Global varibles connect them all together set the locH of sprite the spriteNum of me = pMyStartH + gScrollH end if end on scrollThumbV me--same as above but with vertical settings if pMyDirection = #VERTICAL then set the locV of sprite the spriteNum of me = pMyStartV + gScrollV end if end on mouseDown me if pMyDirection = #VERTICAL then--Do several comparisions of the thumb's position in relation to the range it may travel. Also sets the global varible that all the other behaviors are using. The global varible is set in respect to the current position. set startMouse = the mouseV set startScroll = gScrollV repeat while the stillDown and gScrollV >= 0 and gScrollV <= pMyRange set gScrollV = min(pMyRange, startScroll + (the mouseV - startMouse)) set gScrollV = max (gScrollV, 0) set the locV of sprite the spriteNum of me = pMyStartV + gScrollV sendAllSprites(#ScrollV)--send the other sprites the vertical position updateStage end repeat else-- otherwise do the same but with horizontal settings set startMouse = the mouseH set startScroll = gScrollH repeat while the stillDown and gScrollH >= 0 and gScrollH <= pMyRange set gScrollH = min (pMyRange,startScroll + (the mouseH - startMouse)) set gScrollH = max(gScrollH, 0) set the locH of sprite the spriteNum of me = pMyStartH + gScrollH sendAllSprites(#ScrollH) updateStage end repeat end if endScroller Thumb[#pMyDirection: [#comment: "Direction of Button Arrow", #format: #symbol, #range: [#horizontal, #VERTICAL], #default: #VERTICAL], #pMyRange: [#comment: "Range of motion (in pixels)", #format: #integer, #default: 100]]`;$$,Yj?. .tSAC   i } } } } } } -- Copyright c. 1998, ZZP Online, LLC. Free use for readers of Director Online's "The Multimedia Handyman". Visit Director Online at http://www.director-online.com. --This behavior allows the author to select the direction that the scroller arrow button will move the sprite tagged with the "scroll sprites via slider" behavior. --It uses a global variable (global gScrollV, gScrollH)-which is accessed by the opposite scroll arrow button, as well as the other accompaning behaviors. -------------------------------------------- property pMyDirection -- options are UP, DOWN, LEFT & RIGHT property pThumbSprite -- sprite number of the corresponding scroll thumb property pThumbRange -- range of motion for the scroll thumb sprite property pMyIncrement -- converts pMyDirection to an integer value global gScrollV -- amount scroll has been incremented Vertically from initial value global gScrollH -- amount scroll has been incremented Horizontally from initial value ------------------------------------------------------------------ on getPropertyDescriptionList set directionList = [#UP, #DOWN, #LEFT, #RIGHT] plist = [:] setaprop plist, #pMyDirection, [ #comment: "Direction of Button Arrow", #format: #symbol, #range: directionList, #default: #UP] return plist end -------------------------------------------------------------- on beginSprite me case pMyDirection of -- converts string direction chosend in (parameter dialogue box) into integer increment #UP: set pMyIncrement = -1 #DOWN: set pMyIncrement = 1 #LEFT: set pMyIncrement = -1 #RIGHT: set pMyIncrement = 1 end case end on setThumbV me, range, thumbSprite if pMyDirection = #UP or pMyDirection = #DOWN then--compares your thumb's vertical direction if up or down set pThumbRange = range -- sets to the range you chose your thumb to be set at end if set pThumbSprite = thumbSprite --? end on setThumbH me, range, thumbsprite if pMyDirection = #LEFT or pMyDirection = #RIGHT then --compares your thumb's vertical direction if right or Left set pThumbRange = range -- sets to the range you chose your thumb to be set at end if set pThumbSprite = thumbSprite --? end on mouseDown me case pMyDirection of -- same type of comparing as above except compares when dragging the scroll thumb in the track #UP: repeat while the stillDown and gScrollV > 0 set gScrollV = gScrollV + pMyIncrement sendSprite(pThumbSprite, #ScrollThumbV) sendAllSprites(#ScrollV) updateStage end repeat #DOWN: repeat while the stillDown and gScrollV < pThumbRange set gScrollV = gScrollV + pMyIncrement sendSprite(pThumbSprite, #ScrollThumbV) sendAllSprites(#ScrollV) updateStage end repeat #LEFT: repeat while the stillDown and gScrollH > 0 set gScrollH = gScrollH + pMyIncrement sendSprite(pThumbSprite, #ScrollThumbH) sendAllSprites(#ScrollH) updateStage end repeat #RIGHT: repeat while the stillDown and gScrollH < pThumbRange set gScrollH = gScrollH + pMyIncrement sendSprite(pThumbSprite, #ScrollThumbH) sendAllSprites(#ScrollH) updateStage end repeat end case endScrolller Arrow Button[#pMyDirection: [#comment: "Direction of Button Arrow", #format: #symbol, #range: [#up, #down, #left, #right], #default: #up]]c=44,Sj?. . rcsL\ \``<LMIFNNNN1PXXX XEZbbb6bJdlllql<n JLBWKJMBWKJLBWKA BWKCRLELEDEEKECBWLEMEDEEKECBWLBW cursor to use on over:cursor to use on mousedown:knujZwapMembermyOriginalMembergraphic mouseEnter mouseLeavecursor mycursorover mycursordownmuhTZZ\ ZZZZ ZZZZ ZZZZZZ ZZZZZ ZZZZZZZZZZZZZZZZ  #######muhT### # ##+#  #######muhT$#$++1$#$++1$#$++1$#$++1$#$++1$#$++1$#$++1$#$1$*$1$V$$+1$#$V$$++1$$#$V$$+1$#$V$$++1$#$V$$++1$#$V$$+1$#$+$1$#$++1$#$V$++1$++1$V$V$++1$V$++1$V$V$$++1$V$++1$V$++1$++1$++1muhT$VN*N$$z*N*$$#$VN*N$$$#$NN*$$#$N*N$$#$z*N*$$#$N*N$$#$N*N$$#$N*N$$#$z*N*$$$N*N$$$N*N$$$N*N$$$N*N$$$N*N$$$NN*$$#$$N*N$$#$N*N$$#$NN*$$#$N*N$$#$N*N$$#$N*N$$$#$N*N$$#$N*N$$N*N$$*NN$muhT$$$#$$$#$$#$$#$$#$$#$$#$$$#$$$$+$$$+$$$ ++++$$$$++++$$$ ++++$$$ ++++$$#$$+$$#$+$$#$$$#$$$#$$#$$$#$$#$$$muhT$$$#$$$#$$#$$$$$$#$$$$$$#$$$$$$#$$#$$$$#$$$$$ +++$$$$ V+$$$$ V$$$$*U*$$$$ **$$$$ V*V$$$#$$ VV*$$$#$U$$$#$+++$$$#$$$$#$$$$#$$$$$$#$$$$$$#$$$$$rcsL\\\\P \`` 4 #  8CRLEEDEEEACBWLBW JCW p a  J CW Db JCW p a A J CW Db JCW p a A J CW Db JCW p a A J CW Db JCW p a A J CW Db JCW p a A J CW Db JCW p a A J CW Db JCW p a A J CW Db JCW p a A J CW D b JCW p a A  J CW D b JCW p a A  J CW D b JCW p a A  J CW D b hntzdChoose the sprite # whos text field recieves the slider's values. This will controll your animation01234567891011rcsL\ \\\jKa CW p KCWkb lmuhT#V##V#V##V#V#=Cb==## 888CbC=h# 888=C=CC## 888CbCCb# 888=C=h=VV#V##V#V###knujRtSAC4 &--Will change the Rollover and Mousedown to different cursors. --When using with the a scroller component, make sure this is the first behavior added to the buton/thumb graphic as the mousedown portion may behave differenty if the button/thumb has other mousedown behaviors. I have seen it behave as a mouseup (not sure why). Make it the first behavior and their should be no problem. property mycursorover property mycursordown on mouseEnter --change to hand cursor mycursorover end on mousedown -- change to closed hand cursor mycursordown end on mouseup -- change to hand cursor mycursorover end on mouseLeave --restore back to original cursor -1 end on getPropertyDescriptionList PDL = [ :] setaprop PDL, #mycursorover, [#comment: "cursor to use on over:", #format: #cursor, #default: 260] setaprop PDL, #mycursordown, [#comment: "cursor to use on mousedown:", #format: #cursor, #default: 280] return PDL end Rollover & On Down Cursor Change[#mycursorover: [#comment: "cursor to use on over:", #format: #cursor, #default: 260], #mycursordown: [#comment: "cursor to use on mousedown:", #format: #cursor, #default: 280]]_7bb,?~e?. .tSAC    m-- This behavior creates a slider from 3 graphics. You will need 1 of each of the following: --an image to represent the "thumb" handle --an image to represent the slider (will still work without it, but will not visually make sense) --OPTIONAL- a text field to send the slider's value to --behavior contains a Parameters Dialogue Box in which many parameters can be set including slider direction and range ------------------------------------------------------------ property pDirection property pMinPixel property pMaxPixel property pMinValue property pMaxValue property pMessageSprite property pMessage property pIncrement property pStatus property pSprite property pCurrentPos property pCurrentVal property pOutputFormat on beginSprite me valueRange = pMaxValue - pMinValue segments = valueRange distance = abs(pMaxPixel - pMinPixel) if distance < segments then alert "Value range exceeds slider distance." halt end if pIncrement = distance/(segments *1.0000) pSprite = sprite(me.spriteNum) if pDirection = #horizontal then pCurrentPos = pSprite.locH else pCurrentPos = pSprite.locV end if calculateVal me sendMessage me end beginSprite on mouseDown me pStatus = #slide end mouseDown on mouseUp me pStatus = #static end mouseUp on mouseUpOutSide me mouseUp me end mouseUpOutSide on exitFrame me if pStatus = #slide then positionThumb me calculateVal me sendMessage me end if end exitFrame -------------------------------------------- on positionThumb me if pDirection = #horizontal then if the mouseH > pSprite.locH then pCurrentPos = min(the mouseH, pMaxPixel) else if the mouseH < pSprite.locH then pCurrentPos = max(the mouseH, pMinPixel) end if pSprite.locH = pCurrentPos else -- vertical slider if the mouseV > pSprite.locV then pCurrentPos = min(the mouseV, max(pMinPixel,pMaxPixel)) else if the mouseV < pSprite.locV then pCurrentPos = max(the mouseV, min(pMinPixel, pMaxPixel)) end if pSprite.locV = pCurrentPos end if end positionThumb --------------------------------------- on calculateVal me distance = abs(pCurrentPos - pMinPixel) pCurrentVal = (distance/pIncrement) + pMinValue if pOutputFormat = #integerValue then pCurrentVal = integer(pCurrentVal) end calculateVal on sendMessage me sendSprite(pMessageSprite, pMessage, pCurrentVal) end sendMessage --------------------------------------------------------- on getPropertyDescriptionList pList = [:] pList[#pDirection] = [ \ #comment: "Direction:", \ #format: #symbol, \ #default: #horizontal,\ #range: [#horizontal, #vertical]] pList[#pMinPixel] = [ \ #comment: "Min pixel:", \ #format: #integer, \ #default: 10] pList[#pMaxPixel] = [ \ #comment: "Max pixel:", \ #format: #integer, \ #default: 90] pList[#pMinValue] = [ \ #comment: "Min Value:", \ #format: #integer, \ #default: 0] pList[#pMaxValue] = [ \ #comment: "Max Value:", \ #format: #integer, \ #default: 10] pList[#pMessageSprite] = [ \ #comment: "Message spriteNum:", \ #format: #integer, \ #default: 1] pList[#pMessage] = [ \ #comment: "Message:", \ #format: #symbol, \ #default: #message] pList[#pOutputFormat] = [ \ #comment: "Output value as:", \ #format: #symbol, \ #default: #integerValue,\ #range: [#integerValue, #floatValue]] return pList end getPropertyDescriptionList GenericSlider[#pDirection: [#comment: "Direction:", #format: #symbol, #default: #horizontal, #range: [#horizontal, #vertical]], #pMinPixel: [#comment: "Min pixel:", #format: #integer, #default: 10], #pMaxPixel: [#comment: "Max pixel:", #format: #integer, #default: 90], #pMinValue: [#comment: "Min Value:", #format: #integer, #default: 0], #pMaxValue: [#comment: "Max Value:", #format: #integer, #default: 10], #pMessageSprite: [#comment: "Message spriteNum:", #format: #integer, #default: 1], #pMessage: [#comment: "Message:", #format: #symbol, #default: #message], #pOutputFormat: [#comment: "Output value as:", #format: #symbol, #default: #integerValue, #range: [#integerValue, #floatValue]]]c= ,:I?. .tSAC   Pbbbm property displayanswerfield property displayvaluefield on mouseup if member(displayvaluefield).text="8" then member(displayanswerfield).text="Correct?" else member("displayanswer").text="Incorrect?" end if end on beginsprite member("displayanswer").text="" end on getpropertydescriptionlist PDL=[:] PDL[#displayanswerfield]=[#comment: "Name of text field that will recieve the answer:", #format: #graphic,#default: "displayanswer"] PDL[#displayvaluefield]=[#comment: "Name of text field that will display the slider value:", #format: #graphic,#default: "displayvalue"] return PDL end CheckSliderAnswer[#displayanswerfield: [#comment: "Name of text field that will recieve the answer:", #format: #graphic, #default: "displayanswer"], #displayvaluefield: [#comment: "Name of text field that will display the slider value:", #format: #graphic, #default: "displayvalue"]]c=,?C?. .tSAC  + ? ? ? ? ? ? S S [ [ [ [ [ _ c-- Copyright c. 1998, ZZP Online, LLC. Free use for readers of Director Online's "The Multimedia Handyman". Visit Director Online at http://www.director-online.com. ----This behavior allows the author to select the direction that the sprites (with this behavior), will move. --It uses a global variable which is incremented by its accompaning behaviors. To make this work, you must use the accompaning behaviors mentioned below on the pieces that make up the actual scroller you are using. Extra behaviors are: --Scroller Thumb --Scroller Track --Scroller Arrow Button --NOTE: the motion of the sprite is opposite the direction of the scroll arrow and the scroller thumb in order to simulate a real scroll bar. ----------------------------------------------------- --PROPERTIES property pMyRange -- number of pixels that the sprite may move property pMyIncrement -- number of pixels that the thumb sprite will advance on the track per click property pMyStartV -- initial locV of the thumb sprite property pMyStartH -- initial locH of the thumb sprite global gScrollV -- amount scroll has been incremented Vertically from initial value global gScrollH -- amount scroll has been incremented Horizontally from initial value ------------------------------------------------------------------------- --EVENTS on beginSprite me set pMyStartH = the locH of sprite the spriteNum of me set pMyStartV = the locV of sprite the spriteNum of me -- keeps the sprite in its orinial position initially end on setThumbH me, thumbRange, thumbSprite -- Only affects if you have a Horizontal scroller set pMyIncrement = pMyRange * 1.00/thumbRange -- moves the sprite the move distance the thumbscroller is set at set the locH of sprite the spriteNum of me = pMyStartH - integer(gScrollH * pMyIncrement)--Move sprite the current location minus the integer the thumb increment is set to move. Note: Minus is being used because "the motion of the sprite is opposite the direction of the scroll arrow and scroll thumb in order to simulate a real scroll bar." end on setThumbV me, thumbRange, thumbSprite -- Only affects if you have a Vertical scroller set pMyIncrement = pMyRange * 1.00/thumbRange -- moves the sprite the move distance the thumbscroller is set at set the locV of sprite the spriteNum of me = pMyStartV - integer(gScrollV * pMyIncrement)--See "on setThumbH" handler above end on scrollH me set the locH of sprite the spriteNum of me = pMyStartH - integer(gScrollH * pMyIncrement)-- moves the sprite the move distance horitz the thumbscroller is set at when on scrollH is called end on scrollV me set the locV of sprite the spriteNum of me = pMyStartV - integer(gScrollV * pMyIncrement)-- moves the sprite the move distance vertical the thumbscroller is set at when on scrollV is called end ------------------------------------------------------ --PROPERTIES/PARAMETERS --These properties are based on your layout. You must test with the numbers to get it right. on getPropertyDescriptionList set directionList = [#HORIZONTAL, #VERTICAL] PDL = [ :] setaprop PDL, #pMyRange, [ #comment: "Range of motion (in pixels)", #format: #integer, #default: 100] return pDL end Scroll Sprites Via Slider[#pMyRange: [#comment: "Range of motion (in pixels)", #format: #integer, #default: 100]]_7,j?. .tSACS E -- Copyright c. 1998, ZZP Online, LLC. Free use for readers of Director Online's "The Multimedia Handyman". Visit Director Online at http://www.director-online.com. This behavior is for use with ScrollSpriteViaSlider. --This behavior allows the author to select the orientation for the scroller's track (horz or vert). When applied to a graphic representing the track, the behavior will allow the user to click anywhere in the track to advance the thumb sprite in increments towards that clicked spot. --Like the others, this behavior sends the position out as a global varible. (gscrollV & gScrollH) --------------------------------------------------------------- property pMyDirection -- options are Horizontal and Vertical property pMyIncrement -- number of pixels that the thumb sprite will advance per click property pThumbSprite -- the sprite number for the scroll thumb property pThumbRange -- the range of motion for the Thumb sprite global gScrollV -- amount scroll has been incremented Vertically from initial value global gScrollH -- amount scroll has been incremented Horizontally from initial value --------------------------------------------- on getPropertyDescriptionList set directionList = [#HORIZONTAL, #VERTICAL] set plist = [:] setaprop plist, #pMyDirection, [ #comment: "Direction of Slider Track", #format: #symbol, #range: directionList,#default: #VERTICAL] setaprop plist, #pMyIncrement,[ #comment: "Incremental change per click (in pixels)", #format: #integer,#default: 40] return plist end ------------------------------------------------------------------------- on setThumbV me, range, thumbSprite --the range will be refered to as "thumbSprite" when "setThumbV" is called set pThumbRange = range -- anytime the handler "pTHumbRange" is used it will represent the range set pThumbSprite = thumbSprite -- anytime "pTHumbSprite" is used it will represent thumbsprite the (range) end on setThumbH me, range, thumbsprite -- same as above except horizont set pThumbRange = range set pThumbSprite = thumbSprite end on mouseDown me if pMyDirection = #VERTICAL then if the locV of sprite pThumbSprite < the mouseV then --if the range that is currently representing the integer is less than the mouse's vertical position then... set gScrollV = min (pThumbRange, gScrollV + pMyIncrement)--position is to be else set gScrollV = max (0, gScrollV - pMyIncrement)--position is to be somewhere between 0 and where the thumb currently is end if sendSprite (pThumbSprite, #scrollThumbV)--sends vertical position to "pThumbsprite". The varible "scrollThumbV" refers to an event in the thumb scroler behavior. See this script for further definition. sendAllSprites (#scrollV) -- sends all sprites the global varible (scrollV) with vertical position of the thumb sprite else if the locH of sprite pThumbSprite < the mouseH then -- same as above but for use if the slider is horiz set gScrollH = min (pThumbRange, gScrollH + pMyIncrement) else set gScrollH = max (0, gScrollH - pMyIncrement) end if sendSprite (pThumbSprite, #scrollThumbH) sendAllSprites (#scrollH) end if end Scroller Track[#pMyDirection: [#comment: "Direction of Slider Track", #format: #symbol, #range: [#horizontal, #VERTICAL], #default: #VERTICAL], #pMyIncrement: [#comment: "Incremental change per click (in pixels)", #format: #integer, #default: 40]]c= ,-j?. .tSAC? 1-- Copyright c. 1998, ZZP Online, LLC. Free use for readers of Director Online's "The Multimedia Handyman". Visit Director Online at http://www.director-online.com. --This behavior allows the author to select the direction for which the scroller thumb will be moved when called by the Scroller Arrow Button behaviors. --It uses a global variable (gScrollV, gScrollH) which is constantly updated by the other scroller behaviors as well. --Note: After adding this behavior, you'll notice that in order to drag the scroller thumb initially you are required to click an arrow button or anywhere in the track first to initional move the thumb. The thumb scroller graphic can not initially be dragged until it is moved first by some other means. --To work around this glitch, attch a scroller track behavior to the scroller thumb graphic and give it an increment of 1 so that when you click it it moves one pixel down and frees you up to move as if it was allowed to move initially. If anyone can find a better work around or can figure out why this anomily is happening let me know by sending feedback on my site. property pMyDirection -- options are Horizontal and Vertical property pMyRange -- number of pixels that the thumb sprite may move property pMyStartV -- initial locV of the thumb sprite property pMyStartH -- initial locH of the thumb sprite global gScrollV -- amount scroll has been incremented Vertically from initial value global gScrollH -- amount scroll has been incremented Horizontally from initial value ---------------------------------------------------- on getPropertyDescriptionList set directionList = [#HORIZONTAL, #VERTICAL] plist = [:] setaprop plist, #pMyDirection, [ #comment: "Direction of Button Arrow", #format: #symbol, #range: directionList,#default: #VERTICAL], setaprop plist, #pMyRange, [ #comment: "Range of motion (in pixels)", #format: #integer,#default: 100] return plist end -------------------------------------------------------------------------- on beginSprite me if pMyDirection = #HORIZONTAL then sendAllSprites (#setThumbH, pMyRange, the spriteNum of me)--send all sprites the correct horizontal position set pMyStartH = the locH of sprite the spriteNum of me--the starting position of the thumb if gScrollH < pMyRange then set the locH of sprite the spriteNum of me = pMyStartH + gScrollH else set the locH of sprite the spriteNum of me = pMyStartH + pMyRange--forces the thumb sprite to be at the correct start point as well end if else--otherwise recognize that the scroller is vertical and do the same thing using vertical settings sendAllSprites (#setThumbV, pMyRange, the spriteNum of me) set pMyStartV = the locV of sprite the spriteNum of me if gScrollV < pMyRange then set the locV of sprite the spriteNum of me = pMyStartV + gScrollV else set the locV of sprite the spriteNum of me = pMyStartV + pMyRange end if end if end on scrollThumbH me if pMyDirection = #HORIZONTAL then--put the thumb sprite from its current position to where it needs to be according to the global varibles (gScroll). Remember gScroll is constantly being updated by the other sprites that are with the slider. Global varibles connect them all together set the locH of sprite the spriteNum of me = pMyStartH + gScrollH end if end on scrollThumbV me--same as above but with vertical settings if pMyDirection = #VERTICAL then set the locV of sprite the spriteNum of me = pMyStartV + gScrollV end if end on mouseDown me if pMyDirection = #VERTICAL then--Do several comparisions of the thumb's position in relation to the range it may travel. Also sets the global varible that all the other behaviors are using. The global varible is set in respect to the current position. set startMouse = the mouseV set startScroll = gScrollV repeat while the stillDown and gScrollV >= 0 and gScrollV <= pMyRange set gScrollV = min(pMyRange, startScroll + (the mouseV - startMouse)) set gScrollV = max (gScrollV, 0) set the locV of sprite the spriteNum of me = pMyStartV + gScrollV sendAllSprites(#ScrollV)--send the other sprites the vertical position updateStage end repeat else-- otherwise do the same but with horizontal settings set startMouse = the mouseH set startScroll = gScrollH repeat while the stillDown and gScrollH >= 0 and gScrollH <= pMyRange set gScrollH = min (pMyRange,startScroll + (the mouseH - startMouse)) set gScrollH = max(gScrollH, 0) set the locH of sprite the spriteNum of me = pMyStartH + gScrollH sendAllSprites(#ScrollH) updateStage end repeat end if endScroller Thumb[#pMyDirection: [#comment: "Direction of Button Arrow", #format: #symbol, #range: [#horizontal, #VERTICAL], #default: #VERTICAL], #pMyRange: [#comment: "Range of motion (in pixels)", #format: #integer, #default: 100]]`;$$,Yj?. .tSAC   i } } } } } } -- Copyright c. 1998, ZZP Online, LLC. Free use for readers of Director Online's "The Multimedia Handyman". Visit Director Online at http://www.director-online.com. --This behavior allows the author to select the direction that the scroller arrow button will move the sprite tagged with the "scroll sprites via slider" behavior. --It uses a global variable (global gScrollV, gScrollH)-which is accessed by the opposite scroll arrow button, as well as the other accompaning behaviors. -------------------------------------------- property pMyDirection -- options are UP, DOWN, LEFT & RIGHT property pThumbSprite -- sprite number of the corresponding scroll thumb property pThumbRange -- range of motion for the scroll thumb sprite property pMyIncrement -- converts pMyDirection to an integer value global gScrollV -- amount scroll has been incremented Vertically from initial value global gScrollH -- amount scroll has been incremented Horizontally from initial value ------------------------------------------------------------------ on getPropertyDescriptionList set directionList = [#UP, #DOWN, #LEFT, #RIGHT] plist = [:] setaprop plist, #pMyDirection, [ #comment: "Direction of Button Arrow", #format: #symbol, #range: directionList, #default: #UP] return plist end -------------------------------------------------------------- on beginSprite me case pMyDirection of -- converts string direction chosend in (parameter dialogue box) into integer increment #UP: set pMyIncrement = -1 #DOWN: set pMyIncrement = 1 #LEFT: set pMyIncrement = -1 #RIGHT: set pMyIncrement = 1 end case end on setThumbV me, range, thumbSprite if pMyDirection = #UP or pMyDirection = #DOWN then--compares your thumb's vertical direction if up or down set pThumbRange = range -- sets to the range you chose your thumb to be set at end if set pThumbSprite = thumbSprite --? end on setThumbH me, range, thumbsprite if pMyDirection = #LEFT or pMyDirection = #RIGHT then --compares your thumb's vertical direction if right or Left set pThumbRange = range -- sets to the range you chose your thumb to be set at end if set pThumbSprite = thumbSprite --? end on mouseDown me case pMyDirection of -- same type of comparing as above except compares when dragging the scroll thumb in the track #UP: repeat while the stillDown and gScrollV > 0 set gScrollV = gScrollV + pMyIncrement sendSprite(pThumbSprite, #ScrollThumbV) sendAllSprites(#ScrollV) updateStage end repeat #DOWN: repeat while the stillDown and gScrollV < pThumbRange set gScrollV = gScrollV + pMyIncrement sendSprite(pThumbSprite, #ScrollThumbV) sendAllSprites(#ScrollV) updateStage end repeat #LEFT: repeat while the stillDown and gScrollH > 0 set gScrollH = gScrollH + pMyIncrement sendSprite(pThumbSprite, #ScrollThumbH) sendAllSprites(#ScrollH) updateStage end repeat #RIGHT: repeat while the stillDown and gScrollH < pThumbRange set gScrollH = gScrollH + pMyIncrement sendSprite(pThumbSprite, #ScrollThumbH) sendAllSprites(#ScrollH) updateStage end repeat end case endScrolller Arrow Button[#pMyDirection: [#comment: "Direction of Button Arrow", #format: #symbol, #range: [#up, #down, #left, #right], #default: #up]]c=44,Sj?. .rcsL\\\\P \`` 4 #  8CRLEEDEEEACBWLBW JCW p a  J CW Db JCW p a A J CW Db JCW p a A J CW Db JCW p a A J CW Db JCW p a A J CW Db JCW p a A J CW Db JCW p a A J CW Db JCW p a A J CW Db JCW p a A J CW D b JCW p a A  J CW D b JCW p a A  J CW D b JCW p a A  J CW D b hntzdChoose the sprite # whos text field recieves the slider's values. This will controll your animation01234567891011rcsL:::\\jj6J@ w!    %  "...). 0<<<"-<>2  Ka CW PJP CfdJ BV-dJ BVdJ BVdJBVe JJaJb JJaJb JJaJb JJaJb CRLEEDEEEE AE!ACEACBWLEEDEEEE AE!ACEACBWLEEDEEEE AE!ACEACBWLEEDEEEE AE!ACEACBWLEEDEEEE AE!ACEACBWLBW $$$$$,Z(What is the sprite # of the left button)What is the sprite # of the right button&What is the sprite # of the Up button(What is the sprite # of the Down button/What is the speed of the sprite you are movingrcsL~~~\ ~\dhV ^)('&-*|Z"" #"E&$ -%  f1 ,"NNR :R Ka A \P&Ka A\P' J)?KP(Ka J&I*J(CWA ]+, J)?KP(Ka J'I-J(CWA]+, Ka J&I*J(CWA ]Ka J'I-J(CWA]E.E/CRCRLE)EDEEEAdCBWLBW0 Range of motion (in pixels)rcsL\ \dh&L62(65-*G hhll # r|" #1|W(E.E/CRCRLE2EDEE3ELEE/CBWLE(EDEEEA(CBWLBW04 KP5KP6,KP5KP6,J2E/>J6A\Cf7 J5I-J(CW O-I-J(CW!O-J6E9BW8E%BW:;J6A \Cf; J5I*J(CW O*I*J(CW!O*J6EF2)'&-*GNu "$$,$<6LNN 3N9Rhjj t9j1n %? E.E/CRCRLE2EDEE3ELEE/CBWLE)EDEEEAdCBWLBW04 J2E.AE"J)Ka BW:Ka A \P&I*J) Ka J&I*A ]Ka J&J)A ]>E#J)Ka BW:Ka A\P'I-J) Ka J'I-A]Ka J'J)A]    J2E.Ka J&I*A ] J2E/Ka J'I-A] J2E/VCf7RI-RCf=I-I-J) 7J)LCf7LCW O-I-CW!O-Ka J'I-A]E%BW:BW>TDSCf;RI*RCf=I*I*J) 7J)LCf;LCW O*I*CW!O*Ka J&I*A ]E$BW:BW>TD@?  Direction of Button ArrowRange of motion (in pixels)rcsL***\ (\dh 265(-*4N3 @_#s#" *11EAEBECEDCRCRLE2EDEE3ELEEACBWLBW04 J2dEA A P(.dEB AP(dEC A P(dEDAP(e J2EAJ2EBKP5KP6,J2ECJ2EDKP5KP6,J2dEA-Cf=I-I-J(O-J6E9BW8E%BW:BW>T%dEB.Cf=I-J5 I-J(O-J6E9BW8E%BW:BW>T&edEC-Cf=I*I*J(O*J6ET%3dED+Cf=I*J5 I*J(O*J6ET&e    Direction of Button ArrowrcsL\\bb^|v FG1KEBRRT T J CW JFCW b J CW JGCW b CRLEFEDEEHEDCW CBWLEGEDEEHEDCW CBWLBW $:Display which member on click?Pick your member>Display which member on click-back ?(should be your Original)rcsL\ \``<LMIFNNNN1PXXX XEZbbb6bJdlllql<n JLBWKJMBWKJLBWKA BWKCRLELEDEEKECBWLEMEDEEKECBWLBW cursor to use on over:cursor to use on mousedown:rcsL\ \v v ZVUSRefY_[bccxz1+E/N3G7O^``@`P&p^TQ  )Z `$ JRJSRLRJUJVCWTRLL DBWWBWXLL?PYKa CW PJZE. JaP[ JaP[KBVKBV\^]   E`P_EaP_KBVJ_E`KBVKBVKBVJZE.?Cf;JaCf;JUCW P[Cf;Ja Cf;JVCW!P[JJ[bHCf7JaCf7JVJUCW!CW P[!Cf7Ja Cf7JVJUCW CW!P[JJ[b   J[JVCWTRLJYJSPbJcEd JbCWPb] JeJfJbBW8 CRLEZEDEE3EE.EE.E/CCBggLEVEDEEEA CBggLEUEDEEEAZCBggLESEDEEECBggLEREDEEEA CBggLEeEDEEEACBggLEfEDEE3EEhCBggLEcEDEE3EEdEEdEiCCBggLBW4  *:JZjz%Value range exceeds slider distance. Direction: Min pixel: Max pixel: Min Value: Max Value:Message spriteNum: Message:Output value as:rcsLddd\ `\```nmE&C  : ZZ\*\ JmCW a DJnCW Db DCW Db  DCW Db  CRLEnEDEEHEDCBggLEmEDEEHEDCBggLBW &6<r8 Correct?displayanswer Incorrect?1Name of text field that will recieve the answer:7Name of text field that will display the slider value: displayvaluemanLiUUogetPropertyDescriptionList prepareFramesetaProp valuefieldcommentformatintegerdefaultreturnPDLspritemembertext spriteNum beginSprite exitFramemoveitRmoveitLmoveitUp moveitDownpSpritepSpeed movementspeedmerolloverrightbuttnumberleftbuttnumber UpbuttnumberDownbuttnumberlocHlocVrangeminmax setThumbH setThumbVScrollHScrollV pMyStartH pMyStartV pMyIncrementpMyRangegScrollH thumbRange thumbSpritegScrollV horizontalvertical directionList mouseDown pMyDirectionsymbolpList pThumbRange pThumbSpritemouseV sendSprite scrollThumbVsendAllSpritesmouseH scrollThumbH stillDown updateStage StartScroll startMouseupdownleftrightmouseUpmyClickSwapMembermyOriginalMembergraphic mouseEnter mouseLeavecursor mycursorover mycursordownmouseUpOutSide positionThumb calculateVal sendMessage pMaxValue pMinValueabs pMaxPixel pMinPixelalerthalt pIncrement pDirection pCurrentPos valueRangedistancesegmentspStatusslidestatic pCurrentVal pOutputFormat integerValuepMessageSpritepMessagesetAtmessage floatValue showValuestring CurrentValdisplayvaluefielddisplayanswerfieldmuhT4 $++$$++$$++$$++$+$$++$$$++$2$$++$"@$$++$2@$$$++22$$$++$$+$@$$++$$$++$@$$+$$$++$+$@$+$$++$2+"+2+$$+$29$$$2"$$++$@$$++$2+$$++$8$$++$$++$$++$$+$$++$92$$9$$++$92$@ $$++$9"9@@@+$$++$9++92$$$++$9$21$$++$2$2 $$$muhTj $++$$++$$$++$$$++$Oഴ+$$++$$$++$z$$$++$$$$++$$$$$z$$$$$$+$++$$++$$$++$$$+$$$++$O$$++$z$$+$$$$++$$$++$$$$++$$$$$$$++$$$$$$$$++$$$$$$$$$++$$$$$$$$++$$$$$$$$++$$$$$$$$$$++$$$$$$++$$$$++$$$++$$$muhT0 $++$$++$$++$$++$$++$#$$++$##$$++$$#$$++$$##$$$ $##$##$$$$ $####$$$$+$$$#$$$++$$#$$$++$$$$+$$$++$$++$$+$$$$++$$$++$$$$++$$$$$$$++$$$$$$$$++$$$$$$$$$++$$$$$$$$++$$$$$$$$++$$$$$$$$$$++$$$$$$++$$$$++$$$++$$$pammdHXFIRv>pami pamm64*YEKtSACFCRDT~knujtSAC?XtcL4tSACLtSAC5 pfniClSREV manLi6+rcsL\n muhTknujf2knuj,rcsL:muhT5r2tSAC4DtSAC tSACSknujb,knuj5knuj jGtSAC?(knujTrcsL~rcsLrcsL&rcsL*rcsLrcsL muhTģmuhTTmuhTmuhTrmuhT4muhTVtSACtSAC/tSACknuj04knujZrcsL"rcsL1rcsLd(muhT4/muhTj1muhT0V4knujT0knujl3*SAC0Rknuj8+knuj5 (76knuj?fB7knuj4 8knuj I9knujSW:knuj?e;knuj6z<knujX=knuj\ >knuj:?knuj~Ɛ@knujLAknujؕBknuj*fCknujDknujEknujFtSAC w   -- This action will move a sprite of your choosing whenever the "movesprite" handler is called. This one calls it on mousedown. Just fill in the settings and you're all set. --declares properties that will be controlled property pDirection, pRange, pLeader --calls the move sprite handler on mousedown -- repeat while the stilldown = true movesprite end repeat end -------------------------------------------- --custom move sprite handler on movesprite Case (pDirection) of "Move horizontally": sprite(pleader).loch = sprite(pleader).loch + pRange end case end -------------------------------------- --the following creates a properties dialogue box to adjust range & direction properties with a GUI interface on getPropertyDescriptionList description =[:] --description is empty until you enter something --1st control addProp description, #pDirection,[#comment: "Select your option:", #format:#String,#range:["Move horizontally", "Move vertically"], #default:"Move vertically"] --2nd control addProp description, #pRange, [#comment: "Move direction :positive is down or scroll up, neg is up or scroll down. If you chose horizont: posit. is right & neg is left.", #format:#Integer, #range:[#min:-101,#Max:101],#default:40] --3rd control addprop description, #pleader, [#comment: "Number of leader sprite that you want to control?", #format: #Integer, #default:3] return description --returns your choices to the handler end Move Sprite via Click[#pDirection: [#comment: "Select your option:", #format: #string, #range: ["Move horizontally", "Move vertically"], #default: "Move vertically"], #pRange: [#comment: "Move direction :positive is down or scroll up, neg is up or scroll down. If you chose horizont: posit. is right & neg is left.", #format: #integer, #range: [#min: -101, #max: 101], #default: 40], #pLeader: [#comment: "Number of leader sprite that you want to control?", #format: #integer, #default: 3]]w@,>EW?'. .tSAC  wH\\pppp-- Follow Leader Sprite is a modified version of the native Dir 8 Multiple Sprite Drag behavior -- This behavior moves multiple sprites as group to follow a leader sprite instead of a dragged sprite that the cursor must be on -- The behavior allows for other sprites to follow a leader sprite that is moved via up and down arrows or any handler for that matter -- This behavior was created to simulate a scrolling stage. Example: scroll through a form that is longer than the stage -- The advantage of this behavior is that it makes you no longer limited to following sprites that are moved via drag only -- The leader sprite will be set to the sprite number that you select when first dragging the behavior on your sprite on getBehaviorDescription me return \ "MULTIPLE SPRITE FOLLOW" & RETURN & RETURN & \ "move multiple sprites as single group. " & \ "Multiple sprite groupings can be created in order to create separate moveable clusters of sprites" & RETURN & RETURN & \ "PERMITTED MEMBER TYPES: " & RETURN & \ "All" & RETURN & RETURN & \ "Direct to Stage may affect the appearance of sprites that are being moved." & RETURN & RETURN & \ "PARAMETERS: " & RETURN & \ "None" end getBehaviorDescription on getBehaviorTooltip me return \ "Makes multiple sprites follow as a single unit." & RETURN & RETURN & \ "You can associate sprites into different groupings, or use the behavior with one sprite per group to create combinations of following groups." end getBehaviorTooltip -- PROPERTIES -- property pSprite -- sprite object property pLocOffset -- offset of leader from sprites property pLeadSprite -- identifies sprite as main leader property pDragGroup -- dragging group property pLeadspriteLoc -- Lead sprite's location property pleader -- Leader Sprite ------------------------------------------------- -- EVENT HANDLERS -- on beginSprite me -- determine sprite object reference pSprite = sprite (me.spriteNum) -- set the lead sprite to be active pLeadSprite = true pLeadSpriteLoc= sprite(pleader).loc -- send message to other sprites in group to get ready to start moving sendAllSprites (#mDragGroup, pDragGroup) end beginSprite on prepareFrame me -- main leader sends messages to other sprites in group -- including its location sendAllSprites (#mMoveGroup, pDragGroup, sprite(pleader).loc) end prepareFrame me --------------------------------------------------------- -- CUSTOM HANDLERS -- on mDragGroup me, vGroup -- test to see if message is sent to group sprite belongs to if pDragGroup = vGroup then -- find vector to the lead sprite's loc and group pLocOffset = pSprite.loc - pLeadspriteLoc end if end mDrag on mMoveGroup me, vGroup, vLoc -- updates sprite positions -- test to see if message is sent to the group current sprite belongs to if pDragGroup = vGroup then -- move sprite to offseted location that is the difference between leader and the sprite's loc pSprite.loc = vLoc + pLocOffset end if end mDragSprite ------------------------------------------------------------- -- AUTHOR-DEFINED PARAMETERS -- on isOKToAttach (me, aSpriteType, aSpriteNum) case aSpriteType of #graphic: return TRUE #script: return FALSE end case end isOKToAttach on getPropertyDescriptionList vPDList = [:] setaProp vPDList, #pDragGroup, [#comment: "Follow Group", #format: #integer, #default: 1, #range: [#min: 1, #max: 100]] setaprop vPDList, #pleader, [#comment: "Choose your sprite leader", #format: #integer, #default: 3] return vPDList end getPropertyDescriptionList Follow Leader Sprite [#pDragGroup: [#comment: "Follow Group", #format: #integer, #default: 1, #range: [#min: 1, #max: 100]], #pLeader: [#comment: "Choose your sprite leader", #format: #integer, #default: 3]] _F\,?'. .rcsL:::\\jj6J@ w!    %  "...). 0<<<"-<>2  Ka CW PJP CfdJ BV-dJ BVdJ BVdJBVe JJaJb JJaJb JJaJb JJaJb CRLEEDEEEE AE!ACEACBWLEEDEEEE AE!ACEACBWLEEDEEEE AE!ACEACBWLEEDEEEE AE!ACEACBWLEEDEEEE AE!ACEACBWLBW $$$$$,Z(What is the sprite # of the left button)What is the sprite # of the right button&What is the sprite # of the Up button(What is the sprite # of the Down button/What is the speed of the sprite you are movingrcsL~~~\ ~\dhV ^)('&-*|Z"" #"E&$ -%  f1 ,"NNR :R Ka A \P&Ka A\P' J)?KP(Ka J&I*J(CWA ]+, J)?KP(Ka J'I-J(CWA]+, Ka J&I*J(CWA ]Ka J'I-J(CWA]E.E/CRCRLE)EDEEEAdCBWLBW0 Range of motion (in pixels)rcsL\ \dh&L62(65-*G hhll # r|" #1|W(E.E/CRCRLE2EDEE3ELEE/CBWLE(EDEEEA(CBWLBW04 KP5KP6,KP5KP6,J2E/>J6A\Cf7 J5I-J(CW O-I-J(CW!O-J6E9BW8E%BW:;J6A \Cf; J5I*J(CW O*I*J(CW!O*J6EF2)'&-*GNu "$$,$<6LNN 3N9Rhjj t9j1n %? E.E/CRCRLE2EDEE3ELEE/CBWLE)EDEEEAdCBWLBW04 J2E.AE"J)Ka BW:Ka A \P&I*J) Ka J&I*A ]Ka J&J)A ]>E#J)Ka BW:Ka A\P'I-J) Ka J'I-A]Ka J'J)A]    J2E.Ka J&I*A ] J2E/Ka J'I-A] J2E/VCf7RI-RCf=I-I-J) 7J)LCf7LCW O-I-CW!O-Ka J'I-A]E%BW:BW>TDSCf;RI*RCf=I*I*J) 7J)LCf;LCW O*I*CW!O*Ka J&I*A ]E$BW:BW>TD@?  Direction of Button ArrowRange of motion (in pixels)rcsL***\ (\dh 265(-*4N3 @_#s#" *11EAEBECEDCRCRLE2EDEE3ELEEACBWLBW04 J2dEA A P(.dEB AP(dEC A P(dEDAP(e J2EAJ2EBKP5KP6,J2ECJ2EDKP5KP6,J2dEA-Cf=I-I-J(O-J6E9BW8E%BW:BW>T%dEB.Cf=I-J5 I-J(O-J6E9BW8E%BW:BW>T&edEC-Cf=I*I*J(O*J6ET%3dED+Cf=I*J5 I*J(O*J6ET&e    Direction of Button ArrowrcsL\ \v v ZVUSRefY_[bccxz1+E/N3G7O^``@`P&p^TQ  )Z `$ JRJSRLRJUJVCWTRLL DBWWBWXLL?PYKa CW PJZE. JaP[ JaP[KBVKBV\^]   E`P_EaP_KBVJ_E`KBVKBVKBVJZE.?Cf;JaCf;JUCW P[Cf;Ja Cf;JVCW!P[JJ[bHCf7JaCf7JVJUCW!CW P[!Cf7Ja Cf7JVJUCW CW!P[JJ[b   J[JVCWTRLJYJSPbJcEd JbCWPb] JeJfJbBW8 CRLEZEDEE3EE.EE.E/CCBggLEVEDEEEA CBggLEUEDEEEAZCBggLESEDEEECBggLEREDEEEA CBggLEeEDEEEACBggLEfEDEE3EEhCBggLEcEDEE3EEdEEdEiCCBggLBW4  *:JZjz%Value range exceeds slider distance. Direction: Min pixel: Max pixel: Min Value: Max Value:Message spriteNum:H Message:bOutput value as:crcsLddd\ `\```nmE&C  : ZZ\*\ JmCW a DJnCW Db DCW Db  DCW Db  CRLEnEDEEHEDCBggLEmEDEEHEDCBggLBW &6<r8 Correct?displayanswer Incorrect?1Name of text field that will recieve the answer:7Name of text field that will display the slider value: displayvaluercsL\  \bbZqp1/o h  BVJZdDJpCW JpCW aJqbeCRLEZEDEEkEDDCEDCBWrLEqEDEEEE Ae E!AeCEA(CBWrLEpEDEEEACBWrLBWs %.BMove horizontallySelect your option:Move verticallyMove direction :positive is down or scroll up, neg is up or scroll down. If you chose horizont: posit. is right & neg is left.2Number of leader sprite that you want to control?rcsL\  \hh 8<}y|zpt: u.000!4VXX*X`rtt5tvx ?w Gx' SG..0 J^0DD D D D D D D D D D D D D D D D D BW9D D D D BWKa CW PAPyJpCW a{PzEvJ|BW:  EwJ|JpCW a{BW:J|K Ja{JzP}~ J|K JKJ}b{~ KdEHeABWdE eBWe CRLE|ED EEEAEE AE!AdCCBWLEpED EEEACBWLBW$"N*<Fz MULTIPLE SPRITE FOLLOW (move multiple sprites as single group. bMultiple sprite groupings can be created in order to create separate moveable clusters of spritesPERMITTED MEMBER TYPES: AllKDirect to Stage may affect the appearance of sprites that are being moved. PARAMETERS: None0Makes multiple sprites follow as a single unit.You can associate sprites into different groupings, or use the behavior with one sprite per group to create combinations of following groups. Follow GroupChoose your sprite leadermanLK77getPropertyDescriptionList prepareFramesetaProp valuefieldcommentformatintegerdefaultreturnPDLspritemembertext spriteNum beginSprite exitFramemoveitRmoveitLmoveitUp moveitDownpSpritepSpeed movementspeedmerolloverrightbuttnumberleftbuttnumber UpbuttnumberDownbuttnumberlocHlocVrangeminmax setThumbH setThumbVScrollHScrollV pMyStartH pMyStartV pMyIncrementpMyRangegScrollH thumbRange thumbSpritegScrollV horizontalvertical directionList mouseDown pMyDirectionsymbolpList pThumbRange pThumbSpritemouseV sendSprite scrollThumbVsendAllSpritesmouseH scrollThumbH stillDown updateStage StartScroll startMouseupdownleftrightmouseUpmyClickSwapMembermyOriginalMembergraphic mouseEnter mouseLeavecursor mycursorover mycursordownmouseUpOutSide positionThumb calculateVal sendMessage pMaxValue pMinValueabs pMaxPixel pMinPixelalerthalt pIncrement pDirection pCurrentPos valueRangedistancesegmentspStatusslidestatic pCurrentVal pOutputFormat integerValuepMessageSpritepMessagesetAtmessage floatValue showValuestring CurrentValdisplayvaluefielddisplayanswerfield movespritepLeaderpRangeaddProp descriptiongetBehaviorDescriptiongetBehaviorTooltip mDragGroup mMoveGroup isOKToAttach pLeadSpritepLeadSpriteLocloc pDragGroup pLocOffsetvGroupvLocscript aSpriteNum aSpriteTypevPDListmuhTR#####=Cb==#0 88CbC=h##0Z 88=C=CC# 88CbCCb## 88=C=h=#   #1#pammdV4XFIRpami L!pamm~!*YEKt,tSACFCRDTknujtSAC?~XtcLb tSAC*tSAC5 5fniClSREV manLKxrcsL\muhTknujf2tSAC~>rcsL:WmuhT5r2tSAC4"HtSAC btSACSpknujtknujZbknuj?FtSAC?@knujRrcsL~Z[rcsL]rcsLl`rcsL*crcsLfrcsLLmuhTģmuhTTmuhTmuhTrmuhT4muhTVtSAC^MtSAC tSAC^knujl6knujLrcsL,grcsLLrcsLdlmuhT4/muhTj1muhT0V4tSAC Gknuj6+knuj0R<knujdUrcsL(rmuhTRl}muhTknujknujT~:knujl;*SAC8xknuj5knuj5 p>knuj?(?knuj4D@knujAknuj/BknujCknuj DknujSErcsLhoknuj4,knuj\n Hknuj:Iknuj~JknujKknuj&Lknuj*MknujNknuj Oknuj"Pknuj1Qknujd(Rknuji6+Sknuj T