Attach this behaviour to all your 365 sprites:
property myRedBoxDate
on beginSprite me
set myRedBoxDate = date(19990101+me.spriteNum-28)
put myRedBoxDate
end
regards, Florian
Gene Fritzinger wrote:
>
> Could someone suggest a modification to the code below. I have 365 sprites all of
>the same member, ranging from sprite channel 28 to 392. On the first one of these
>sprites, I've attached the code below.
>
> --on beginSprite handler of the first of 365 sprites
> property myRedBoxDate
> property mySprite
>
> on beginSprite me
> set myRedBoxDate = date(19990101)
> set mySprite = (me.spriteNum)
>
> repeat with i = 29 to 392
> set mySprite = mySprite + 1
> set myRedBoxDate = myRedBoxDate + 1
> put mySprite
> put myRedBoxDate
> end repeat
>
> end
>
> This script successfully repeats through the 365 sprites, and outputs to the message
>window the spriteNum and the date object incremented by one day for each repeat
>through the loop. My problem is, I need to assign each date object to each of the
>365 sprites, so that each sprite represents it's own date ranging from (1999, 1,1 to
>1999, 12, 31). Can anyone suggest a modification to the code above?
>
> Thanks,
> g fritzinger
>
> [To remove yourself from this list, or to change to digest mode, go to
> http://www.penworks.com/LUJ/lingo-l.cgi To post messages to the list,
> email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED])
> Lingo-L is for learning and helping with programming Lingo. Thanks!]
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi To post messages to the list,
email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo. Thanks!]