Page 1 of 1

Non-rectangular visual effects

Posted: Thu Oct 04, 2012 12:37 pm
by strongbow
Has anyone tried/succeeded to get a non-rectangular visual effect on a part of the screen?

Or has anyone got some good ideas for using a flip visual effect using a circle, for example?

In a very controlled environment, eg. with a black background and a circular image in front, it would seem to be possible to get the appearance of it working, but if there's a background image around the target circle, then I think it may be very difficult, since the docs say, for a flip effect:

"The background behind the flip is taken from the background color of the current stack - i.e. the card is cut out and flipped over the stack."

So an image on the card surrounding the target could not possibly have the same background color as the stack, thus making this impossible. Or?

Any ideas?

Thanks!

Alan :-)

Re: Non-rectangular visual effects

Posted: Thu Oct 04, 2012 5:43 pm
by scotttyang
can't use the flip visual effect unless the background is black.

The only workaround i thought of was something like...shrink the width, flip the image then expand the image back to original width....something like below...

repeat with x=1 to 10
set the width of image "flipimage" to the formattedwidth of image "flipimage" * (1 - (.1*x)
end repeat

flip image "flipimage"

repeat with x=1 to 10
set the width of image "flipimage" to the formattedwidth of image "flipimage" * (.1*x)
end repeat

Re: Non-rectangular visual effects

Posted: Thu Oct 04, 2012 9:26 pm
by strongbow
Hi Scott

Thanks loads for the hint!! Great. Needs (as far as I can tell) a couple of small additions, finished script below... Again, thanks a lot for the help, really appreciate it!

Code: Select all

on flipLeft pTarget
   put the loc of pTarget into tLoc
   
   repeat with x=1 to 10
      set the width of pTarget to the formattedwidth of pTarget * (1 - (.1*x))
      set the loc of pTarget to tLoc
      wait 0 secs
   end repeat
   
   //flip image "flipimage"
   set the filename of pTarget to [the flipped image name here]
   
   repeat with x=1 to 10
      set the width of pTarget to the formattedwidth of pTarget * (.1*x)
      set the loc of pTarget to tLoc
      wait 0 secs
   end repeat
end flipLeft
cheers,

Alan :-)