..:: MX Studio Fóruns ::..: Qual o nome desse efeito? - ..:: MX Studio Fóruns ::..

Jump to content

Publicidade




ATENÇÃO

Para evitar posts desnecessários e que não influam para o andamento e desenvolvimento do fórum, clique aqui e leia todas as regras.
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Qual o nome desse efeito? Quem souver obrigado

#1 User is offline   NiKoLaU_ 

  • Group: Membros
  • Posts: 32
  • Joined: 04-November 06

  Posted 17 May 2008 - 11:26 AM

Ai gente qual o nome do efeito que tá no centro da página, com as imagens andando conforme vc clica nelas, tipo como se estivessem girando.

http://www.sms.com.br/

Consegui aqueles fontes ali... mas tentei alterar para somente 3 imagens e fica tudo descordenado ph34r.gif:S

tem o .as que seque abaixo (1700 linhas), tentei mudar alguns valores mas não consigo... se precisar do fla.. falem que eu posto aqui.

EDIT: AS+FLA Aqui!

0

#2 User is offline   Natan 

  • Group: Moderador Global
  • Posts: 7350
  • Joined: 28-February 04

Posted 17 May 2008 - 08:50 PM

Dá uma olhada nisso:

http://www.sosdesigners.com/colunas-85.html

Você vai ter que criar pequenas alterações, mas já dá para ter uma idéia melhor de como fazer o que deseja.

[]s
0

#3 User is offline   NiKoLaU_ 

  • Group: Membros
  • Posts: 32
  • Joined: 04-November 06

  Posted 19 May 2008 - 10:49 AM

Já tinha visto esse ai cara... so que no meu caso ele gira na horizontal vai ficar com 1000x299
Tentei mudar, mas não programo.. tem que calcular ceno e cosceno.. e to meio sem pratica em fazer esse tipo de conta.. na verdade nem sei por onde começar.

Se puder ajudar a resolver o problema com o código que passei acima fico grato.

Att, NiKoLaU_

0

#4 User is offline   Marcelo Sales 

  • Group: Membros
  • Posts: 11
  • Joined: 27-June 07

Posted 19 May 2008 - 12:25 PM

QUOTE(NiKoLaU_ @ 17/5/2008 10:05:10) <{POST_SNAPBACK}>
Ai gente qual o nome do efeito que tá no centro da página, com as imagens andando conforme vc clica nelas, tipo como se estivessem girando.


Opa... o nome do efeito é carrosel... vc pode achar algumas coisas pelo google buscando por "carroussel" (em inglês)... :-)

[ ]´s
Marcelo Sales
0

#5 User is offline   ex007 

  • Group: Membros
  • Posts: 192
  • Joined: 21-December 07

Posted 19 May 2008 - 08:21 PM

No caso tenho 3 mc com as instâncias a, b, c

CÓDIGO
//instâncias dos mcs
var clips = Array("a", "b", "c");
//raio da circuferência em qu será rotacionado os mcs
var raio = 100;
var aceleracao = 0.05;
var alphaMinimo = 20;
var alphaMaximo = 70;
var escalaMinima = 50;
var escalaMaxima = 100;
var mouseSeguro = 100;
var difAlpha = alphaMaximo-alphaMinimo;
var difEscala = escalaMaxima-escalaMinima;
var xIni = Stage.width/2+20;
var yIni = Stage.height/2;
var dobroRaio = raio*2;
var conversao = Math.PI/180;
var difAngular = 360/clips.length;
var angulo = 0;
function posCircular(angulo, raio) {
    var pos = new Object();
    var rad = angulo*conversao;
    pos.x = Math.sin(rad)*raio;
    pos.y = Math.cos(rad)*raio;
    return pos;
}
this.onEnterFrame = function() {
    velocidade = (_root._xmouse-xIni);
    if (Math.abs(velocidade)<=mouseSeguro) {
        velocidade = 0;
    } else {
        velocidade *= aceleracao;
    }
    angulo += velocidade;
    for (i=0; i<clips.length; i++) {
        var ptr = _root[clips[i]];
        ptr._y = yIni;
        ptr.difAngular = difAngular*i;
        var pos = posCircular(angulo+ptr.difAngular, raio);
        ptr._x = xIni+pos.y;
        var perc = (pos.x+raio)/dobroRaio;
        ptr._alpha = perc*difAlpha+alphaMinimo;
        ptr._xscale = ptr._yscale=perc*difEscala+escalaMinima;
        ptr.swapDepths(pos.x+dobroRaio);
    }
};


vlw... cool.gif
0

#6 User is offline   NiKoLaU_ 

  • Group: Membros
  • Posts: 32
  • Joined: 04-November 06

Posted 20 May 2008 - 10:51 AM

Vou conseguir por links nesses MC's? Ahcei um outro código que consegui estruturálo

Aqui a animação.. so os links não funcionam.

http://www.net-on.inf.br/swf/home.swf

