fun with emerging stacks

Pierre Sahores psahores at easynet.fr
Wed Aug 18 15:42:42 EDT 2004


Thanks Wouter. A really cool designer's piece of code :D

Best Regards, Pierre


Le 18 août 04, à 18:12, Wouter a écrit :

> For those who like things coming out of thin air.
> Place the following in a button named "fader":
>
> /*  place this one in the card script or in an existing preOpenStack 
> handler
> on preOpenStack
>   send "startTheProcess" to btn "fader"
> end preOpenStack
> */
>
> on startTheProcess
>   set the loc of this stack to -1000,1000
>   set decorations of this stack to noshadow,empty
>   doCapture
>   send  "fadeIn" to me in 100 millisecs
> end startTheProcess
>
> on doCapture
>   put the screenloc into tSL
>   put the width of this stack div 2 into tW
>   put the height of this stack div 2 into tH
>   put item 1 of tSL - tW,item 2 of tsL - tH,item 1 of tSL + tW,item 2 
> of tsL + tH into tRect
>   if the width of this stack mod 2 = 1 then add 1 to item 3 of tRect
>   if the height of this stack mod 2 = 1 then add 1 to item 4 of tRect
>   import snapshot from rect tRect
>   choose browse tool
>   set the name of last control to "tempimage"
>   set the blendlevel of img "tempimage" to 0
>   set the loc of this stack to the screenloc
> end doCapture
>
> on fadeIn
>   if there is an img "tempimage" then
>     set the blendlevel of img  "tempimage" to (the blendlevel of img 
> "tempimage" + 2)
>     if the blendlevel of img "tempimage" < 100 then send "fadeIn" to 
> me in  20 millisecs
>     else
>       delete img "tempimage"
>       if the decorations of this stack = noshadow then set the 
> decorations of this stack to default
>     end if
>   end if
> end fadeIn
>
> on mouseUp
>   if the decorations of this stack = noshadow then
>     set the decorations of this stack to default
>     if there is a img "tempimage" then
>       delete img "tempimage"
>     end if
>   else
>     answer "Do you want to do it again?" with "No" or "Ok"
>     if it is "Ok" then
>       send "startTheProcess" to me
>      end if
>   end if
> end mouseUp
>
> It is just an experiment and it performs well on Mac OS X.
> But it is not tested on other platforms yet.
> So please....
> TIA,
> WA
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
>
-- 
Bien cordialement, Pierre Sahores

100, rue de Paris
F - 77140 Nemours

psahores+ at +easynet.fr

GSM:   +33 6 03 95 77 70
Pro:      +33 1 64 45 05 33
Fax:      +33 1 64 45 05 33

WEB/EAI services & ACID DB over IP
"Mutualiser les deltas de productivité"



More information about the use-livecode mailing list