Ir para conteúdo

POWERED BY:

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

:::paulotaneda:::

:::photoscroller na vertical:::

Recommended Posts

Fala galera! Qnto tempo!

Bom, estou tendo problemas em fazer um photoscroller na vertical.

Peguei esse scroller na net photoscroller, sendo que tá na horizontal.

Gostaria de saber o que devo altera nesse código p/ que ele fique na vertical:

// Setting the xmouse to 0 in the centre of the movie:xmouse = _xmouse - (widthmovie / 2);// Setting the speed:speed = (xmouse) / scrollspeed;// If the speed is negative, the speed will be made positive here:if (speed < 0) {	speed = -(speed);}//new function courtesy of Rob//basically says that if the mouse isn't betwen these two y points it won't work//**stupid people tip**//make sure that you figure out the top and bottom y points of your "photo" and insert them accordingly!mouseposition = getProperty("/myself", _y);if (_ymouse < 29) {	speed=0;}if (_ymouse > 118) {	speed=0;}// If the mouse moves to left, the photo will scroll to the right:// (That makes sense.... Doesn't it!!;-)if (xmouse < 0) {	xphoto = xphoto + speed;}// If the mouse moves to the right, the photo will scroll to the left:if (xmouse > 0) {	xphoto = xphoto - speed;}// Checking for the left end of the image:if (xphoto > 0) {	xphoto = 0;}// Checking for the right end of the image:if (xphoto < -(widthphoto - widthmovie)) {	xphoto = -(widthphoto - widthmovie);}// Placing the moviclip (photo) on it's new postition:setProperty("photo", _x, xphoto);

Por enqnto é só!

Grande abraço! :worshippy:

Compartilhar este post


Link para o post
Compartilhar em outros sites
onClipEvent(load) {nScreenWidth = 200;nMaxRate = 15;function moveLeft(nPixels) { this._y -= nPixels;if (this._y < 0- 400) {this._y = 0;}}function moveRight(nPixels) {this._y += nPixels;if (this._y > 400) {this._y = 0-nScreenWidth;}}}onClipEvent(enterFrame) {if (_root._ymouse < nScreenWidth/2 && _root._ymouse > 0) {moveRight(nMaxRate - _root._ymouse * nMaxRate/(nScreenWidth/2));} else {if (_root._ymouse > nScreenWidth/2 && _root._ymouse < nScreenWidth) {moveLeft(_root._ymouse * nMaxRate/(nScreenWidth/2) - nMaxRate);}}}

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.