Author Topic: animation Q: movment  (Read 4149 times)

jedione

  • Hero Member
  • *****
  • Posts: 1135
  • punktoe
    • View Profile
animation Q: movment
« on: April 03, 2017, 06:50:19 PM »
anyone know if their is a way to make a animation that will respond
to to or three movements IE:


local pic = fe.add_image("pic/lArrow.png", flx*0.200, fly*0.450, flw*0.060, flh*0.120 );
local pic_move_cfg = {
        when =Transition.StartLayout ,
   property = "x",
   start = flx*0.040,
        stop = flx*0.080,
        start = flx*0.080,

   end = flx*0.040,
   time = 1000,    
   loop=true,
}
animation.add( PropertyAnimation( pic, pic_move_cfg ) );
help a friend....

qqplayer

  • Sr. Member
  • ****
  • Posts: 301
    • View Profile
Re: animation Q: movment
« Reply #1 on: April 04, 2017, 02:12:29 PM »
For me only worked as joining diferent "properties" for expample:

Code: [Select]
local pic_move_cfg_x = {
        when =Transition.StartLayout ,
   property = "x",
   start = flx*0.040,
}

local pic_move_cfg_y = {
        when =Transition.StartLayout ,
   property = "y",
   start = fly*0.040,
}

jedione

  • Hero Member
  • *****
  • Posts: 1135
  • punktoe
    • View Profile
Re: animation Q: movment
« Reply #2 on: April 04, 2017, 08:20:41 PM »
thanks for your reply....but this is what im trying to do ,,, but cant successfully

make smooth moment back and forth ,, i can do it with a custom .swf flash but their is a  "pixel halo" that i cant shake...

when using the animation module it is kind of better ,,, but i get some flashing  going on...

here is the code and  a vid to show you all...im starting to think the module is flad with it's timing...what do you think

Code: [Select]
local larrow = fe.add_image("pic/lArrow.png", flx*-0.200, fly*0.450, flw*0.060, flh*0.120 );
local larrow_move_cfg = {
        when =Transition.StartLayout ,
property = "x",
start = flx*0.040,
end = flx*0.080,
time = 1000,
loop=true,
}
local larrow2_move_cfg = {
        when =Transition.StartLayout ,
property = "x",
start = flx*0.080,
end = flx*0.040,
time = 1000,
delay = 1000,
loop=true,
}
animation.add( PropertyAnimation( larrow, larrow_move_cfg ) );
animation.add( PropertyAnimation( larrow, larrow2_move_cfg ) );

youtube = https://youtu.be/RRuR42URDpA

note: the delay = 1000,

any help?


help a friend....

bjose2345

  • Sr. Member
  • ****
  • Posts: 107
    • View Profile
Re: animation Q: movment
« Reply #3 on: April 05, 2017, 03:37:12 AM »
If i get right what are you trying to do, you only need to do this

Code: [Select]
arrowLeft = fe.add_image("pic/lArrow.png", flx*-0.200, fly*0.450, flw*0.060, flh*0.120 ),

 }
 local move_larrow = {
    when =Transition.ToNewList ,property = "x", start = flx*0.040, end = flx*0.040, time = 600, loop=true
 }

animation.add( PropertyAnimation(arrowLeft, move_larrow ) );

I mean, if you want your arrow goes back and forth, back and forth and  keep going, you only need to set the loop = true and the animation module take care of the rest.
« Last Edit: April 05, 2017, 03:43:20 AM by bjose2345 »

jedione

  • Hero Member
  • *****
  • Posts: 1135
  • punktoe
    • View Profile
Re: animation Q: movment
« Reply #4 on: April 05, 2017, 07:16:12 AM »
naa,,  what im trying to do is have it smoothly move back and forth,

not move one way and loop , it makes it look choppy ,, but thanks for the reply

you can see in the vid i posted above,  near the end its working perfect for a few seconds,,thats what im looking for
smooth bounce.
help a friend....

bjose2345

  • Sr. Member
  • ****
  • Posts: 107
    • View Profile
Re: animation Q: movment
« Reply #5 on: April 05, 2017, 10:04:46 AM »
check this thread, there is what i think you are looking for

http://forum.attractmode.org/index.php?topic=1421.msg10151#msg10151

qqplayer

  • Sr. Member
  • ****
  • Posts: 301
    • View Profile
Re: animation Q: movment
« Reply #6 on: April 06, 2017, 01:09:39 PM »
Have you tried:

tween = Tween.Linear or tween = Tween.Expo

local larrow = fe.add_image("pic/lArrow.png", flx*-0.200, fly*0.450, flw*0.060, flh*0.120 );
local larrow_move_cfg = {
        when =Transition.StartLayout ,
   property = "x",
   start = flx*0.040,
   end = flx*0.080,
   time = 1000,    
   loop=true,   
        tween = Tween.Expo
}
local larrow2_move_cfg = {
        when =Transition.StartLayout ,
   property = "x",
   start = flx*0.080,
   end = flx*0.040,
   time = 1000,
   delay = 1000,    
   loop=true,   
        tween = Tween.Linear
}
animation.add( PropertyAnimation( larrow, larrow_move_cfg ) );
animation.add( PropertyAnimation( larrow, larrow2_move_cfg ) );

jedione

  • Hero Member
  • *****
  • Posts: 1135
  • punktoe
    • View Profile
Re: animation Q: movment
« Reply #7 on: April 06, 2017, 06:46:26 PM »
thanks qqplayer,,,

i think this is as close as ill get it.. the "tween = Tween.Expo"  helps smooth it out a bit


so now i can release the theme...  thanks again...
help a friend....