endValue as Percentage Usage

73 Views Asked by At

Can I use endValue as percentage?

Pages.Page1.ImageButton1.animate({
...
endValue : 30,
...
});

What is type of endValue? Pixel? So, How I can use as percentage? I tried %30 or 30% but didn't work.

2

There are 2 best solutions below

0
On BEST ANSWER

You can use it as String:

Pages.Page1.ImageButton1.animate({
...
endValue : "100%",
...
});
0
On

Take this full code of example;

Pages.Page1.ImageButton1.animate({
    property : 'Y',
    endValue : '30%',
    motionEase : SMF.UI.MotionEase.plain,
    duration : 3000,
    onFinish : function () {
        //do your action after finishing the animation
    }
});