public class SWFFrame extends Object implements ITagContainer
SWFFrame
provides API to access their data. Other tags are grouped by
types and are stored in lists.
SWFFrame
is a ITagContainer
. The enclosed tags are not stored
in a one-dimensional array, however, they can be iterated in a deterministic
order.
Modifier and Type | Field and Description |
---|---|
protected ExportAssetsTag |
exportAssetsTag |
protected FrameLabelTag |
frameLabel |
protected SymbolClassTag |
symbolClass |
Constructor and Description |
---|
SWFFrame()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addTag(ITag tag)
Add a SWF tag to the frame.
|
void |
defineExport(ICharacterTag tag,
String name)
Export an
ICharacterTag with name . |
void |
defineSymbol(ICharacterTag tag,
String name)
Export an
ICharacterTag with name . |
void |
defineSymbol(ICharacterTag tag,
String name,
Map<Integer,ICharacterTag> dictionary)
Export an
ICharacterTag with name . |
static void |
forceSymbolClassTag(SWFFrame frame)
Force creating a SymbolClass tag on the frame.
|
String |
getName()
Get frame name.
|
Collection<ICompilerProblem> |
getProblems() |
String |
getSymbolName(ICharacterTag tag)
Get the symbol name of a class.
|
boolean |
hasNamedAnchor()
Check if this frame has a named anchor tag.
|
Iterator<ITag> |
iterator()
Get an iterator of all the tags in the frame.
|
void |
setName(String name,
boolean isAnchor)
Assign a name to this frame.
|
protected SymbolClassTag symbolClass
protected ExportAssetsTag exportAssetsTag
protected FrameLabelTag frameLabel
public void addTag(ITag tag)
tag
- tagpublic void defineSymbol(ICharacterTag tag, String name)
ICharacterTag
with name
. The character tag has
to be added to the frame before it is defined as a symbol.tag
- character tagname
- export namepublic void defineSymbol(ICharacterTag tag, String name, Map<Integer,ICharacterTag> dictionary)
ICharacterTag
with name
. The character tag has
to be added to the frame before it is defined as a symbol.tag
- character tagname
- export namedictionary
- Used when reading an existing SWF. If null, only the
character tags in the current frame will be checked.public String getSymbolName(ICharacterTag tag)
tag
- A character tag.public void defineExport(ICharacterTag tag, String name)
ICharacterTag
with name
. The character tag has
to be added to the frame before it is defined as an export asset.tag
- character tagname
- export namepublic Iterator<ITag> iterator()
public void setName(String name, boolean isAnchor)
name
- frame nameisAnchor
- true if the frame name is a named anchor tagpublic String getName()
public boolean hasNamedAnchor()
In SWF files of version 6 or later, an extension to the FrameLabel tag
called named anchors is available. A named anchor is a special kind of
frame label that, in addition to labeling a frame for seeking using
ActionGoToLabel
, labels the frame for seeking using HTML anchor
syntax.
public static final void forceSymbolClassTag(SWFFrame frame)
frame
- SWF framepublic Collection<ICompilerProblem> getProblems()
getProblems
in interface ITagContainer
Copyright © 2016 The Apache Software Foundation. All rights reserved.