Point of origin of control

  1. 2 years ago


    12 Apr 2016 User since 2016

    I've found something 'annoying'.
    When creating a animation it takes the centre of the control as the point of measurement. Can you please change it to the top left of the control? It makes creating animations a lot easier.

  2. marco

    14 Apr 2016 Administrator User since 2016

    You are right and we'll fix it in the next beta. Thanks!

  3. 5 months ago


    Oct 31 User since 2016

    Hi @marco ,

    was this issue fixed?
    and can you give us an example of how can we use the animate class

    animate(duration, delay, options, closure, completion)

    Thank you!

  4. marco

    Oct 31 Administrator User since 2016
    Edited 5 months ago by marco

    @emanuel the issue reported here was in the animation editor and not in the animate method.
    You can find a sample animation project attached to this message.

  5. marco

    Oct 31 Administrator User since 2016

    @knarfje do you have a sample project that is able to reproduce the issue?

  6. emanuel

    Oct 31 User since 2016

    Hi @marco ,
    thank you for the quick reply, but I just wanted to make an animation to move an object, but I can't seem to find the x and y property, just the size!

  7. marco

    Oct 31 Administrator User since 2016


    View1.animate(1.5, 0.2, 0, {
    	var f = View1.frame.copy();
    	f.origin.x += 100;
    	f.origin.y += 100;
    	View1.frame = f;
    }, null);
  8. emanuel

    Oct 31 User since 2016

    Thank you very much @Marco,
    and sorry about that,
    I now understand how dum the question was... :)

  9. Joel_Eisenstat

    Nov 5 User since 2016

    Hi Marco,
    There may be a problem with animate function and TextField
    TextField3.animate(1.0, 0.2, 0, {
    var f = TextField3.frame.copy();
    f.origin.y += 50 ;
    f.origin.y += 50 ;
    TextField3.frame = f;
    }, null) ;
    This works with TextView but fails with TextField.
    ( += fails but -= seems to work .)

  10. Joel_Eisenstat

    Nov 6 User since 2016

    May have to do with event DidBeginEditing as code succeeds after a character is entered , not when the edit is "started" .

  11. marco

    Nov 15 Administrator User since 2016

    Hi @Joel_Eisenstat I tried your code in a sample project and everything works fine for me.
    Please let me know.

  12. 3 months ago


    Jan 15 Administrator User since 2016

    @knarfje as a workaround you can add the anchorPoint property (set to 0,0) to the same animation group as the attached sample project.

or Sign Up to reply!