Olaan Expert Licensed User Longtime User Mar 3, 2012 #1 Hi everybody, I downloaded example animation in library. I prefer click button5. I need apply my project about panel.Whenever I click my application's icon or whenever I logout my app,my app is shown like button5. My code is belows: Sub Activity_Create(FirstTime As Boolean) Dim ani As Animation Activity.LoadLayout("Layout1") PnelLayOut1.Visible=True ani.InitializeScaleCenter("",0,0,PnelLayOut1.Height,PnelLayOut1.Width,PnelLayOut1) <---How to coding? Best Regards Theera:sign0163: Last edited: Mar 3, 2012
Hi everybody, I downloaded example animation in library. I prefer click button5. I need apply my project about panel.Whenever I click my application's icon or whenever I logout my app,my app is shown like button5. My code is belows: Sub Activity_Create(FirstTime As Boolean) Dim ani As Animation Activity.LoadLayout("Layout1") PnelLayOut1.Visible=True ani.InitializeScaleCenter("",0,0,PnelLayOut1.Height,PnelLayOut1.Width,PnelLayOut1) <---How to coding? Best Regards Theera:sign0163:
Erel B4X founder Staff member Licensed User Longtime User Mar 3, 2012 #2 It should be: Code: Copy ani.InitializeScaleCenter("",0,0,1,1,PnelLayOut1) Upvote 0
Olaan Expert Licensed User Longtime User Mar 3, 2012 #3 Erel said: It should be: Code: Copy ani.InitializeScaleCenter("",0,0,1,1,PnelLayOut1) Click to expand... I have coded programming,but It 's not slow motation expand Best Regards Theera:sign0013: Upvote 0
Erel said: It should be: Code: Copy ani.InitializeScaleCenter("",0,0,1,1,PnelLayOut1) Click to expand... I have coded programming,but It 's not slow motation expand Best Regards Theera:sign0013:
C cbal03 Active Member Licensed User Longtime User Apr 2, 2012 #4 Theera said: I have coded programming,but It 's not slow motation expand Best Regards Theera:sign0013: Click to expand... If the animation object's 'duration' param isn't set then the animation will be instant. i.e. no animation. To set this param you would write object.Duration = 1000. This is in milliseconds. Best regards Upvote 0
Theera said: I have coded programming,but It 's not slow motation expand Best Regards Theera:sign0013: Click to expand... If the animation object's 'duration' param isn't set then the animation will be instant. i.e. no animation. To set this param you would write object.Duration = 1000. This is in milliseconds. Best regards
C cbal03 Active Member Licensed User Longtime User Apr 2, 2012 #5 I want to InitializeScaleCenter a panel but when the animation is finished playing my panel returns to its original size. How do I gather the appropriate settings of the panel to force it to stay scaled in the AnimationEnd subroutine? I've searched these forums and have experimented this entire day and can only prevent the movement type of animations from returning to their original position. I have several more questions regarding the non moving (from x to y) animations. How does the scale actually work? By this I mean that if I want to do: thisAnim.InitializeScaleCenter("thisAnimationEndHandler", 1, 1, 10, 10, myPanel) What are the ToX and ToY? Are they a multiple of the original dimmensions? What happens to the original X and Y of the panel. Do they decrease as the panel grows larger? Is there a way to capture these values as the panel animation plays? Thanks in advance Upvote 0
I want to InitializeScaleCenter a panel but when the animation is finished playing my panel returns to its original size. How do I gather the appropriate settings of the panel to force it to stay scaled in the AnimationEnd subroutine? I've searched these forums and have experimented this entire day and can only prevent the movement type of animations from returning to their original position. I have several more questions regarding the non moving (from x to y) animations. How does the scale actually work? By this I mean that if I want to do: thisAnim.InitializeScaleCenter("thisAnimationEndHandler", 1, 1, 10, 10, myPanel) What are the ToX and ToY? Are they a multiple of the original dimmensions? What happens to the original X and Y of the panel. Do they decrease as the panel grows larger? Is there a way to capture these values as the panel animation plays? Thanks in advance
Erel B4X founder Staff member Licensed User Longtime User Apr 3, 2012 #6 You should use the AnimationEnd event to set the size and position of the panel. What are the ToX and ToY? Are they a multiple of the original dimmensions? Click to expand... Yes. What happens to the original X and Y of the panel. Do they decrease as the panel grows larger? Click to expand... Yes. Is there a way to capture these values as the panel animation plays? Click to expand... No. However it shouldn't be too difficult to calculate the final values. Upvote 0
You should use the AnimationEnd event to set the size and position of the panel. What are the ToX and ToY? Are they a multiple of the original dimmensions? Click to expand... Yes. What happens to the original X and Y of the panel. Do they decrease as the panel grows larger? Click to expand... Yes. Is there a way to capture these values as the panel animation plays? Click to expand... No. However it shouldn't be too difficult to calculate the final values.