/ Forside / Teknologi / Multimedie & design / Flash / Nyhedsindlæg
Login
Glemt dit kodeord?
Brugernavn

Kodeord


Reklame
Top 10 brugere
Flash
#NavnPoint
bentjuul 4251
molokyle 1978
Klaudi 1488
jhvp 1265
pallenoc 1160
katekismus 1020
Fnollerpi.. 790
slander 510
Dr.Disco 500
10  Flash77 500
Lag, Levels, Dybde (layers, levels, depth)~
Fra : Michael Peo


Dato : 04-01-02 18:18

Faldt over denne grundige og fine forklaring i:
news://forums.macromedia.com/macromedia.flash:

"Dave Shacket" <dshacket@believethis.org> wrote in message
news:a14ibh$k6u$1@forums.macromedia.com...
How do levels levels, depths and layers interact

Hi Dave:

Sometimes people use the terms layer and level interchangeably, but they are
not the same at all. Layers are the stack you see in the authoring tool,
within a single timeline, used to keep apart separate objects which share
that timeline. They really only exist in the authoring tool - when you
publish to SWF, Flash "flattens" out the layers into a single timeline.

There are two ways a timeline can be independent of the main timeline: it
can be a MOVIE CLIP, or a LEVEL. By independent we mean that you can start
and stop them independently (as well as affect them in other ways.) You can
stop the main timeline, for example, and the independent timelines will
continue playing, or you can stop a clip or level as the main timeline
continues playing.

LEVELS are a stack of independent timelines that are movies (.SWF) stored
outside the main movie, and brought in with the Load Movie command. (For a
good primer on the Load Movie command, see www.macromedia.com/go/14190.)

Levels are referred to by their stacking order as _level0 _level1 _level2
and so forth. The higher the number, the "closer" it is to the viewer,
visually. A movie loaded in that way exists throughout the entire timeline
of the main movie. For this reason, a popular use for a loaded movie is a
soundtrack which plays continually regardless of what the main movie is
doing.

A movie CLIP is also an independent timeline. The clip itself resides in
the library, not of outside your movie. Unlike a movie loaded into a level,
you can have an instance of a movie clip exist in only the frames you want
it to.

When you take a clip from the library and place it on the stage, you're
actually creating a reference to the clip (an "instance") You can bring
many "copies" of the same clip onstage, and give each instance its own
unique name, so that you can refer to each one specifically. This allows
you to start/stop a clip and so forth, independently of the others. Clips
can contain clips, which can in turn contain clips.

DEPTH, as used in the movieClip.swapDepths() method, is a stacking order of
movie clips; it can be thought of as the z-axis (front-to-back) position of
a clip. It is similar to when you are placing symbols onstage on a single
layer - some things are "in front" of other things. The higher the number,
the "closer" the clip is to the viewer. Think of it as an programmable way
of doing Modify>Arrange. DEPTH refers only to the local timeline; you cannot
use swapDepths across levels.

Note that while depth, appearance-wise, is similar to a timeline's layers,
or levels of independent timelines, depth is not the same thing as either
layer or level. In referring to clips you still need to refer to them by
their instance name.

This is where some confusion can result, simply because you begin to run out
of English words to describe certain concepts. You will sometimes hear
Flash developers refer to "depth" in terms of a clip-nested within a clip,
as seen in the Movie Explorer tree structure. This is not the same as a
clip's "depth" visually, so be careful in talking about either that you're
clear about which sense of depth is being used.

Peace,
Adam Burtch
Macromedia Tech Support


--
/peo
www.bandage.dk
www.peo.dk




 
 
Søg
Reklame
Statistik
Spørgsmål : 177501
Tips : 31968
Nyheder : 719565
Indlæg : 6408522
Brugere : 218887

Månedens bedste
Årets bedste
Sidste års bedste