Page 1 of 1

Fade up on a video clip

Posted: Tue Dec 12, 2017 1:43 am
by hutchfx
Using LiveCode 9.0 DP 10 on a Mac with OS 10.13.2

I would like to have a video clip fade on from black.

I tried:
go to card "black card"
visual effect "dissolve"
go to card "video card"
...and a "start player" in preopencard of video card.
The player pops on, and then the rest of the card dissolves in.

I tried putting a black rectangle over the player, then having a repeat with loop change the blendLevel of the graphic. This worked with the pointer tool selected, though it was slow and choppy. With the browse tool selected, the graphic moved behind the player.

I know I can accomplish this by editing the video clip to fade up from black, but that will create some other issues, and limit the flexibility. Does anyone have any other suggestions for doing this by script?

Thanks!

Hutch

Re: Fade up on a video clip

Posted: Tue Dec 12, 2017 12:22 pm
by richmond62
You can set the blendLevel of a player and have a black mask behind
the player which will show through.

The ONLY snag is that the blendLevel does NOT affect the video that the player
is playing.

Re: Fade up on a video clip

Posted: Tue Dec 12, 2017 1:13 pm
by richmond62
FadedLove.png
This works insofar as it consists of a main stack and a substack.

The substack is palettized and acts as a mask above the video player.

To get this to work you will have to reset the path to the clip "BubbleSort.mp4"
in the properties palette of the player "PP".

https://www.dropbox.com/s/lory2rk0qsxwo ... e.zip?dl=0

Re: Fade up on a video clip

Posted: Wed Dec 13, 2017 3:33 am
by hutchfx
Richmond62,

Thank you! The substack trick does what I need it to do.

Hutch

Re: Fade up on a video clip

Posted: Wed Dec 13, 2017 9:06 pm
by jiml
Hutch,

Glad Richmond's suggestion worked. Very clever using a second stack.

Attached is a refinement of your original approach.
It uses a couple of tricks to overcome the video choppiness you saw.
I've only tried this on a Mac; your mileage may differ.
fireplace fade.livecode.zip
(1.59 KiB) Downloaded 129 times
Jim Lambert

Re: Fade up on a video clip

Posted: Sat Jan 06, 2018 6:15 pm
by jiml
Another simpler approach to the fireplace effect. No movie at all.

Code: Select all

go stack url "http://netrin.on-rev.com/animateimage/fireplace_jim.livecode"

fadeIn 3000 - fades in in roughly 3 seconds
fadeOut 2000 - fades out in roughly 2 seconds
restore - gets rid of the backdrop

The fades could be triggered by a keystroke.


Jim Lambert