Hello all,
I came across the Core Image effects stack and would like to apply one or two to my application.
My application has two modes, so it would be great if I could use a ripple transition as the user flips between the two.
I'd also like to use the page curl as the user works their way through the many cards (which might end up as groups of controls but tantamount to the same experience).
Anyway, I can't seem to get the effects to work. Whilst the sample stack lets you play around with the CI library, neither it nor the help manual tells you how to actually code it yourself!
In my app, I need to lock the screen, go to the card, allow it to set itself up and then unlock it. Unlocking with an effect would be how I need to do this.
Any help much gratefully received.
Cheers,
Steve
CoreImage effects on unlock screen
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Posts: 47
- Joined: Sat Nov 17, 2007 6:04 pm
- Location: Worcester, UK
-
- VIP Livecode Opensource Backer
- Posts: 977
- Joined: Sat Apr 08, 2006 7:47 am
- Location: Aalst, Belgium
- Contact:
Hi Steve,
If you open the Core Image sample stack, you can peek at the code of the 'Go' button to find out the exact syntax. The syntax depends a lot on the core image transition, and there doesn't seem to be a complete document.
So edit the script of the 'Go' button, and uncomment the line 'put tParameters' near the bottom of the script.
Now you'll have a much better idea of what syntax is expected for the particular transition you're trying to achieve. I'd recommend storing the name and parameters of the transition into custom properties that you can then load from your script.
So suppose we're copying the default CIRippleTransition from that stack.
- set the uCIEffectName of button "Switch" to "CIRippleTransaction"
- set the uCIEffectSpeed of button "Switch" to "slow"
- set the uCIEffectParams of button "Switch" to "center (200,150) and extent (0,0,400,300) and scale 50.00 and shadingImage id 5314 and width 30.00"
Now your script should look something like this:
Hope this helped,
Jan Schenkel.
If you open the Core Image sample stack, you can peek at the code of the 'Go' button to find out the exact syntax. The syntax depends a lot on the core image transition, and there doesn't seem to be a complete document.
So edit the script of the 'Go' button, and uncomment the line 'put tParameters' near the bottom of the script.
Now you'll have a much better idea of what syntax is expected for the particular transition you're trying to achieve. I'd recommend storing the name and parameters of the transition into custom properties that you can then load from your script.
So suppose we're copying the default CIRippleTransition from that stack.
- set the uCIEffectName of button "Switch" to "CIRippleTransaction"
- set the uCIEffectSpeed of button "Switch" to "slow"
- set the uCIEffectParams of button "Switch" to "center (200,150) and extent (0,0,400,300) and scale 50.00 and shadingImage id 5314 and width 30.00"
Now your script should look something like this:
Code: Select all
on mouseUp
lock screen
-- modify the UI while the screen is locked
-- ...
-- now unlock the screen with the right visual effect
put the uCIEffectName of me into tEffect
put the uCIEffectSpeed of me into tSpeed
put the uCIEffectParams of me into tParams
do "unlock screen with visual effect tEffect" && tSpeed && tParams
end mouseUp
Jan Schenkel.
Quartam Reports & PDF Library for LiveCode
www.quartam.com
www.quartam.com