Copy image content for object image empty. (Image moving)

Klaus Major klaus at major-k.de
Sat Sep 17 06:03:56 EDT 2005


Buenos diaz Gilberto,

> Hi,
>
>> you can simply put one image into another one :-)
>> But this only works with imported images, NOT with referenced images!
> I understand this.
>
>> on mouseUp
>>    put image "img01" into image "Visor" ##of cd 17 of stack  
>> "another  cool stack"
>> end mouseUp
> This works to the a thousand marvels. Thanks.

Great :-)

>> This is a little less scripting and you do not have to take care  
>> that  the dimensions
> As you spoke of the dimensions I stayed thinking and when carrying  
> out a code I found a detail that   I wanted to be able to clarify.
>
> I made the following script in the image.
>
> on mouseUp
>    lock screen
>    put image "img01" of stack "myStack" into image "Visor"
>    set the width of image "Visor" to 200
>    set the height of image "Visor" to 200
>    unlock screen
> end mouseUp
>
> And it happens that when I press the click in the image, the image  
> goes moving up in a position and me the only thing that I make is  
> to change their dimensions.
>
> Why does this happen?

Sorry, no idea...

> I don't have neither the smallest idea.

I also found that setting height and/or width will also change
the loc of an object.

I ususally work around this with:

on mouseUp
    put the loc of img "visor" into tOldloc
    lock screen
    put image "img01" of stack "myStack" into image "Visor"
    set the width of image "Visor" to 200
    set the height of image "Visor" to 200
    set the loc of img "visor" to tOldloc
    ## :-)
    unlock screen
end mouseUp

>> of both images are identical(!) as you have with "imagedata".
>> Hope that heps.
>>
> Yes and thanks you.
>>> Greetings,
>>>
>>> Gilberto Cuba
>>>
>>
>> Regards from germany
>> Klaus Major
>> klaus at major-k.de
>> http://www.major-k.de
>>
> Greetings,
>
> My name is Gilberto Cuba and I live in Cuba.

I almost guessed ;-)

Have a nice weekend.


Regards

Klaus Major
klaus at major-k.de
http://www.major-k.de




More information about the use-livecode mailing list