Jump to content
Fórum Script Brasil
  • 0

Duvida De As


m_axx
 Share

Question

fiz um AS em que um MC tem o mesmo "y" do mouse se o _xmouse < 200

se for >= 200 ele comeca a subir vagarosamente e se fixa num y=50.

só q esse lance de ele voltar vagarosamente que esta ruim...como faço para aumentar a velocidade??

sou meio q iniciante nessa parte de AS...+ segue aí como eu fiz...

onClipEvent (mouseMove)

{

if (_xmouse < 200)

{

y = _root._ymouse;

this._y = y;

updateAfterEvent();

delete this.onEnterFrame

}

if (this._xmouse >=200)

{

this.onEnterFrame = function()

{

this._y = y--;

if (this._y <= 50)

{

delete this.onEnterFrame

this._y = 50;

}

}

}

}

valeu!!!

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

tenta algo assim...

onClipEvent (mouseMove)

{

if (_xmouse < 200)

{

y = _root._ymouse;

this._y = y;

updateAfterEvent();

delete this.onEnterFrame

}

if (this._xmouse >=200)

{

this.onEnterFrame = function()

{

this._y = y-=5;

if (this._y <= 50)

{

delete this.onEnterFrame

this._y = 50;

}

}

}

}

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Forum Statistics

    • Total Topics
      149.8k
    • Total Posts
      646.6k
×
×
  • Create New...