| java.lang.Object org.openlaszlo.iv.flash.api.FlashFile
All known Subclasses: org.openlaszlo.compiler.SWFFile,
FlashFile | public class FlashFile (Code) | | Class represents a Flash file (either .swt or .swf)
author: Dmitry Skavish |
Method Summary | |
public void | addDef(FlashDef def) | public void | addDefInAssets(String name, FlashDef def) | public void | addDefToLibrary(String name, FlashDef def) | public synchronized FlashFile | addExternalFile(String fileName, boolean cache) | public void | addExternalFile(String filename, FlashFile file) | public synchronized Object | addExternalMedia(IVUrl url, boolean cache) | public synchronized Object | addExternalMedia(String fileName, boolean cache) | public void | addExternalMedia(String filename, Object object) | public synchronized FlashFile | copyFile() | public Enumeration | definitions() | public FlashOutput | generate() | public FlashOutput | generate(FontsCollector fc, FontsCollector pfc, boolean hasPreloader) | public FlashDef | getDef(int id) | public FlashDef | getDefFromLibrary(String name) | public FlashDef | getDefInAssets(String name) | public synchronized FlashFile | getDefaultSymbolFile() | public String | getEncoding() | public FlashFile | getExternalFile(String filename) | public Object | getExternalMedia(String filename) | public String | getFileDir() | public String | getFileName() | public int | getFileSize() | public Font | getFont(String name) | public int | getFrameRate() | public Rectangle2D | getFrameSize() | public String | getFullName() | public IVVector | getLocalFonts() | public Script | getMainScript() | public Script | getScript(String name) | public Script | getScriptInAssets(String name) | public int | getVersion() | public boolean | isCompressed() | public boolean | isFullParsing() | public boolean | isTemplate() | public static FlashFile | newFlashFile() | public static FlashFile | parse(String fileName, InputStream is) | public static FlashFile | parse(String fileName, InputStream is, boolean isFullParsing, String encoding) | public static FlashFile | parse(String fileName, FlashBuffer fb) | public static FlashFile | parse(String fileName, FlashBuffer fb, boolean isFullParsing, String encoding) | public static FlashFile | parse(String fileName) | public static FlashFile | parse(String fileName, boolean isFullParsing, String encoding) | public void | printContent(PrintStream out) | public FlashFile | processFile(Context context) | public FlashObject | processObject(FlashObject fobj, Context context) | public Script | processScript(Script script, Context context) | public void | setCompressed(boolean isCompressed) | public void | setEncoding(String encoding) | public void | setFileDir(String fileDir) | public void | setFileName(String fileName) | public void | setFileSize(int size) | public void | setFrameRate(int fr) | public void | setFrameSize(Rectangle2D r) | public void | setFullParsing(boolean fullParsing) | public void | setMainScript(Script main) | public void | setTemplate(boolean isTemplate) | public void | setVersion(int version) |
FlashFile | public FlashFile()(Code) | | |
addDef | public void addDef(FlashDef def)(Code) | | Adds definition by ID
Parameters: def - definition to be added |
addDefInAssets | public void addDefInAssets(String name, FlashDef def)(Code) | | Adds specified FlashDef into export table
Parameters: name - linkage name Parameters: def - specified definition |
addDefToLibrary | public void addDefToLibrary(String name, FlashDef def)(Code) | | Adds definition by name
Parameters: name - name of the definition Parameters: def - definition |
addExternalFile | public synchronized FlashFile addExternalFile(String fileName, boolean cache) throws IVException(Code) | | Reads, parses, and adds external file to this file (if it is not here yet)
Parameters: fileName - name of the file to be added Parameters: cache - if true then cache the file in the MediaCache added flash file exception: IVException - |
addExternalFile | public void addExternalFile(String filename, FlashFile file)(Code) | | Adds external file to this file (if it is not here yet)
Parameters: filename - name of the file to be added Parameters: file - flash file to be added |
addExternalMedia | public synchronized Object addExternalMedia(IVUrl url, boolean cache) throws IVException, IOException(Code) | | Reads an external media and adds it to this file (if it is not here yet) and to media cache
Parameters: fileName - name of the file to be added Parameters: cache - if true then cache the file in the MediaCache FlashFile or Bitmap exception: IVException - |
addExternalMedia | public synchronized Object addExternalMedia(String fileName, boolean cache) throws IVException, IOException(Code) | | Reads an external media and adds it to this file (if it is not here yet) and to media cache
Parameters: fileName - name of the file to be added Parameters: cache - if true then cache the file in the MediaCache FlashFile or Bitmap exception: IVException - |
addExternalMedia | public void addExternalMedia(String filename, Object object)(Code) | | Adds external media to this file (if it is not here yet)
Parameters: filename - name of the file to be added Parameters: object - media to be added |
copyFile | public synchronized FlashFile copyFile()(Code) | | Creates a copy of this flash file
copy of this flash file |
definitions | public Enumeration definitions()(Code) | | Returns Enumeration of all definitions (FlashDef) defined within this file
Enumeration of FlashDef |
getDef | public FlashDef getDef(int id)(Code) | | Returns definition by ID
Parameters: id - definition ID definition or null |
getDefFromLibrary | public FlashDef getDefFromLibrary(String name)(Code) | | Finds definition by name in this file and all its external files (if any)
Parameters: name - name of the definition found definition or null |
getDefInAssets | public FlashDef getDefInAssets(String name)(Code) | | Returns FlashDef from export table by its linkage name
Parameters: name - linkage name of asset found asset or null |
getDefaultSymbolFile | public synchronized FlashFile getDefaultSymbolFile()(Code) | | Returns default symbol file
default symbol file |
getExternalFile | public FlashFile getExternalFile(String filename)(Code) | | Finds external file by file name
Parameters: filename - name of the file to be searched found file or null |
getExternalMedia | public Object getExternalMedia(String filename)(Code) | | Finds external media by its file name
Parameters: filename - name of the file to be searched found media or null |
getFileSize | public int getFileSize()(Code) | | |
getFont | public Font getFont(String name)(Code) | | Searches font by its name in this file and all its external files
Parameters: name - font name font or null |
getFrameRate | public int getFrameRate()(Code) | | Return framerate of the file
getFrameRate()>>8 = number of frames per second
framerate of the file |
getFullName | public String getFullName()(Code) | | Returns absolute file name
absolute file name |
getLocalFonts | public IVVector getLocalFonts()(Code) | | Returns all fonts defined within this file (fonts from external files are not included)
vector of FontDef objects |
getScript | public Script getScript(String name)(Code) | | Finds script by name defined within this file or any external files
Parameters: name - script name found script or null |
getScriptInAssets | public Script getScriptInAssets(String name)(Code) | | Finds script by name defined as an ExportAsset within this file or any external files
Parameters: name - script name found script or null |
getVersion | public int getVersion()(Code) | | |
isCompressed | public boolean isCompressed()(Code) | | |
isFullParsing | public boolean isFullParsing()(Code) | | |
isTemplate | public boolean isTemplate()(Code) | | Returns true if the file is Flash template, otherwise returns false
The criteria is not the file extention (.swt), but MM Generator special 'template' tag
|
newFlashFile | public static FlashFile newFlashFile()(Code) | | Creates empty flash file with default settings
default flash file |
parse | public static FlashFile parse(String fileName, InputStream is) throws IVException(Code) | | Parses Flash file from input stream
Parameters: fileName - file name, used only for establishing the file's current directory Parameters: is - input stream used to read the file's content created flash file exception: IVException - |
parse | public static FlashFile parse(String fileName, FlashBuffer fb) throws IVException(Code) | | Parses Flash file from buffer
Parameters: fileName - file name, used only for establishing the file's current directory Parameters: fb - flash buffer to read the file from created flash file exception: IVException - |
processScript | public Script processScript(Script script, Context context) throws IVException(Code) | | Processes the specified script in the specified context
Parameters: script - specified script Parameters: context - specified context processed script exception: IVException - |
setCompressed | public void setCompressed(boolean isCompressed)(Code) | | |
setFileSize | public void setFileSize(int size)(Code) | | |
setFrameRate | public void setFrameRate(int fr)(Code) | | |
setFullParsing | public void setFullParsing(boolean fullParsing)(Code) | | |
setTemplate | public void setTemplate(boolean isTemplate)(Code) | | |
setVersion | public void setVersion(int version)(Code) | | |
|
|