Flasher Archive
[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]
Subject: | RE: FLASH: Tracking with Tell Target |
From: | Curtis Bay |
Date: | Thu, 15 Oct 1998 03:20:49 +0100 |
There is another, perhaps less elegant, solution I came up with today
someone else might find a use for. By storing the box movieclip
offscreen, all the puzzle pieces can be set to their visible or
nonvisible state as the case may be. When the small onstage box is
clicked, the big offstage box movie clip simply proceeds to a frame
where all elements have been positioned onscreen. There aren't any
resetting problems because the movie clip does not load or unload,
simply moves its physical location.
Many thanks Marc and John. My mind is already reeling with the
possibilities of masking clips within clips.
In all advanced Flash programming it is necessary to set up dozens of
empty frame/full frame states for movie clips. Wouldn't it be easier to
have DHTML-like show/hide? Wish list for Flash 4: an integrated
visibility attribute, allowing you to set a movie clip's visibility with
a Tell Target parameter.
Curtis
-----Original Message-----
From: Marc Hoffman [marchofjps [dot] net (mailto:marchofjps [dot] net)]
Sent: Wednesday, October 14, 1998 4:11 PM
To: flashershocker [dot] com
Subject: Re: FLASH: Tracking with Tell Target
At 08:45 PM 10/13/98 -0700, you wrote:
>
>Example:
>=======
>Picture a puzzle composed of a large number of pieces--say 50. Each
time
>you click a piece it moves into the puzzle box. Any time you click the
>box it expands to fill the screen and displays all the pieces inside
>which have been selected up to that point.
> <SNIP>
Hi Curtis.
It should work to have each puzzle piece in a movie clip with "empty"
and
"visible" frames. Place all clips in the same layer, above the layer
where
user interaction takes place. Have them start empty and use Tell Target
to
move them each to the "visible" frame when clicked. If you need the
piece
to have motion, do this in a lower layer than the one that holds all the
puzzle piece clips, and have the motion 1) move the piece into the same
position as the puzzle piece clip's "visible" counterpart and 2) when it
gets to that resting position, have it TellTarget the puzzle piece clip
to
become Visible (read on for how to conceal the clip even though the
piece
is "visible"). No reason why this shouldn't be stable. But if, as you
suggested, clips are being reset or aren't getting called correctly
'cause
they haven't loaded, use an "If frame is loaded" condition before
getting
to that part of the movie. If the pieces are optimized this shouldn't
add
too much to download time, even with 50 puzzle pieces.
The next issue is how to reveal those clips that are "visible" upon
clicking the box. Do this with a mask layer above the puzzle piece
movie
clip layer. The counter-intuitive thing about masks is that they reveal
rather than conceal what is in the layer below. "Masks" should more
aptly
be named "windows." Anyway, create a solid rectangle the size of the
area
containing the puzzle pieces -- full stage if need be -- and put it in
its
own "visible/empty" clip. Place this clip in the mask layer above the
puzzle piece clips. Make the puzzle box (in a separate layer) a button
with a Tell Target that calls the mask's "visible" state.
If you need to conceal the user interactive layer (with the smaller
version
of the puzzle box), have two layers sandwiched in the middle of all
this.
Make one a full-screen mask (as in the previous paragraph) and have it
reveal a full-screen opaque backdrop beneath it, which will conceal all
layers below. Use the same movie clip concept to make the mask idle and
functional.
Resulting Layers:
1. puzzle piece clip mask layer (a clip that masks all or none of the
stage);
2. puzzle piece clips (in their various "visible" and "empty" states);
3. backdrop mask layer (a clip that masks all or none of the stage);
4. backdrop (opaque, covers all of stage when mask above it is
activated);
5. user interactive layer with clickable pieces and puzzle box
Resulting Interactivity:
1. "visible" state, cannot be seen because there is an empty mask layer
above it) .
2. User clicks on puzzle box. TellTarget causes a mask to reveal a
backdrop that conceals the interactive stuff.
3. At the same time, TellTarget causes a mask on the top layer to reveal
the layer with all the puzzle piece clips in it. Those clips that are
in
the "visible" state will now be viewable; those that are "empty" will
still
be invisible.
Remember that to TellTarget a movie clip, you must give the clip an
instance name by double-clicking it on the stage (PC platform) and
naming
its instance in the dialogue box that pops up.
Hope this helps.
-Marc H.
------------------------------------------------------------------------
To UNSUBSCRIBE send: unsubscribe flasher in the body of an
email to list-managershocker [dot] com. Problems to: ownershocker [dot] com
N.B. Email address must be the same as the one you used to subscribe.
For info on digest mode send: info flasher to list-managershocker [dot] com
[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]