com.flagstone.transform.coder
Interface SWFEncodeable

All Known Subinterfaces:
Action, DefineTag, FillStyle, Filter, ImageTag, LineStyle, MovieTag, ShapeRecord, ShapeTag, StaticTextTag
All Known Implementing Classes:
ActionData, ActionObject, AlignmentZone, Background, BasicAction, BevelFilter, BitmapFill, BlurFilter, Bounds, ButtonColorTransform, ButtonShape, ButtonSound, Call, Color, ColorMatrixFilter, ColorTransform, ConvolutionFilter, CoordTransform, Curve, DefineButton, DefineButton2, DefineData, DefineFont, DefineFont2, DefineFont3, DefineFont4, DefineImage, DefineImage2, DefineJPEGImage, DefineJPEGImage2, DefineJPEGImage3, DefineJPEGImage4, DefineMorphShape, DefineMorphShape2, DefineMovieClip, DefineShape, DefineShape2, DefineShape3, DefineShape4, DefineSound, DefineText, DefineText2, DefineTextField, DefineVideo, DoABC, DoAction, DropShadowFilter, EnableDebugger, EnableDebugger2, Envelope, Envelope.Level, EventHandler, ExceptionHandler, Export, FocalGradientFill, FontAlignment, FontInfo, FontInfo2, FontName, FrameLabel, Free, GetUrl, GetUrl2, GlowFilter, GlyphAlignment, GlyphIndex, GotoFrame, GotoFrame2, GotoLabel, Gradient, GradientBevelFilter, GradientFill, GradientGlowFilter, If, Import, Import2, InitializeMovieClip, JPEGEncodingTable, Jump, Kerning, LimitScript, Line, LineStyle1, LineStyle2, MorphBitmapFill, MorphFocalGradientFill, MorphGradient, MorphGradientFill, MorphLineStyle, MorphLineStyle2, MorphSolidFill, MovieAttributes, MovieData, MovieHeader, MovieMetaData, MovieObject, NewFunction, NewFunction2, PathsArePostscript, Place, Place2, Place3, Protect, Push, QuicktimeMovie, RegisterCopy, Remove, Remove2, ScalingGrid, ScenesAndLabels, SerialNumber, SetTarget, Shape, ShapeData, ShapeStyle, ShapeStyle2, ShowFrame, SolidFill, SoundInfo, SoundStreamBlock, SoundStreamHead, SoundStreamHead2, StartSound, StartSound2, SymbolClass, Table, TabOrder, TextSettings, TextSpan, VideoFrame, WaitForFrame, WaitForFrame2, With

public interface SWFEncodeable

The Encodeable interface defines the set of methods that all classes must implement so they can be encoded to a Flash (SWF) file.


Method Summary
 void encode(SWFEncoder coder, Context context)
          Encode an object to the Flash binary format.
 int prepareToEncode(Context context)
          Prepare an object for encoding, returning the expected size of an object when it is encoded.
 

Method Detail

prepareToEncode

int prepareToEncode(Context context)
Prepare an object for encoding, returning the expected size of an object when it is encoded. This method also used to initialise variables, such as offsets and flags that will be used when the object is encoded. Generally the method returns the size in bytes, however when called on objects that use bit fields such as shapes the methods will return the size in bits.

Parameters:
context - an Context that allows information to be passed between objects to control how they are initialised for encoding.
Returns:
the size of the object when it is encoded.

encode

void encode(SWFEncoder coder,
            Context context)
            throws IOException
Encode an object to the Flash binary format.

Parameters:
coder - an SWFEncoder object.
context - an Context that allows information to be passed between objects to control how they are initialised for encoding.
Throws:
IOException - if an error occurs while encoding the object.


Copyright © 2002-2010 Flagstone Software Ltd.. All Rights Reserved.