Ask a Question related to Macromedia Director Lingo, Design and Development.
-
Joe #1
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
-
[help] scrolling a field cast member in a LDM
hi everybody! i need to scroll a field cast member in a linked director movie, it perfectly work in the single dir movie, but it doesn't when i... -
Scrolling MUI
Quick Question, It seems that in the Custom MUI there is no way to make text scroll. We have set up a simple app here where we will want a large... -
can you hide scroll bars on a scrolling text field?
thanks! I love simple solutions like that. Ned wrote: -
combination scrolling text scrolling picture and on MouseEnter function
it would help if you posted the code for us to look at... that way we can try to help ;) In article <bk6jip$ctm$1@forums.macromedia.com>, <... -
Scrolling from scroll wheel w/ Kensington tball in Classic?
Viktor Haag <vhaag@rim.net> wrote: You can try UsbOverdrive: http://www.usboverdrive.com/ An explanation at:... -
Inquisytor webforumsuser@macromedia.com #2
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
-
Joe #3
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" <rob@ddg-designs.com> wrote in message
news:310720030754017138%rob@ddg-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



Reply With Quote

