Windowshape image as mask for second image
Eric Chatonet
eric.chatonet at sosmartsoftware.com
Fri Dec 9 09:52:30 EST 2005
Hi Sivakatirswami,
Don't know if I understand correctly your problem but I would try to
solve it in this way:
A plain windowshape window with your feathered outer edge, your world
image grouped and a scroll by script of the image inside its group.
Sorry if I misunderstood :-)
Best Regards from Paris,
Eric Chatonet
Le 9 déc. 05 à 11:51, Sivakatirswami a écrit :
> Scott:
>
> I made a bit of progress... I wanted to "play" with the window
> shape to see if a feathered outer edge to the window shape was good
> (I'm not so sure now that I see it.. I mean it's "cool" and all,
> but a clean edge to probably a more solid design)
>
> Any way I set that image as the window shape and put it all the way
> to the back, it's a PNG feathered on the outside and solid inside..
> then I created another PNG which is a dup of the first one, but
> this time with a transparent square hole in the center set this to
> the top layer -- this is the "picture frame" and put my world map
> underneath it...
>
> Then I have a logo and a couple of titles that I wanted to show on
> top of the world map as it moves...
>
> OK this all works pretty well as I want now. At least if everything
> is just static... But if we start adding animation using simple
> move and show with visual effects, --problems... big time...
>
> We are not talking rocket science animation here:
>
> on preopenstack
> set the windowshape of this stack to 1010
> set the loc of this stack to the screenloc
> set the loc of img "world_map.png" to 465,240
> hide img "ht_title.png"
> hide img "ht_logo.png"
> hide img "ht_digital.png"
> hide img"world_map.png"
> end preopenstack
>
> on openstack
>
> show img"world_map.png" with visual effect iris open fast
> # the above actual pokes a hole momentarily in the interface
> # and my desktop shows thru during the iris open action.
> # not intended but an interesting effect...and possibly
> # could be considered a "bug" since the windowshape image is
> # not transparent in the middle....
>
> move img "world_map.png" from 465,240 to 195,240 in 3 seconds
> without waiting
> # this is horrible, the map "jerks" across the window...
>
> show img "ht_logo.png" with visual effect reveal down slowly
> show img "ht_title.png" with visual effect wipe down slowly
> # more incredibly bad results, flicker, double images, grey boxes
> appearing...
>
> show img "ht_digital.png"
>
> end openstack
>
> Results--disaster... I'm getting the world map jerking across the
> screen instead of moving in a smooth fluid motion over 3 seconds..
> and the visual effects of the title images on top of the moving
> map underneath are, well, stunningly bad... flicker, double image,
> grey box appears, followed by the actual title image... I'm doing
> something terribly wrong.
>
> I'll upload the stack to my space later today after our fire wall
> "wakes up" here (no http during off hours...)
>
> I didn't implement the group but I do get that as a useful way to
> "mask" an img that moves around inside the group.... but I don't
> think it will solve the basic display problems.. Either I am
> missing something simple... Or Rev simply doesn't do well with
> layered animation effects, animated images on top of animated
> images..??
>
> Sivakatirswami
>
>
>
>
>
> On Dec 08, 2005, at 8:51 PM, Scott Rossi wrote:
>
>> Recently, Sivakatirswami wrote:
>>
>>
>>> I have this "concept" and I'm not really sure it can be implemented
>>> in Rev... at least I haven't found a way:
>>>
>>> 1) Establish a border that is like a picture frame, that is
>>> feathered
>>> on the outer edges... and the inside is transparent....
>>>
>>> 2) use this as a windowshape
>>>
>>> 3) next we want to place an image inside this "frame" such that the
>>> frame serves as a mask to the second image which is underneath...
>>> then we would want the image underneath to be set to move across
>>> very
>>> slowly... but only appear on the inside of the frame.
>>>
>>> Now, this doesn't work...
>>>
>>> Saving the window frame as PNG with transparency on.. we get a lowly
>>> frame, and I can see right three the middle to my desktop and also
>>> the outer edges are feathered. Lovely: caveat: the inside of the
>>> frame is also completely knocking on the entire interface!
>>>
>>
>> If I understand what you're trying to do, you don't even need a
>> custom
>> windowshape for this. You can do this within a single window by
>> using a
>> transparent PNG for the frame and placing whatever images you want
>> to move
>> behind the frame in a group (with lockLoc enabled) behind the
>> frame that is
>> set to the same width as the frame . Thus when you slide the
>> images back
>> and forth within the group, they will be masked by the group and
>> visible
>> within the frame image. But you will have a solid color (or
>> texture) in the
>> center of the frame where photos are visible, since this is where
>> the card
>> shows through the frame.
>>
>> Make sense?
>>
>> If you want to animate the mask of an image, it's possible by
>> repeatedly
>> setting the alphadata of an image to a sequence of PNGs but this
>> will be a
>> lot of work.
>>
>> Otherwise, yes, we need more elaborate masking options within
>> Rev. The
>> current rectangle provided by groups is too limiting.
>>
>> Regards,
>>
>> Scott Rossi
------------------------------------------------------------------------
----------------------
http://www.sosmartsoftware.com/ eric.chatonet at sosmartsoftware.com/
More information about the use-livecode
mailing list