naming duplicate objects

Mark Schonewille m.schonewille at economy-x-talk.com
Mon Aug 17 15:16:04 EDT 2009


Hi Barry,

Immediately after copying an object, you can store the long id of it  
in a variable and change the name  of the object.

copy grc x to this cd
put the long id of it into myObject
set the name of myObject to "New Graphic 1"

Does that help?

--
Best regards,

Mark Schonewille

Economy-x-Talk Consulting and Software Engineering
http://economy-x-talk.com

Download Snapper Screen Recorder at http://snapper.economy-x-talk.com

On 17 aug 2009, at 21:03, barryb at libero.it wrote:

> Hello all!
> I have a short handler in an image object  which does something if
> it
> intersects two graphics, called "circle1" and "circle2", overlaying  
> each
>
> other - it should not do anything if only one graphic is present.
>
> To my
> stupefaction it works BUT only with the two original grcs,
> nothing happens if
> the grcs are copies, clones or duplicates of the
> originals carrying the same
> name.
> As I need to have several of these 'triggers' on the same card, how
> should I name or call them correctly?
> Yes, it's a game and the script, [code,
> talk] in the images looks something like this.
>
> on mouseDown
>  grab me
> end
> mouseDown
>
> on mouseUp
>    if intersect (me,grc "circle1") then
>            if
> intersect (me,grc "circle2") then
>            DoMyTrick
>
>         end if
>      end if
> end mouseUp
>
> TIA  Barry Barber





More information about the use-livecode mailing list