post factum Background behavior?

zryip theSlug zryip.theslug at gmail.com
Sat Jan 30 10:05:33 EST 2010


2010/1/30 Richmond Mathewson <richmondmathewson at gmail.com>:
> On 30/01/2010 16:45, Klaus on-rev wrote:
>>
>> Hi Richmond,
>>
>>
>>>
>>> Suppose we have a stack with 20 cards already populated with all sorts of
>>> complicated stuff,
>>> and then we want to spread an image across all those cards but realise
>>> that to copy-paste
>>> on each card will bloat the stack ridiculously . . .
>>>
>>> Is there a way to set an object to have background behaviour so that it
>>> will propagate
>>> across a series of cards after those cards have been set up?
>>>
>>
>> just "group" that image/object and "place" it on the necessary cards.
>>
>
> Err . . . "place" . . . ?

Hi Richmond,

Just group your image in the first card of your stack and execute a
script like this:

on mouseUp
   repeat with theCard = 1 to number of cards of this stack
      lock messages
      go cd theCard
      if (there is no group "My_Image") then
         place background "My_Image" onto this card
      end if
      unlock messages
   end repeat
end mouseUp


-- 
-Zryip TheSlug- wish you the best! 8)
http://www.aslugontheroad.co.cc



More information about the use-livecode mailing list