Transparent Visual Effect
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Transparent Visual Effect
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?
-
- Livecode Opensource Backer
- Posts: 9454
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Transparent Visual Effect
Straight from the dictionary:
-
-
Stack removed as updated version posted below.
Code: Select all
on mouseUp
lock screen for visual effect
show img "FS"
unlock screen with visual effect "iris" close slow
end mouseUp
Stack removed as updated version posted below.
Last edited by richmond62 on Sun Dec 05, 2021 7:03 pm, edited 1 time in total.
-
- VIP Livecode Opensource Backer
- Posts: 2718
- Joined: Sat Dec 22, 2007 5:35 pm
- Location: Genève
- Contact:
Re: Transparent Visual Effect
Hi,
You may use this for that:
Best regards
Jean-Marc
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
Jean-Marc
Last edited by jmburnod on Sun Dec 05, 2021 8:42 pm, edited 1 time in total.
https://alternatic.ch
-
- Livecode Opensource Backer
- Posts: 9454
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Transparent Visual Effect
What am I missing?does not grab the background objects showing behind it and cause them to get caught in the visual effect animation?
Certainly, in this modified stack (i.e. put another image behind the one to be revealed)
this 'catching' does not seem to happen:
-
- Attachments
-
- Viz.livecode.zip
- Here's the stack
- (83.42 KiB) Downloaded 95 times
Re: Transparent Visual Effect
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!
Any thoughts? Or should your code work and I'm just not doing it right?
Thanks again!
-
- Livecode Opensource Backer
- Posts: 9454
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Transparent Visual Effect
Can you post your stack, as I am unable to understand
exactly what you mean by 'involved'.
exactly what you mean by 'involved'.
Re: Transparent Visual Effect
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.
- Attachments
-
- img_effect.zip
- (776 Bytes) Downloaded 103 times
Re: Transparent Visual Effect
Hi JereMiami,
unfortunately I don't have an imge: C:/Users/jrj25/OneDrive/Desktop/1122121/images/transition1.png
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
unfortunately I don't have an imge: C:/Users/jrj25/OneDrive/Desktop/1122121/images/transition1.png
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
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:
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
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