[swfmill] Not understanding the <frame> command (I think)
Joseph Donth
jdonth at donth.com
Thu Mar 1 07:17:59 EST 2007
My problem seems to be in the way I am "mtasc"ing and "swmill"ing the application. If you'll indulge me:
I am taking a PDF file and running it through swftools's pdf2swf program. This is creating a 12 frame SWF file from my test pdf.
I am then trying to use MTASC and SWFMILL to create a SWF file that I can control via the ocx to print each page (actually I want to be able to print the first page, ask the user if it printed correctly and if so, print the remainder of the document. (In my example, pages 2 thru 12).
The SWF file that is being created (after MTASC and SWFMILL) consists of ONE frame i.e. Flash.totalFrames = 1 (where as if I use the original file from the pdf2swf program I get the actual 12 frames.
I'm guessing I don't understand what I'm doing (which I don't) to build this application correctly.
Why did I go from a 12 frame SWF to a single frame SWF?
I hope this explains my problem and I also hope that someone has the time to give a newbee a hand.
Thanks,
Joe
My three files are as follows:
application.xml
<?xml version="1.0" encoding="iso-8859-1"?>
<movie version="8" width="240" height="170" framerate="30">
<background color="#ffffff"/>
<clip import="build/classes.swf" />
<frame>
<library>
<clip id="Application" class="Application" />
<clip id="Project" class="Project" import="src/library/test.swf" />
</library>
<place id="Application" name="app" x="0" y="0" depth="1000" />
</frame>
</movie>
application.as
class Application extends MovieClip {
function onLoad (){
attachMovie ("Project", "project", 1000);
}
}
project.as
import flash.external.ExternalInterface;
class Project extends MovieClip {
var dateField:TextField;
function Project(){
createTextField("dateField",1,0,0,100,25);
dateField.text = "";
if(ExternalInterface.available){
ExternalInterface.addCallback("setDate", this, callMe);
ExternalInterface.addCallback("doPrint", this, DoPrint);
}
}
function setDate(value) {
dateField.text = value;
}
function onLoad(){
ExternalInterface.call("Ready");
}
function DoPrint(){
print(Project,"bframe");
}
}
build command batch file ( Note: %1 = c:\devel\flash\test\project.as )
@echo off
rem Set "loc" to the Path of the file (i.e. c:\devel\flash\test\)
set loc=%~p1
rem Set "name" to the Name of the file (i.e. project.as)
set name=%~n1%~x1
rem define the location(s) of the MTASC library directories
set base=c:\devel\flash\std
set base8=c:\devel\flash\std8
mtasc -version 8 -swf classes.swf -header 1:1:30 -cp %loc% -cp %base% -cp %base8% Application.as %1
swfmill simple %loc%application.xml %loc%final.swf
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://osflash.org/pipermail/swfmill_osflash.org/attachments/20070301/e0ec12ef/attachment.htm
More information about the swfmill
mailing list