rotating images
David Burgun
dburgun at dsl.pipex.com
Fri Jul 29 08:17:45 EDT 2005
Hi,
I think the code you are looking for is something like this in the Card Script:
global gImageCounter
on openCard
put 1 into gImageCounter
send "DisplayNextImage" to me in 1 second
end openCard
on DisplayNextImage
switch gImageCounter
case 1
set the fileName of image "ImageObject" to "File1"
break
case 2
set the fileName of image "ImageObject" to "File2"
break
case 3
set the fileName of image "ImageObject" to "File3"
--
-- On the last case, you need to reset the counter back 1, but we
set it to 0 here so that the Add will make it 1
--
put gImageCounter to 0
break
end switch
add 1 to gImageCounter
send "DisplayNextImage" to me in 10 seconds
end DisplayNextImage
A better way of doing it would be to have a list of file names and
index the list. I have written this way for clarity.
Hope this helps
All the Best
Dave
>Ban,
>
>I would handle this at the card level via:
>
>on openCard
> send myImageRotate to me in 10 seconds
>end openCard
>
>on myImageRotate
> -- do your repeat loop here to both rotate and cycle through
>your images
> -- maybe use a counter for what image we are on at this time through
>
> send myImageRotate to me in 10 seconds
>end myImageRotate
>
>HTH
>
>Tom
>
>On Jul 28, 2005, at 4:01 PM, Ban Nguyen wrote:
>>
>>Do the images sit on top of each other? or are they side by side?
>>On top:
>>Do you want one image to appear and then rotate in ten seconds and Then
>>disappear and be replaced by image 2 which then rotates in ten seconds
>>to disappear and be replaced by image 3 etc.
>>
>>
>>Yes, the images sit on top of each other. I want image 1 appears
>>then 10 sec image 2 appear then 1 sec image 3 appear..........back
>>to image 1 and so on
>>
>>
>>I have one main stack which has 5 cards. I want these images keep
>>changing while user click to go to another card
>>
>>Thanks for your help
>>
>
>_______________________________________________
>use-revolution mailing list
>use-revolution at lists.runrev.com
>Please visit this url to subscribe, unsubscribe and manage your
>subscription preferences:
>http://lists.runrev.com/mailman/listinfo/use-revolution
More information about the use-livecode
mailing list