Professional Web Applications Themes

Custom Scroll Bar: Want to switch scrolling member, but keep scrolling intact. - Macromedia Director Lingo

Hey all. This is a juicy one. Simple Idea, Simple minded author can't find solution.... I have a text member in sprite 29. I have the "Custom Scrollbar" behavior from the Library Palette attached to 4 graphic elements I have created. They are: the upArrow is on sprite 25. the downArrow is on sprite 26. the bar is on sprite 27. the dragger is on sprite 28. I have 3 other buttons (Live, Work, Play) on the interface that are supposed to switch sprite 29's current text member to a different member on MouseUp. I have all that code and ...

  1. #1

    Default Custom Scroll Bar: Want to switch scrolling member, but keep scrolling intact.

    Hey all. This is a juicy one.

    Simple Idea, Simple minded author can't find solution....

    I have a text member in sprite 29.
    I have the "Custom Scrollbar" behavior from the Library Palette attached to
    4 graphic elements I have created. They are:
    the upArrow is on sprite 25.
    the downArrow is on sprite 26.
    the bar is on sprite 27.
    the dragger is on sprite 28.

    I have 3 other buttons (Live, Work, Play) on the interface that are
    supposed to switch sprite 29's current text member to a different member on
    MouseUp. I have all that code and it all works fine for the 3 buttons BUT
    the scrolling behavior attached to the 4 custom sprites ceases to work when
    I switch sprite 29's text member. The dragger works and Up and Down Arrows
    click but the new text member dos not work. But when I switch it back to the
    original text member it returns to it's jolly working self.

    I know why it doesn't work. It's because the member identified in the
    parameter box is no longer the same.

    If you read on lines 687 through 701 in the script window it explains how to
    change the member on the fly using sendAllSprites command.

    Where do I use this command? and what would it read? Do I use this on the
    MouseUP command of the 3 buttons used to switch the memebr?


    HELP HELP HELP!!!!!

    Thanks for your time,
    joe.


    Joe Guest

  2. #2

    Default Re:Custom Scroll Bar: Want to switch scrolling member, but keep scrolling intact.

    i dun really know bout the library script, but this script is good for creating custom scroll bar, and it hav no limitation.

    create the image for :
    scroll bar
    dragger
    up button
    down button
    text

    put the image the way u want it, then attach this script to the exitframe.

    on exitframe me
    set gscroll = sprite (--dragger's sprite--).locv - (--initial locv position of dragger--)
    sprite (--text's sprite--).locv = (--initial locv of text--) - integer(gscroll * (A/B))
    sprite (--dragger's sprite--).locv = gscroll + (--initial locv position of dragger--)
    end

    p/s : A = the initial locv of text - the final locv of text
    B = the initial locv of dragger - the final locv of dragger

    on ur 3 buttons, juz attach this script.

    on mouseup me
    sprite (--text's sprite--).membernum = (--the new cast member number--)
    end

    the logic is that the position of the text is determine by the dragger, and there is no heavy variable involved. u can try it outif u want.




    Inquisytor webforumsuser@macromedia.com Guest

  3. #3

    Default Re: Custom Scroll Bar: Want to switch scrolling member, but keep scrolling intact.

    WOW! Rob,
    You are the best! Thank You so very much. You don't know how long I have
    been trying to get this problem solved!

    Thanks again!
    joe.

    "Rob Dillon" <robddg-designs.com> wrote in message
    news:310720030754017138%robddg-designs.com...
    > Hi Joe,
    >
    > That Library behavior sets the member to be scrolled only when the
    > behavior starts up. The myScrolledSprite and myScrolledMember are the
    > two references that you need to pay attention to.
    >
    > Since the operation of scrolling text in Director actually applies to
    > the member and not the sprite, you have to tell the behavior to scroll
    > a new member when you change that member of the scrolling sprite.
    >
    > SendAllSprites would be a good way to do that. Since each of the
    > members that you are using might not be exactly the same size, it looks
    > like the simplest solution is to call the behavior's StartInstallation
    > function when you change the member.
    >
    > So to accomplish this add this line to the mouseUp function for each of
    > those text change buttons:
    >
    > sendAllSprites(#StartInstallation)
    >
    > I haven't tested this, but it looks like it will do what you need.
    >
    > --
    > Rob
    > _______
    > Rob Dillon
    > Team Macromedia
    > [url]http://www.ddg-designs.com[/url]
    > 412-243-9119
    >
    > [url]http://www.macromedia.com/software/trial/[/url]

    Joe Guest

Similar Threads

  1. scrolling?
    By iota webforumsuser@macromedia.com in forum Macromedia Flash Actionscript
    Replies: 1
    Last Post: January 20th, 09:16 AM
  2. [help] scrolling a field cast member in a LDM
    By jonny in forum Macromedia Director Lingo
    Replies: 1
    Last Post: October 28th, 06:17 PM
  3. can you hide scroll bars on a scrolling text field?
    By Michael Fischbeck in forum Macromedia Director Lingo
    Replies: 0
    Last Post: September 22nd, 04:33 PM
  4. Replies: 1
    Last Post: September 17th, 09:53 PM
  5. Scrolling from scroll wheel w/ Kensington tball in Classic?
    By Yvo in forum Mac Applications & Software
    Replies: 0
    Last Post: July 23rd, 06:45 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139