C# Класс SWFProcessing.SWFModeller.SWF

Top-level object for a SWF movie.
Наследование: SWFProcessing.SWFModeller.Modelling.Timeline
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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

Приватные методы

Метод Описание
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

Описание методов

AddCharacter() публичный Метод

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.
Результат void

AddScript() публичный Метод

Adds a script.
public AddScript ( DoABC abc ) : void
abc SWFProcessing.SWFModeller.ABC.DoABC The abc code.
Результат void

ClassByName() публичный Метод

Find a class by name.
public ClassByName ( string name ) : AS3ClassDef
name string The class name.
Результат AS3ClassDef

ClipFromClass() публичный Метод

Finds the movieclip that has been bound to a class.
public ClipFromClass ( AS3ClassDef clazz ) : Timeline
clazz AS3ClassDef The class to look up
Результат SWFProcessing.SWFModeller.Modelling.Timeline

GenerateTimelineScripts() публичный Метод

Generates the timeline scripts.
public GenerateTimelineScripts ( ) : void
Результат void

GetCharacter() публичный Метод

Gets a character from the internal dictionary.
public GetCharacter ( string id ) : ICharacter
id string The id of the character to fetch.
Результат ICharacter

IDFor() публичный Метод

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
Результат string

LookupInstance() публичный Метод

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.
Результат PlaceObject

MarkCodeAsTampered() публичный Метод

Marks all code as tampered which will force dissassembly and re-assembly. Useful in testing.
public MarkCodeAsTampered ( ) : void
Результат void

MergeScript() публичный Метод

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.
Результат void

NewEditText() публичный Метод

Creates a new EditText field in the SWF.
public NewEditText ( string id ) : EditText
id string The id (library name).
Результат EditText

NewSprite() публичный Метод

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.
Результат SWFProcessing.SWFModeller.Characters.Sprite

NewStaticText() публичный Метод

Creates a new StaticText field in the SWF.
public NewStaticText ( string id ) : StaticText
id string The id (library name).
Результат StaticText

SWF() публичный Метод

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.
Результат System.Collections.Generic

ScriptProc() публичный Метод

Runs a delegate function on each script in the SWF.
public ScriptProc ( ScriptProcessor sd ) : void
sd ScriptProcessor The delegate to run.
Результат void

TextReplaceInCode() публичный Метод

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.
Результат void

ToString() публичный Метод

public ToString ( ) : string
Результат string