How to select image object instead of group

Scott Pepperdine spepper at byu.net
Sat Dec 11 19:04:48 EST 2010


I was unaware of the group behavior that if I changed the image on one 
card, I would change the image on all cards containing that group.  To 
answer your question, I am after multiple images across multiple cards.  
The user experience I'm after is for the user to click a button "Create 
New card" and go to a new card with an image object and multiple 
fields.  They then import a picture into the image and fill in data to 
the fields.  The picture and the fields remain unique to that card.  If 
I use a clone card command, instead of a background group, will that 
work?  It's either that or use the group thing and script the image into 
a custom property as you suggest.

On 12/11/2010 1:55 AM, Scott Rossi wrote:
> Recently, Scott Pepperdine wrote:
>
>> The image script is:
>> on mouseup
>>      answer file "Select your file:"
>>      if it is  empty exit to top
>>      set the filename of image "image" to it
>> end mouseup
>>
>> The group script is as follows ( just to prove to me this what was
>> happening:
>> on mouseup
>>      answer "1033"
>> end mouseup
>>
>> Thanks all for your efforts.  I think I;ll just ungroup the controls and
>> create my new cards with 'clone' or some such think, instead of relying
>> on the background group behavior.
> I really hope you don't have to dumb down your stack to get the above
> working.  Let's verify a couple of things:
>
> 1) You realize that by putting your image in a group, it's available on all
> cards that contain that group, yes?  So if you change the image on one card,
> it will change on all cards that contain that group.  If you want the image
> to be different across multiple cards, you'll either need to use multiple
> images (one for each card, not in a common group) or store the image data
> for each card separately (in custom properties, for example) and load the
> image data upon opening each card as needed.
>
> 2) The most common reason to put an object in a group is to use the same
> object/script across multiple cards.  Fields within groups have the ability
> to hold shared data (sharedText enabled) across multiple cards, or to have
> separate data for each card (sharedText disabled).  Images do not have this
> ability natively, but you can script it, as explained above.
>
> So what exactly are you trying to accomplish?  Multiple images across
> multiple cards, or one image across multiple cards?
>
> Regards,
>
> Scott Rossi
> Creative Director
> Tactile Media, UX Design
>
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>




More information about the Use-livecode mailing list