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.
animated images
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
animated images
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.
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.
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.
To start the animation, make a second button, with the following script.
Once you have this running, it is simple to make the button move:
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
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
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
Code: Select all
move button 1 from 100,100 to 400,550 in 10 secs
Best,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
animated images
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?
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?