Core Image effects OS X

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
jrioux
Posts: 50
Joined: Fri May 04, 2007 4:02 pm

Core Image effects OS X

Post by jrioux » Thu Oct 25, 2012 9:48 pm

Live Code's "multimedia" page online says "Visual transition effects include QuickTime effects, Core Image Effects (e.g. page curl on OS X machines) and built-in transitions." However, the 5.5.1 documentation on page curls (under "visual" in the dictionary), seems to limit the page curl effect to ios. I've tried it on my Mac (Mountain Lion), and it doesn't work. Am I missing something?

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4163
Joined: Sun Jan 07, 2007 9:12 pm

Re: Core Image effects OS X

Post by bn » Thu Oct 25, 2012 10:22 pm

There is an example stack that comes with LiveCode:
Menu -> Help -> Example Stacks and Resources -> Folder: Examples -> File: Core Image Sampler

Also there is a stack in RevOnline accessible from within Livecode -> User Samples -> search for visualEffects Transitions

or online:
http://revonline2.runrev.com/stack/461/ ... ransitions

Kind regards
Bernd

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7389
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Core Image effects OS X

Post by jacque » Fri Oct 26, 2012 8:06 pm

The page curl is provided as a constant for use in mobile, but you can also do it on a desktop Mac. You need to save the binary code for the visual effect that is returned from "answer effect". You only need to do that part once. So, from a button or the message box, do this:

Code: Select all

 answer effect
set the cCurlEffect of this stack to it
When the visual effect dialog comes up, choose the page curl and set it up however you want. When you dismiss the dialog the binary code will be stored as a custom property of the current stack. To use it later:

Code: Select all

visual effect (the cCurlEffect of this stack)
go next card
See also the dictionary entry for "answer effect".
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4163
Joined: Sun Jan 07, 2007 9:12 pm

Re: Core Image effects OS X

Post by bn » Fri Oct 26, 2012 8:31 pm

As far as I see for the desktop MacOSX the answer effect does not offer the curl effect, just the QuickTime effects.
It seem that on the desktop core image effects like curl just work on images, not on Cards.
That is why I went through a lot of trouble to fake the curl effect when going from card to card. I take snapshots of the card and the card to go to and then apply the curl effect to the images. See stack on RevOnline referenced above which also shows the answer effect for transitions.

I would like to be wrong on this.

Kind regards

Bernd

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7389
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Core Image effects OS X

Post by jacque » Sat Oct 27, 2012 8:14 pm

I'd like you to be wrong too Bernd, but I just checked and you're right, the curl effect doesn't appear in the answer effects dialog. I should have checked before I posted, I was sure it was in there.

But the effects can be used between cards if you choose one of the available ones. This works for me (this is a button script):

Code: Select all

on mouseUp
  answer effect
  put it into tEffect
  lock screen for visual effect
  go next
  unlock screen with visual effect tEffect very slow
end mouseUp
Since the binary effects work on cards, I wonder if we could somehow grab the page curl binary code from somewhere and save it to a file. If so, we could import it into a custom property and probably use it on the desktop too.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Post Reply