Page 1 of 1

animated images

Posted: Tue Oct 23, 2007 4:54 am
by rushvan
i have an animated section that i want to move across the screen. i can move the still image but don't know how to load an animated image.

it's a man walking.

Posted: Tue Oct 23, 2007 11:30 am
by Klaus
Hi rushvan,

is this a series of still images?
If not what format is your animation?


Regards

Klaus

animated images

Posted: Tue Oct 23, 2007 7:44 pm
by rushvan
i have successfully animated a series of a man walking by using a button script 'go to card x then go to card x2' etc. thse are jpegs. on indivual cards.

but i want have an image run through a series x ,x2 etc and then script 'move image such a place to such a place'. i don't know how to load a series so one image can be animated.

i can move a single still image just fine.

Posted: Tue Oct 23, 2007 8:21 pm
by Mark
Hi rushvan,

Suppose that you have 4 images, with id numbers 12000 to 12003. Make a button and set its icon to 12000. You can make the animation run with the following button script.

Code: Select all

on playAnim
  if the icon of me < 12000 or the icon of me > 12002 then
    set the icon of me to 12000
  else
    set the icon of me to (the icon of me + 1)
  end if
  if the cPlay of me is true then
    send "playAnim" to me in 200 millisecs
  end if
end playAnim
To start the animation, make a second button, with the following script.

Code: Select all

on mouseUp
  if the cPlay of btn 1 is true then
    set the cPlay of btn 1 to false
  else
    set the cPlay of btn 1 to true
    send "playAnim" to btn 1
  end if
end mouseUp
Once you have this running, it is simple to make the button move:

Code: Select all

move button 1 from 100,100 to 400,550 in 10 secs
You could add above line to the mouseUp handler. This moves the button from point 100,100 to point 400,550 in 10 seconds without stopping the animation.

Best,

Mark

animated images

Posted: Wed Oct 24, 2007 2:20 am
by rushvan
thanx y'all...mark i'll try your tip. what i am trying is this.

images (not cards x.x2.x3 etc). make a button. script 'move image x fromsuch to such', 'move image x2 for such to such' etc.

so far no good..what do you think?