Author Topic: how move panel position with effect  (Read 3665 times)

eliascanaza

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 25
    • View Profile
how move panel position with effect
« on: January 02, 2013, 03:51:40 PM »
hello everybody ... how move panel position with delay, fadein effect, when i will click on other button ... thnks

dlewis

  • Guest
Re: how move panel position with effect
« Reply #1 on: January 02, 2013, 06:18:31 PM »
You will need to write a custom script to do this.

First you will need to implement OnClick(), then you would probably want to call TweenPosition.begin() and pass in the target, duration and delay. To make it fade at the end you should use TweenAlpha.begin(), to make it do it at the end you should set a callback for when TweenPosition is finished. To set the callback you will need to save the UITweener that TweenXXX.begin returns (ie. UITweener tween = TweenPosition.begin()) and set the function to call and the gameobject to call it on (ie. tween.callWhenFinished = "TweenPositionFinished" and tween.eventReceiver = this.gameObject).

Good luck.

eliascanaza

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 25
    • View Profile
Re: how move panel position with effect
« Reply #2 on: January 03, 2013, 11:07:21 AM »
wow...
I need move panel position when i will click on button...

is very complex... i will make ... if you have more examples please ... paste here :D
« Last Edit: January 03, 2013, 01:17:00 PM by eliascanaza »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: how move panel position with effect
« Reply #3 on: January 03, 2013, 06:09:20 PM »
To move something from A to B, use a tween. Set up a TweenPosition on the object you want to move and disable the script. Add UIButtonTween to your button, and set it to point to the TweenPosition you just added. Play with the values until you get what you like.