Flasher Archive

[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]


Subject: FLASH: Pan/Mask effect
From: Marc Hoffman, Poison Dart Frog Media
Date: Fri, 14 Apr 2000 00:57:37 +0100

I'm trying to code this in Actionscript but probably need a working example
to learn it. This is based on another Flasher's question earlier today, but
is an attempt at a solution that's in a different direction.

Effect: drag a window around the stage, have a background image show
through only where the window is.
Problem: a dragged movie clip cannot act as a mask for a lower layer
(otherwise this would be a piece of cake!).
Possible solution (but one which I don't know exactly how to code):
- Put the background image in a lower layer of a movie clip. Make it a
movie clip itself, so it has an instance name and can be moved around using
SetProperty of _x and _y;
- Above that background (also in the movie clip) put a mask that lets the
background show through.
- Make this whole structure (movie clip) draggable by putting an invisible
button over the mask area;
- Make the main timeline a 2-frame loop. Use ActionScript in the first
frame of the main timeline to constantly monitor the (dragged) position of
the movie clip and to move the nested movie clip (the background image) in
the reverse direction of the drag, so that as you drag the parent clip to
the left, let's say, the nested background movie clip shifts to the right
and, therefore, the masked part is the left part of the background.

If anyone understands this (does it sound like I'm from Mars?) and
understands the code, could you help out?

thanks,



Marc Hoffman

Poison Dart Frog Media
http://www.dartfrogmedia.com


flasher is generously supported by...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Get the last 100 messages from the flasher list NOW
http://www.chinwag.com/flasher/last100.shtml

Flash books http://www.chinwag.com/flasher/books.shtml
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpatchinwag [dot] com


Replies
  Re: FLASH: Pan/Mask effect, Robert Bleeker
  Re: FLASH: Pan/Mask effect, Cheri Harder

[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]