View Full Version : make mc with text and images in it scrollable?
jarmanje
11-29-2007, 12:49 PM
Hi there, i cant find much resources on this, but i have about 2 a4 pages of text which also have some images in it. I'm trying to make it scrollable for the user in a nice smooth way.
I tried using the scrollpane component and attaching the mc as it's .sourse, but the scrollbar scrolls about 50 times further down than it needs to, so it is really ugly
Does anyone have some advice for the best way to scroll a mc with images and text. Just text would be easy, i could use the UIscrollbar component, but i'm not so lucky :>O
Mazoonist
11-29-2007, 01:11 PM
Before you give up on the scrollPane component, you should know that there are a lot of ways to customize it by playing with its properties. You said it was ugly when it scrolled because it went too fast. This is customizable!
Go to the help files, Click on "all classes" in the left pane there, find the scrollPane class. and click on properties. In the list of properties, there doesn't seem to be any that are of any help, but...
Click the link at the top of the list that says "Show Inherited Public Properties." Now it's a much longer list. Turns out scrollPane inherits many of it's properties from classes higher up. One of the properties listed is "verticalLineScrollSize." This controls how much your scroll pane scrolls vertically when the scroll buttons are clicked. Customizing this is as simple as setting this property on your instance:
myScrollPane.verticalLineScrollSize = 2;
The default value for this property (I just found out from the help files) is 4. So setting it to 2 should cut the vertical scroll speed in half. By playing with this and other properties, you should be able to make your scrollPane behave however you want it to. It just takes a bit of experimentation.
Another alternative is to code your own scrolling window with text and images, depends on how comfortable you are doing that. But I wouldn't give up on the scrollPane too soon, as if you begin there, a good portion of the work is already done for you. Hope that helps.
jarmanje
11-29-2007, 03:31 PM
Hi there
I like the look of the scroll pane, but for some reason it has about 50 A4 pages worth of Whiteness and it scrolls down there. the scrolling doesn't stop at the end of the content in the mc...
stop();
mcpane.source = aboutcontent
mcpane.verticalLineScrollSize = 2; ///this didnt change anything?
jarmanje
11-29-2007, 04:01 PM
Hello again
If i delete my images, then it does not have a problem...
With the images, it wants to scroll A LOT. Really very far down. is there something wrong with having a textbox and some images?
|
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.