C# Class SWFProcessing.SWFModeller.SWF

Top-level object for a SWF movie.
Inheritance: SWFProcessing.SWFModeller.Modelling.Timeline
Afficher le fichier Open project: WeeWorld/Swiffotron Class Usage Examples

Méthodes publiques

Méthode Description
AddCharacter ( string id, ICharacter c ) : void

Adds a character, e.g. a shape or an image to the SWF dictionary.

AddScript ( DoABC abc ) : void

Adds a script.

ClassByName ( string name ) : AS3ClassDef

Find a class by name.

ClipFromClass ( AS3ClassDef clazz ) : Timeline

Finds the movieclip that has been bound to a class.

GenerateTimelineScripts ( ) : void

Generates the timeline scripts.

GetCharacter ( string id ) : ICharacter

Gets a character from the internal dictionary.

IDFor ( ICharacter c ) : string

This is brutal and slow, but it's only in debug builds for unit test output, so we just don't care.

LookupInstance ( string qname ) : PlaceObject

Finds a placed character on the stage by its instance name.

MarkCodeAsTampered ( ) : void

Marks all code as tampered which will force dissassembly and re-assembly. Useful in testing.

MergeScript ( DoABC abc ) : void

This takes an existing script and merges it into our script by merging constants and classes together in a terrifying clash of opcodes. Where we have multiple scripts, we will merge into the first one, because we need to pick one and have no way to decide what would be best.

NewEditText ( string id ) : EditText

Creates a new EditText field in the SWF.

NewSprite ( string id, uint frameCount, bool exportForScript ) : Sprite

Create a new sprite and add it to the SWF.

NewStaticText ( string id ) : StaticText

Creates a new StaticText field in the SWF.

SWF ( SWFContext ctx, bool generateScripts ) : System.Collections.Generic

Initializes a new instance of a SWF with the same defaults as the Flash IDE.

ScriptProc ( ScriptProcessor sd ) : void

Runs a delegate function on each script in the SWF.

TextReplaceInCode ( string find, string replace ) : void

Does a search and replace on strings used in the actionscript code.

ToString ( ) : string

Private Methods

Méthode Description
AddFont ( SWFFont font ) : void

Adds a font to the SWF.

ClassProc ( ClassProcessor cp ) : void

Runs a delegate function on every class in the SWF.

MapClassnameToClip ( string className, Timeline tl ) : void

Maps the classname to a clip.

MethodProc ( AbcCode mp ) : void

Runs a delegate function over every method in the SWF.

RenameMainTimelineClass ( string classQName ) : void

Renames the main timeline class.

ToStringModelView ( int nest, StringBuilder sb ) : void

Method Details

AddCharacter() public méthode

Adds a character, e.g. a shape or an image to the SWF dictionary.
public AddCharacter ( string id, ICharacter c ) : void
id string A name to refer to this character in the dictionary.
c ICharacter The character to add.
Résultat void

AddScript() public méthode

Adds a script.
public AddScript ( DoABC abc ) : void
abc SWFProcessing.SWFModeller.ABC.DoABC The abc code.
Résultat void

ClassByName() public méthode

Find a class by name.
public ClassByName ( string name ) : AS3ClassDef
name string The class name.
Résultat AS3ClassDef

ClipFromClass() public méthode

Finds the movieclip that has been bound to a class.
public ClipFromClass ( AS3ClassDef clazz ) : Timeline
clazz AS3ClassDef The class to look up
Résultat SWFProcessing.SWFModeller.Modelling.Timeline

GenerateTimelineScripts() public méthode

Generates the timeline scripts.
public GenerateTimelineScripts ( ) : void
Résultat void

GetCharacter() public méthode

Gets a character from the internal dictionary.
public GetCharacter ( string id ) : ICharacter
id string The id of the character to fetch.
Résultat ICharacter

IDFor() public méthode

This is brutal and slow, but it's only in debug builds for unit test output, so we just don't care.
public IDFor ( ICharacter c ) : string
c ICharacter
Résultat string

LookupInstance() public méthode

Finds a placed character on the stage by its instance name.
public LookupInstance ( string qname ) : PlaceObject
qname string The qualified name, which is a dotted path through /// nested instances to the instance you want, starting from the root /// timeline.
Résultat PlaceObject

MarkCodeAsTampered() public méthode

Marks all code as tampered which will force dissassembly and re-assembly. Useful in testing.
public MarkCodeAsTampered ( ) : void
Résultat void

MergeScript() public méthode

This takes an existing script and merges it into our script by merging constants and classes together in a terrifying clash of opcodes. Where we have multiple scripts, we will merge into the first one, because we need to pick one and have no way to decide what would be best.
public MergeScript ( DoABC abc ) : void
abc SWFProcessing.SWFModeller.ABC.DoABC The script to merge into our one.
Résultat void

NewEditText() public méthode

Creates a new EditText field in the SWF.
public NewEditText ( string id ) : EditText
id string The id (library name).
Résultat EditText

NewSprite() public méthode

Create a new sprite and add it to the SWF.
public NewSprite ( string id, uint frameCount, bool exportForScript ) : Sprite
id string A unique ID as supplied by valid SWF data
frameCount uint The number of frames on the sprite's /// timeline.
exportForScript bool If a sprite is exported for script, it will /// appear at the start of the SWF file.
Résultat SWFProcessing.SWFModeller.Characters.Sprite

NewStaticText() public méthode

Creates a new StaticText field in the SWF.
public NewStaticText ( string id ) : StaticText
id string The id (library name).
Résultat StaticText

SWF() public méthode

Initializes a new instance of a SWF with the same defaults as the Flash IDE.
public SWF ( SWFContext ctx, bool generateScripts ) : System.Collections.Generic
ctx SWFContext An optional object intended solely to give error messages /// some context.
generateScripts bool True if you want to generate the default /// timeline scripts.
Résultat System.Collections.Generic

ScriptProc() public méthode

Runs a delegate function on each script in the SWF.
public ScriptProc ( ScriptProcessor sd ) : void
sd ScriptProcessor The delegate to run.
Résultat void

TextReplaceInCode() public méthode

Does a search and replace on strings used in the actionscript code.
public TextReplaceInCode ( string find, string replace ) : void
find string The text to find.
replace string The new text to replace it with.
Résultat void

ToString() public méthode

public ToString ( ) : string
Résultat string