JSwiff
flash movies the java way
JSwiff Forum
  Search   Recent Topics     Member Listing    Back to home page 
Register / 
Login 
Read SWF File and Write Modify File  
Forum Index -> How Do I...
Author Message
Anonymous



I don't know how to use the SWFReader class for generate de SWFDocument. Can i help me, please?

An example of my test code:
SWFReader swfRead = new SWFReader(getFile(sUrl));
swfRead.read();
SWFDocumentReader swfDocRead = null;
swfRead.addListener(swfDocRead);
SWFDocument swfDocu = swfDocRead.getDocument();

public static InputStream getFile(String sFile){
try{
URL uFile = new URL(sFile);
String fileName = uFile.getFile();
InputStream is = uFile.openStream();
return is;
}
catch (Exception e){
System.out.println("Error: "+e.getMessage());
return null;
}

Ralf



Joined: Jul 20, 2005
Messages: 127
Location: Germany
Offline

Your code:
Code:
 1 SWFReader swfRead = new SWFReader(getFile(sUrl));
 2 swfRead.read();
 3 SWFDocumentReader swfDocRead = null;
 4 swfRead.addListener(swfDocRead);
 5 SWFDocument swfDocu = swfDocRead.getDocument(); 
 

In line 3, you must instantiate swfDocRead. You cannot pass null to addListener(...).
Code:
 SWFDocumentReader swfDocRead = new SWFDocumentReader();
 
Anonymous



Wuau!, its really fast. Thanks a lot. One question, i'm trying to do a specific aplication, but i'm very busy. You can do freelance tasks, for a very little project with your apis? If you want, you can send me a email to jaume.ferres@opendance.es


Thanks another time.
Ralf



Joined: Jul 20, 2005
Messages: 127
Location: Germany
Offline

I'd be happy to help - please check your mail.
Ralf
 
  Forum Index -> How Do I...
Go to:   
Legal notes
Powered by JForum 2.1.4 © 2005 - Rafael Steil