0

I'm currently working on a flash project, which will use multiple scroll areas. I'm trying to find out how to create a scroll area like I see on stackoverflow, and make it function similarly. Whenever someone posts their lines of code to stackoverflow, the scroll area scrollbar looks exactly like the scrollbar in the web browser, and is able to be scrolled with the mousewheel smoothly, without affecting the webpage scrolling.

Example: disable mouse wheel scrolling while cursor over flex app?

Could anyone please explain to me how I can do this in my flash project? Thanks!!

Community
  • 1
  • 1
Collin
  • 1
  • 1
  • If you want a scrollbar that looks and feels exactly like the OS-native scrollbar in the browser, it seems that's not possible within Flash alone: http://stackoverflow.com/questions/678742/replacing-scrollpane-scrollbar-with-os-native-scrollbar –  Mar 19 '11 at 21:00

1 Answers1

1

You wouldn't need flash to do this... This is accomplished using CSS. You would just need to put the portion you wanted to function like that in a div (or any HTML container for that matter) and then define such properties as min-height, max-height, min-width, max-width, overflow, etc. I think there's one that determines the presence of the scroll bars but I don't remember what it is for sure. Very easy to do this and flash would be a bit of overkill.

Kenneth
  • 589
  • 6
  • 18
  • could you possibly explain how I would go about doing it exactly? – Collin Mar 19 '11 at 21:23
  • I do, but I'm not completely sure on how to do this funtion. – Collin Mar 19 '11 at 22:25
  • The content that I'd like to scroll is incorporated inside of the flash website. I'm really just trying to be able to use the mouse wheel to be able to scroll the content inside of the scrollpane as smoothly as the actual browser lets me without effecting the browser's scrolling as well. – Collin Mar 19 '11 at 22:27
  • If the content is in your flash pane then this won't be your answer... The method this site employs is HTML/CSS based. Honestly its much more of a pane to make websites in Flash... and it was never intended to be the primary development tool/language for websites. Its more intended to be used as a supplement to add features here and there. – Kenneth Mar 19 '11 at 23:51
  • Am I able to design the same type of layout in HTML/CSS as I have in flash? – Collin Mar 20 '11 at 00:12
  • I haven't seen the layout you're referring to but in most cases I think it would be safe to say yes. – Kenneth Mar 20 '11 at 00:14
  • Would that be able to easily be re-created with html/css? – Collin Mar 20 '11 at 00:19
  • I don't see anything there that would be difficult to do in HTML CSS... Is there a reason you chose to design it the way it is with the content showing on the sides like that? To get it to function exactly the way you have it now you'd probably need a little javascript too but other than that it seems like in my mind that using flash is way overkill... – Kenneth Mar 20 '11 at 00:24
  • Chances are though that if you're unfamiliar with it your initial impression will be that making the change is difficult. In the long run though its much better for many reasons to use HTML/CSS/Javascript over Flash for the main portion of a website. Use flash for highly interactive portions or videos and such but develop the rest with the other. – Kenneth Mar 20 '11 at 00:26
  • I just did that to make viewing easier. Instead of content reloading on a new page each time a page is clicked. Sorry if I'm asking a lot of questions. How could I go about doing, or learning how to get that all into html css? – Collin Mar 20 '11 at 00:26
  • What kind of time frame are you looking at? How much programming experience do you have and what languages do you know? What experience do you have with HTML/CSS/Javascript already? – Kenneth Mar 20 '11 at 00:29
  • I can do basic-intermediate HTML coding. Not familiar with CSS or javacript. I'm very familiar with actionscript. – Collin Mar 20 '11 at 00:32
  • What kind of time frame are you looking at to get up to speed on CSS and Javascript? – Kenneth Mar 20 '11 at 01:32
  • As long as it takes to learn, and be able to do it, I'm willing to. – Collin Mar 20 '11 at 19:56
  • I recommend CSS the missing Manual for learning how to style with CSS: http://www.amazon.com/CSS-Missing-David-Sawyer-McFarland/dp/0596802447/ref=sr_1_1?ie=UTF8&qid=1300654839&sr=8-1 – Kenneth Mar 20 '11 at 21:01
  • I haven't read the second edition... I'm assuming that this one covers CSS2 and maybe CSS3 but if not it'll give you the basics and you'll know enough at that point to fill in the rest on later versions of CSS. Also pay attention to cross browser support that is mentioned. Most browsers render very close but IE is a thorn in the side of all web developers. – Kenneth Mar 20 '11 at 21:03
  • As for the Javascript I don't exactly remember how I learned it! lol. There's also a JavaScript missing manual... never read it but if its as good as the css one it'll be good. – Kenneth Mar 20 '11 at 21:04
  • Awesome. Thanks so much. Going to get started on the process tomorrow. I'll let you know if I come into any ruts. – Collin Mar 21 '11 at 05:34
  • No problem. Just comment on here if you have any questions. – Kenneth Mar 21 '11 at 06:10
  • Hey Kenneth. I was curious if it would be better down the line, or equally as good to use php instead of html/css? Or am I completely wrong? Ha. – Collin Mar 25 '11 at 10:40
  • They serve different purposes. You can't use php to serve a website without at some point having it *generate* html (and in some cases some css though depending on how the css is implemented this may not be necessary). I would definitely recommend eventually moving on to php as this gives you a lot of dynamic abilities (db storage and access, file system functionality, etc) but you'll still need the HTML/CSS knowledge so I would recommend starting there still. – Kenneth Mar 25 '11 at 14:38