Page 1 of 1

Transparent Visual Effect

Posted: Sun Dec 05, 2021 5:46 pm
by JereMiami
If I have a transparent image that I want to "show with visual effect," or "hide with visual effect," is there any way to write this, or set some sort of property, so that the visual effect just applies to the transparent image and does not grab the background objects showing behind it and cause them to get caught in the visual effect animation?

Re: Transparent Visual Effect

Posted: Sun Dec 05, 2021 6:45 pm
by richmond62
Straight from the dictionary:

Code: Select all

on mouseUp
   lock screen for visual effect
   show img "FS" 
   unlock screen with visual effect "iris" close slow
end mouseUp
-
FSlags.jpg
-
Stack removed as updated version posted below.

Re: Transparent Visual Effect

Posted: Sun Dec 05, 2021 6:47 pm
by jmburnod
Hi,
You may use this for that:

Code: Select all

put the rect of Img "myImg" into tRect
lock screen for visual effect in rect tRect
Best regards
Jean-Marc

Re: Transparent Visual Effect

Posted: Sun Dec 05, 2021 7:03 pm
by richmond62
does not grab the background objects showing behind it and cause them to get caught in the visual effect animation?
What am I missing?

Certainly, in this modified stack (i.e. put another image behind the one to be revealed)
this 'catching' does not seem to happen:
-
SShot 2021-12-05 at 20.01.03.png

Re: Transparent Visual Effect

Posted: Sun Dec 05, 2021 8:47 pm
by JereMiami
Thanks! The image I have is a transparent image that is at a higher layer than the gold box (shown in the attachment). The transparent image covers the whole screen, including the gold box. I seem to be struggling to write this code so that only the image on layer 3 is involved in the visual effect animation so that layer 1 (the gold box) and layer 2 (the text field in the gold box) does not become part of the visual effect.

Any thoughts? Or should your code work and I'm just not doing it right?

Thanks again!

Re: Transparent Visual Effect

Posted: Sun Dec 05, 2021 8:51 pm
by richmond62
Can you post your stack, as I am unable to understand
exactly what you mean by 'involved'.

Re: Transparent Visual Effect

Posted: Sun Dec 05, 2021 9:03 pm
by JereMiami
Here it is. "Involved" means I don't want the object(s) under the transparent image to be "pushed," "revealed," or otherwise involved in the visual effect that is meant only to apply to the image that is overlaying them.

Re: Transparent Visual Effect

Posted: Sun Dec 05, 2021 10:31 pm
by Klaus
Hi JereMiami,

unfortunately I don't have an imge: C:/Users/jrj25/OneDrive/Desktop/1122121/images/transition1.png :D

Anyway, I think what you are after is only possible with the DISSOLVE effect, since all other effects work on
the RECT that needs to be updated on screen.

Instead of using the visual effect -> reveal down you could also move that image by script, that will do exactly
what you want. :-)

Best

Klaus

Re: Transparent Visual Effect

Posted: Mon Dec 13, 2021 10:44 pm
by jiml
Hi JereMiami,

Perhaps instead of using a visual effect on that transparent image you might try animating its BLENDLEVEL.

Something like this in the script of theTransparentImage:

Code: Select all

on showMe
  repeat with x = 100 down to 0
    set the blend level of me to x
    wait 1 tick  --adjust speed here
  end repeat
end showMe

on hideMe
  repeat with x = 0 to 100
    set the blend level of me to x
    wait 1 tick  --adjust speed here
  end hideMe
end showMe

Re: Transparent Visual Effect

Posted: Tue Dec 14, 2021 11:33 pm
by jiml
Make that:

Code: Select all

on showMe
  repeat with x = 100 down to 0
    set the blendlevel of me to x
    wait 1 tick  --adjust speed here
  end repeat
end showMe

on hideMe
  repeat with x = 0 to 100
    set the blendlevel of me to x
    wait 1 tick  --adjust speed here
  end repeat
end hideMe