teitunge Posted April 8, 2008 Share Posted April 8, 2008 Dear people.I am trying to make a website for a friend of mine which is a photographer. First of I started making it in plain xhtml, but I ran into some problems. She wanted the pictures to be 500px high (and the viewable frame about 700-1000px wide), and wanted it to be a horizontalscrolling-gallery (with some funky customized bar). I can show you the example:http://teitunge.frac.dk/music.htmlAs you can see (if you are using firefox), I tried to use a customized horizontal scrollbar, but of course this was not 100% compatible with Safari and IE - that makes me think Flash..I have been searching google for three hours without finding a decent tutorial. I really need one with the scrollbar, not automatic scrolling when the mousepointer hits the edge.If anyone knows how I can get started with this, or have a link to some good tutorials I would be deeply grateful!Thanks in advance,Jonas Link to comment Share on other sites More sharing options...
teitunge Posted April 11, 2008 Author Share Posted April 11, 2008 Hi again.I tried to follow a tutorial which is for a custom vertical scroller, and made the scroller itself work - but it isnt moving the image I want to display.The scene is 1000(w)x510(h) and I use AS2.0: var scrollUpper:Number = 0;var scrollLower:Number = 850;var textUpper:Number = 0;var textLower:Number = -2940;var scrollRange:Number = scrollLower - scrollUpper;var textRange:Number = scrollLower - scrollUpper;function scroll() { var moved:Number = scroller_mc.x - scrollUpper; var pctMoved:Number = moved/scrollRange; var textMove:Number = pctMoved*textRange; text_mc.y = textLower - textMove;}scroller_mc.onPress = function() {this.startDrag(false,scrollUpper,this._y,scrollLower,this._y);this.onMouseMove = scroll;}scroller_mc.onRelease = scroller_mc.onReleaseOutside = function() {this.stopDrag();this.onMouseMove = null;} The picture I have put into the scene is 3941x500 and I have converted it into a mC called text_mc (just to follow along with the tutorial). Out from this information, could anyone tell me why the picture isnt following my scroller? Thanks again. Link to comment Share on other sites More sharing options...
justsomeguy Posted April 14, 2008 Share Posted April 14, 2008 One reason might be that the functions are using the Y values, which are for the vertical position. If you want to use horizontal you might have to use the X values instead. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.