Using Scrollbars in Papervision 3D
Phil Chertok on July 17, 2009
4 Comments
Using scrollbars can be a little bit of a trick in Papervision. When you use a scrollbar with a movie clip you’ll notice that the entire movie clip will move when the content scrolls, definitely not the desired effect. Fortunately the solution is fairly simple, just set the .rect property of the movieMaterial you are using.
var movieMat:MovieMaterial = new MovieMaterial(_scrollClip, true, true, false); movieMat.interactive = true; movieMat.smooth = true; movieMat.doubleSided = true; movieMat.rect = new Rectangle(0, 0, 226, 300); |
You can view an example of this in action here.
You can download the source for the example here.
Note: In the example we use AxisScroller which is available at EVOLVE. But this method should work with any scrollbar class.

August 11th, 2009 @ 10:10 PM
Hi, thanks for posting this..I downloaded the source example and get a unexpected File Format error opening the fla…I’m using CS3. Was this saved in CS4/any ideas?
August 12th, 2009 @ 3:30 AM
Yes, CS4. We’ll try and pull together a CS3 version as soon as we can.
August 12th, 2009 @ 5:59 AM
Methon, I’ve updated the example to now work in CS3. For some reason it bloated the FLA file size so the download is now 7.5 megs instead of 4. Yikes!
August 12th, 2009 @ 3:41 PM
Huh, still not working in CS3…I’ve got to upgrade to CS4 anyways. Interesting though…there is very little info on scrollbars in papervision out there. http://in2media.com has some awesome PV motion on there scrollbars…Looks like tweener/PV?? Any ideas/code on how they achieve that?? Thanks Guys!