Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 8 of 8
  1. #1
    Join Date
    Jun 2002
    Location
    Israel
    Posts
    1,843

    Using paragraph scrollbar as slider

    Hi,
    The slider plugin beeing soooo standard, I thought about using the paragraph scrollbar as a slider.
    I am trying to get scrollbar position, as compared to scrollbar range to be able to get a percentage slider and use it to control another object (video, flash etc..).
    I am trying..but not succeeding.
    The idea was to do the following:

    scrollrange = Paragraph.GetScrollRange("Paragraph1", false);
    scrollpos = Paragraph.GetPos("Paragraph1");
    framenumber=scollpos/(scrollrange[2]-scrollrange[1]);
    Flash.Seek("3D", SEEK_SPECIFIC, framenumber);

    Furthermore, let's say that I could do that (with your help, please..), how can I get a realtime response? I can only put this set of actions in a onClick or onEnter event. How can I constantly read the scrollbar position?

    Thanks
    Yossi

  2. #2
    Join Date
    Feb 2001
    Location
    Indigo Rose Software
    Posts
    2,728
    Try one of these:

    framenumber = total_frames * scrollpos / scrollrange

    framenumber = total_frames * scrollpos / scrollrange + 1


    Nice idea btw.
    --[[ Indigo Rose Software Developer ]]

  3. #3
    Corey is offline Indigo Rose Staff Alumni
    Join Date
    Aug 2002
    Posts
    9,746

    Thumbs up

    That's a dang good idea, it's downright Yosstastic!

    *Edit* Actually I like this one so much that I am going to do something I've never, ever done before, I'm going to post a golden thumb.

    Corey Milner
    Creative Director, Indigo Rose Software

  4. #4
    Join Date
    Jul 2000
    Location
    NY
    Posts
    332
    Now why didn't I think of that when I did the Image Slider Project . Didn't realize I could control the scrollbar like that...

    Guess I need to go back and RTFM again.

  5. #5
    Join Date
    Sep 2002
    Location
    Sol 3
    Posts
    3,160
    Yosstastic. I will have to remember that one.

  6. #6
    Join Date
    Feb 2001
    Location
    Indigo Rose Software
    Posts
    2,728

    Re: Using paragraph scrollbar as slider

    Originally posted by yosik
    Furthermore, let's say that I could do that (with your help, please..), how can I get a realtime response? I can only put this set of actions in a onClick or onEnter event. How can I constantly read the scrollbar position?
    The page's On Timer event should do the trick.
    --[[ Indigo Rose Software Developer ]]

  7. #7
    Join Date
    Feb 2001
    Location
    Indigo Rose Software
    Posts
    2,728
    It works.

    Here's a quick example project.

    Note that the slider's range is controlled by the number of lines of text in the paragraph object.

    You'll probably want to tweak the calculations so it reaches 100% when the slider is at the end, but I'll leave that as an exercise for someone with more time on their hands.
    Attached Files
    --[[ Indigo Rose Software Developer ]]

  8. #8
    Join Date
    Jun 2002
    Location
    Israel
    Posts
    1,843
    Ok guys,
    Thanks for the kudos.
    I like yosstastic too :-)
    Am outta office, but will try it first thing monday.
    I LOVE this forum!!
    Yossi

Posting Permissions

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