Hi. I’m kinda new here at kirupa but lately I’ve been looking at the tutorials and also here at the forum for some help with Flash, and it’s been great, I’m learning so much, it’s a great community!
I’m in a process of building an online portfolio with my work and recently I’ve seen this site:
http://www.mutualresponse.com/res/6th/
So, after you enter the site, there will be a huge list on the right side, which is the menu. If you click on any of those, you’ll be taken to a part of the site and it will load a graphic. And if you click this graphic, a larger version of the image (or full version if you prefer) will appear. Now, if the image is bigger than your browser window, it will enable an “automacally scroller” - something like a sliding thumbs thing. Plus, the image is always centered on the Stage.
Now, I see that there’s a relation with scrolling the pic only if the Stage width or height is smaller than the image width or height. And there’s the centering question - which I think i have nailed it with this code (assuming that the reg point is at the top left of the pic):
image._y = (Stage.height/2) - (image._height/2);
image._x = (Stage.width/2) - (image._width/2);
image.onResizeWindow = function() {
this._y = (Stage.height/2) - (image._height/2);
this._x = (Stage.width/2) - (image._width/2);
};
Stage.addListener(image);
image.onResizeWindow();
So the main question is about the scrolling thing, depending on the Stage dimensions, does anyone have an idea of how that can be done?
I’m really in need of that, I’m sorry if that’s a rookie question but I’m not very familiar with A/S
Thanks for your help