Problem with refresh images
Posted: Fri Oct 05, 2012 11:01 pm
Hi,
in the background of my application the image change every 4 seconds .
If I stay in the same card, works well (Aren't exactly 4 seconds, but work.) If I go to another card and then return now start the problems, the pictures are running so syncopation and the image change every 1 or 2 seconds
Any hints?
my code:
in the background of my application the image change every 4 seconds .
If I stay in the same card, works well (Aren't exactly 4 seconds, but work.) If I go to another card and then return now start the problems, the pictures are running so syncopation and the image change every 1 or 2 seconds

Any hints?
my code:
Code: Select all
global gImmagine
on preOpenCard
put 1113 into gImmagine
end preOpenCard
on openCard
send "aggiornaSfondo2"
end openCard
on aggiornaSfondo2
put gImmagine + 1 into gImmagine
if gImmagine > 1118 then put 1113 into gImmagine
set the backgroundPattern of card "cHome" to gImmagine
send "aggiornaSfondo2" to me in 4 seconds
end aggiornaSfondo2
on closeCard
lock messages
repeat for each line 1 in the pendingMessages
answer the pendingMessages
cancel (item 1 of 1)
end repeat
unlock messages
end closeCard