> I am trying to copy and image from the current card to a card in a external
> stack, "GrommetData".
>
> If the image is already there from a previous copy,  I delete it first and
> then copy it to the card.
>
> If the image is already there all works as expected, BUT if the image is not
> alredy there I get an error after the image is copied.  The handler looks
> like this
>
>
>    IF exists (img "image" of cd tCard of stack "GrommetData") THEN
>       delete img "image" of cd tCard of stack "GrommetData"
>    END if
>
>    copy img "image" to cd tCard of stack "GrommetData"
>

Hi Todd,

I just made a test with a mainStack and a sub-stack called "Sub". I
imported an image from the image library and tested it with the
following button script:

on mouseUp
  if there is an img "alerthand.gif" of cd 1 of stack "Sub" then
    delete img "alerthand.gif" of cd 1 of stack "Sub"
    wait 1 second
  end if
  copy img "alerthand.gif" to cd 1 of stack "Sub"
  put the result
end mouseUp

It all worked perfectly whether Sub had the image already or not. (The
wait is only there so that I can see that the original is really
deleted).

You say the error occurs after the image has been copied. What is the
error? What happens next in your script? If you isolate the copying
script completely, does it work then?

Cheers,
Sarah
_______________________________________________
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to