Kinesis SoftwareKineticFusion

[Show Table of Contents]

3 Quick Start Guide

[Hide Table of Contents]



3.2 Creating an SWF Movie

The first step to creating an SWF movie is to create an RVML document. For many projects, there is a considerable number of existing resource and symbol assets to be included in the SWF. The simplest way to migrate such a project to KineticFusion is to decompile an output SWF to RVML and use this as the main project document. This file will only need to be recreated whenever the movie is changed within the Flash IDE.

3.2.1 Creating RVML Document by Decompiling

KineticFusion will decompile any SWF to RVML, extracting the resources and ActionScript classes and storing these externally unless configured otherwise. There are two classpath properties kinesis.actionscript.systemClassPath and kinesis.actionscript.userClassPath. By default all classes that are on any of the configured class paths of KineticFusion are discarded, though this behavior is specified by two additional properties: kinesis.actionscript.storeDuplicateSystemClasses and kinesis.actionscript.storeDuplicateUserClasses. In general there is no need to decompile classes that exist on local classpaths as the local classes will have more information than decompiled classes unless you are interested in viewing the classes that are stored inside the SWF. All other classes will be stored in a local repository folder and a class path setting added to the output RVML file.

All configuration properties are stored in the installation config/KineticFusion.properties file. You can find information on how to set configuration properties in the general configuration information.

3.2.2 Creating New RVML Documents

If your SWF is purely ActionScript -based, another approach is simply to embed the timeline scripts in a new RVML document. The simplest RVML document for this purpose is:

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<Movie version='7' width='550' height='400' rate='12' backgroundColor='white' 
       compressed='No' xmlns='http://www.kineticfusion.org/RVML/3.0'>
    <Definitions />
    <Timeline>
        <Frame>
            <FrameActions><![CDATA[
                       // Place your ActionScript 2.0 scripts here
]]></FrameActions>
        </Frame>
    </Timeline>
</Movie>

In addition you could consider adding the default ActionScriptSettings element:

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<Movie version='7' width='550' height='400' rate='12' backgroundColor='white' 
            compressed='No' xmlns='http://www.kineticfusion.org/RVML/3.0'>
    <ActionScriptSettings>
        <ASProperty name='logCachedClasses' value='No' />
        <ASProperty name='logLoadedClasses' value='No' />
        <ASProperty name='logParsedClasses' value='No' />
        <ASProperty name='enableWarningMessages' value='Yes' />
        <ASProperty name='optimizeFunctions' value='Yes' />
        <ASProperty name='setterReturnsValue' value='No' />
        <ASProperty name='useCachedClasses' value='Yes' />
        <ASProperty name='analyzeScriptsAsAS2' value='Yes' />
    </ActionScriptSettings>
    <Definitions />
    <Timeline frameCount='1'>
        <Frame frameNo='1'>
            <FrameActions><![CDATA[
                     // Place your ActionScript 2.0 scripts here
]]></FrameActions>
        </Frame>
    </Timeline>
</Movie>

3.2.3 Building the SWF

Both of these options will allow you to generate an SWF from your classes, while leaving you free to rebuild your SWF from the FLA at any time. KineticFusion can now compile the RVML document to SWF, always using the latest ActionScript classes and resources, providing comprehensive output information on ActionScript errors and warnings. For more information on decompiling and compiling refer to the Running KineticFusion section, and the GUI section.

3.2.3.1 Exclude classes

You can exclude individual classes or entire class packages from output to SWF using the RVML <ExcludeClass> element. To exclude a single class you can use:

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<Movie version='7' width='550' height='400' rate='12' backgroundColor='white' 
            compressed='No' xmlns='http://www.kineticfusion.org/RVML/3.0'>
    <ActionScriptSettings>
        <ExcludeClass name='com.kinesis.MyClass' />
    </ActionScriptSettings>
    <Definitions />
    <Timeline frameCount='1'>
        <Frame frameNo='1'>
            <FrameActions><![CDATA[
// Place your ActionScript 2.0 scripts here
]]></FrameActions>
        </Frame>
    </Timeline>
</Movie>

To exclude an entire package use:

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<Movie version='7' width='550' height='400' rate='12' backgroundColor='white' 
            compressed='No' xmlns='http://www.kineticfusion.org/RVML/3.0'>
    <ActionScriptSettings>
        <ExcludeClass name='com.kinesis.*' />
    </ActionScriptSettings>
    <Definitions />
    <Timeline frameCount='1'>
        <Frame frameNo='1'>
            <FrameActions><![CDATA[
// Place your ActionScript 2.0 scripts here
]]></FrameActions>
        </Frame>
    </Timeline>
</Movie>

3.2.3.2 Include Classes

It is possible to include classes in an output SWF that are not directly referenced from within your ActionScript. This can be specified using the <IncludeClass> RVML element, as well as the location in which to output the class:

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<Movie version='7' width='550' height='400' rate='12' backgroundColor='white' 
            compressed='No' xmlns='http://www.kineticfusion.org/RVML/3.0'>
    <ActionScriptSettings>
        <IncludeClass name='com.kinesis.MyClass' outputBeforeClass="com.kinesis.DependentClass" />
    </ActionScriptSettings>
    <Definitions />
    <Timeline frameCount='1'>
        <Frame frameNo='1'>
            <FrameActions><![CDATA[
// Place your ActionScript 2.0 scripts here
]]></FrameActions>
        </Frame>
    </Timeline>
</Movie>

3.2.3.3 Class Reporting

KineticFusion can provide detailed information on the processing and output of AS2.0 classes. There are three logging options available and these can be used to check what classes are output to an SWF movie and ensure all mandatory classes are included. See the information on logging for more information.