CÓDIGO
function moveMe()
{
    this.currAngle = this.place + this._parent.carouselOffset;
    if (this.currAngle >= 6.283185E+000)
    {
        this.currAngle = this.currAngle - 6.283185E+000;
    } // end if
    if (this.currAngle < 0)
    {
        this.currAngle = this.currAngle + 6.283185E+000;
    } // end if
    this.x = this.cx + Math.cos(this.currAngle) * this.xradius;
    this.y = this.cy;
    this.z = this.cz + Math.sin(this.currAngle) * this.zradius;
} // End of the function
function displayMe()
{
    this.scale = this.fl / (this.fl + this.z);
    this._x = this.x * this.scale + this.xcenter;
    this._y = this.y * this.scale + this.ycenter;
    this._xscale = this._yscale = this.scale * 100;
    this.swapDepths(Math.round(this.scale * (this.maxDepth - this.minDepth)) + this.minDepth);
} // End of the function
var arrMCToLoad = ["mcServer", "mcInfbasica", "mcNobreaks"];
var arrMCText = ["this is a bug", "here\'s a twisted smiley", "a star", "a red car", "this is a tree", "it\'s a diamond", "the crescent moon"];
var arrMCActions = ["bug action", "smiley action", "star action", "car action", "tree action", "diamond action", "moon action"];
var curMCShowing = 0;
var arrMCs = [];
var fl = 1100;
var xcenter = 500;
var ycenter = 150;
var zcenter = 300;
var xradius = 400;
var yradius = 00;
var zradius = 300;
var cx = 0;
var cy = 0;
var cz = 300;
var minDepth = 10;
var maxDepth = arrMCToLoad.length * 2 + minDepth;
var angleInc = 6.283185E+000 / arrMCToLoad.length;
var carouselOffset = null;
var carouselOffsetDest = null;
setCarouselToMove = function (dir)
{
    if (dir == "forward")
    {
        ++curMCShowing;
    } // end if
    if (dir == "backward")
    {
        --curMCShowing;
    } // end if
    setOffSet();
};
setCarouselToPos = function (idx)
{
    curMCShowing = idx;
    setOffSet();
};
initCarouselToPos = function (idx)
{
    curMCShowing = idx;
    setOffSet();
    carouselOffset = carouselOffsetDest;
};
setOffSet = function ()
{
    if (curMCShowing >= arrMCs.length)
    {
        curMCShowing = 0;
    } // end if
    if (curMCShowing < 0)
    {
        curMCShowing = arrMCs.length - 1;
    } // end if
    carouselOffsetDest = -1.570796E+000 - curMCShowing * angleInc;
    txtAction.text = "";
    txtWhoAmI.text = arrMCs[curMCShowing].showText;
};
var idx = 0;
while (idx < arrMCToLoad.length)
{
    var s = this.attachMovie(arrMCToLoad[idx], "mc" + idx, idx + minDepth, {fl: fl, idx: idx, whoAmI: arrMCToLoad[idx], showText: arrMCText[idx], action: arrMCActions[idx], place: angleInc * idx, currAngle: 0, cx: cx, cy: cy, cz: cz, xradius: xradius, yradius: yradius, zradius: zradius, xcenter: xcenter, ycenter: ycenter, zcenter: zcenter, minDepth: minDepth, maxDepth: maxDepth, _visible: true});
    arrMCs.push(s);
    s.trackAsMenu = true;
    s.onRelease = s.onReleaseOutside = function ()
    {
        setCarouselToPos(this.idx);
    };
    s.moveMe = moveMe;
    s.displayMe = displayMe;
    s.onEnterFrame = function ()
    {
        this.moveMe();
        this.displayMe();
    };
    ++idx;
} // end while
for (idx = arrMCs.length - 1; idx >= 0; idx--)
{
    arrMCs[idx].moveMe();
    arrMCs[idx].displayMe();
    arrMCs[idx]._visible = true;
} // end of for
initCarouselToPos(0);
this.onEnterFrame = function ()
{
    var dist;
    for (dist = carouselOffsetDest - carouselOffset; dist > 3.141593E+000; dist = dist - 6.283185E+000)
    {
    } // end of for
    while (dist < -3.141593E+000)
    {
        dist = dist + 6.283185E+000;
    } // end while
    if (Math.abs(dist) * 1000 > 1)
    {
        carouselOffset = carouselOffset + dist * 2.000000E-001;
    }
    else
    {
        carouselOffset = carouselOffsetDest;
    } // end else if
};
btnForeward.onRelease = btnForeward.onReleaseOutside = function ()
{
    setCarouselToMove("forward");
};
btnBackward.onRelease = btnBackward.onReleaseOutside = function ()
{
    setCarouselToMove("backward");
};
btnExplore.onRelease = btnExplore.onReleaseOutside = function ()
{
    this._parent.txtAction.text = this._parent.arrMCs[this._parent.curMCShowing].action;
};
stop ();


Ele vai dentro do mesmo arquivo, não chama nada externalmente... funcionou legal, mas links nele, Não funcionam, mesmo tranformando os arquivos dentro dos mc em button.

Vou ver se o seu código funcionar elgal com os links ficarei muito grato.

0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic



Publicidade




1 User(s) are reading this topic
0 membro(s), 1 visitante(s) e 0 membros anônimo(s)