A Flash Developer Resource Site

Results 1 to 13 of 13

Thread: scrollbar

  1. #1
    Junior Member
    Join Date
    Sep 2006
    Posts
    5

    scrollbar

    hey ho there,
    I´m a total beginner in ActionScript but I want to us my own designed scrollbar!!!
    So If anybody has the grace to view my scrollbar.fla file and maybe can explain me the code that I need to scroll the text with the bar not with the arrows I would really appreciate this.
    THANKS
    Here my scrollbar: http://www.burn-rocks.com/flash

  2. #2
    Can't Re-Member madzigian's Avatar
    Join Date
    Apr 2004
    Location
    Boston MA
    Posts
    2,662
    If you want, you can pick apart this file of mine to see how the code for the scrollbar works. This file actually has an easing effect applied for smoother scrolling.

    ** you can ignore the code in Frame 1 that loads the html .txt file and the css file.... all the code you need is in Frame 2 of the scroll panel moveiclip.


    here is what it looks like :
    http://artofficialintel.com/download...ler/index.html

    here's the source:
    http://artofficialintel.com/download...xtScroller.zip
    Please DO NOT PM me simply for individual help. Post in the public forums...that's what they are for, and they allow others to benefit as well. - Thx
    OS X 10.3.9 || Flash MX04 Pro
    | del.icio.us || furl || Helpful Source Files || Free Pixel Fonts |

  3. #3
    MetallicA all the way, baby! Bokkie's Avatar
    Join Date
    Apr 2002
    Location
    Eindhoven, Holland
    Posts
    287
    Talking about diggin' up old topics.

    But madzigian, how do u actually use this example so that u can use CSS for the text?

    Hope u (or someone else) can help me with this.

    Thnx in advance
    FakePilot = Master

  4. #4
    Can't Re-Member madzigian's Avatar
    Join Date
    Apr 2004
    Location
    Boston MA
    Posts
    2,662
    in this section of the code:
    Code:
    styles.onLoad = function(success) {
    	if (success) {
    		holder.my_txt.htmlText = myText;
    
    // ADD THE FOLLOWING LINE.......
    		holder.my_txt.styleSheet = styles;
    
    		nextFrame();
    		trace("Loaded!");
    	} else {
    		trace("ERROR LOADING");
    	}
    };
    and it should work fine.. sorry.. my bad.
    Please DO NOT PM me simply for individual help. Post in the public forums...that's what they are for, and they allow others to benefit as well. - Thx
    OS X 10.3.9 || Flash MX04 Pro
    | del.icio.us || furl || Helpful Source Files || Free Pixel Fonts |

  5. #5
    MetallicA all the way, baby! Bokkie's Avatar
    Join Date
    Apr 2002
    Location
    Eindhoven, Holland
    Posts
    287
    Thank you, thank you....Did I say thank you?
    You make my day!

    Cheers

    EDIT: I did it exactly as you said on your example. But the body-text don't work. Ive tried it with some classes in the CSS-file but still with no luck.
    The weird part is, is that the hyperlink-style does work....Hmm
    Last edited by Bokkie; 05-16-2007 at 02:02 PM.
    FakePilot = Master

  6. #6
    Can't Re-Member madzigian's Avatar
    Join Date
    Apr 2004
    Location
    Boston MA
    Posts
    2,662
    For each different font you want to use....(that includes bold and/or italic styles). on your main timeline, create a empty dynamic text box somewhere off the stage..for each different font you would like to use.. (i.e. one for Verdana, one with the Verdana BOLD style, one for Arial, one for Arial Italic, etc) Then try this for your CSS and see if it helps...
    Code:
    body {
    font-family: Arial;
    color: #000000;
    font-size: 10px;
    font-weight: normal;
    }
    
    b {
    font-family: Arial;
    }
    
    a {
    color: #660000;
    }
    
    a:hover {
    color: #FF5A00;
    text-decoration: underline;
    }
    Please DO NOT PM me simply for individual help. Post in the public forums...that's what they are for, and they allow others to benefit as well. - Thx
    OS X 10.3.9 || Flash MX04 Pro
    | del.icio.us || furl || Helpful Source Files || Free Pixel Fonts |

  7. #7
    Can't Re-Member madzigian's Avatar
    Join Date
    Apr 2004
    Location
    Boston MA
    Posts
    2,662
    Did that work for you?...
    Please DO NOT PM me simply for individual help. Post in the public forums...that's what they are for, and they allow others to benefit as well. - Thx
    OS X 10.3.9 || Flash MX04 Pro
    | del.icio.us || furl || Helpful Source Files || Free Pixel Fonts |

  8. #8
    MetallicA all the way, baby! Bokkie's Avatar
    Join Date
    Apr 2002
    Location
    Eindhoven, Holland
    Posts
    287
    Well actually it did, Ive adjusted the CSS- and textfile that will suits me. Thnx a bunch for the replies you have made...!

    I now have a future-reference, which I can use later on, instead of searching hours for a decent and adjustable scrollbar! Youre the man!!
    FakePilot = Master

  9. #9
    Can't Re-Member madzigian's Avatar
    Join Date
    Apr 2004
    Location
    Boston MA
    Posts
    2,662
    you're welcome.

    And just FYI...You can use custom fonts as well. For example, I prefer using pixel fonts. So i'll create font symbols in my library for the fonts i want to use, give them all linkage id's, then you just reference the linkage id in the CSS file... For example,
    i might create a symbol for FFF Harmony --> linkage id Harmony another for FFF Galaxy --> id Galaxy and then another for FFF Galaxy Bold --> id GalaxyBold (you can get these fonts for free at www.fontsforflash.com)

    then my CSS file might look like this :
    Code:
    body {
    font-family: Galaxy;
    color: #000000;
    font-size: 8px;
    }
    
    b {
    font-family: GalaxyBold;
    font-size: 8px;
    }
    
    a {
    font-family: Harmony;
    font-size: 8px;
    color: #660000;
    }
    
    a:hover {
    color: #FF5A00;
    text-decoration: underline;
    }
    That way.. you can use ANY fonts you choose.. as long as you embed them in one way or another in your swf.
    Please DO NOT PM me simply for individual help. Post in the public forums...that's what they are for, and they allow others to benefit as well. - Thx
    OS X 10.3.9 || Flash MX04 Pro
    | del.icio.us || furl || Helpful Source Files || Free Pixel Fonts |

  10. #10
    MetallicA all the way, baby! Bokkie's Avatar
    Join Date
    Apr 2002
    Location
    Eindhoven, Holland
    Posts
    287
    That is just great, thanks for the effort!
    FakePilot = Master

  11. #11
    Primitive Intellect
    Join Date
    Nov 2005
    Location
    x: 74 y:-87
    Posts
    34

    Using 2 Scrollbars?

    Hi madzigian,

    I've downloaded and am using your easing scrollbar, very nice work! The CSS, loaded text and all work great! Thank you for posting it. However I am having a problem with it.

    1. My main shell "master" SWF contains the scrollbar, which is working great.

    2. I have external SWFs that also contain the scrollbar.

    3. Once I load the external SWFs, the scrollbar in the loaded SWF works fine. BUT the scrollbar in my main shell "master" SWF becomes disabled. You can still move the scrollbar dragger up and down in the "master" SWF, but the content will no longer scroll. Even when I use a button to remove the newly called SWF, the functionality remains lost in the "master" SWF until I refresh the entire page by loading a new section.

    Any ideas on what could be causing this issue or how to fix this? Any help would be greatly appreciated! Thanks.

    _Brandon

  12. #12
    Junior Member
    Join Date
    Jan 2008
    Posts
    1
    Digging up this thread again. I have been search all over for good sample code for a custom scroll bar for dynamic text with externally loaded XML. I've got mine all working with up/dwn buttons but want to add a draggable scroll bar. I think this TextScroller.zip file may have exactly what I need but the link seems to be dead. Is there any chance anyone can post this or a similar file that I can pick apart.
    Thanks!

  13. #13
    Senior Member
    Join Date
    Nov 2006
    Posts
    162
    Hi,

    I am looking for the same thing as well, and I would really like to see that file, if possible...
    :-) thanks!

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center