|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.flagstone.transform.Import
public final class Import
Import is used to import shapes and other objects from another Flash file referenced by a URL.
To provide a degree of security the Flash Player will only import files that originate from the same domain as the file that it is currently playing. For example if the Flash file being shown was loaded from www.mydomain.com/flash.swf then the file contains the exported objects must reside somewhere at www.mydomain.com. This prevents a malicious Flash file from loading files from an unknown third party.
Since the identifier for an object is only unique within a given Flash file, imported objects are referenced by a name assigned when the object is exported.
Export
Constructor Summary | |
---|---|
Import()
Creates an Import object with an empty table. |
|
Import(Import object)
Creates and initialises an Import object using the values copied from another Import object. |
|
Import(String aUrl,
Map<Integer,String> map)
Creates a Import object that imports an object from the specified file. |
|
Import(SWFDecoder coder)
Creates and initialises an Import object using values encoded in the Flash binary format. |
Method Summary | |
---|---|
Import |
add(int uid,
String aString)
Adds the identifier and name to the list of objects to be imported. |
Import |
copy()
Creates a complete copy of this object. |
void |
encode(SWFEncoder coder,
Context context)
Encode an object to the Flash binary format. |
Map<Integer,String> |
getObjects()
Get the table of objects to be imported. |
String |
getUrl()
Get the URL of the file containing the object to be imported. |
int |
prepareToEncode(Context context)
Prepare an object for encoding, returning the expected size of an object when it is encoded. |
void |
setObjects(Map<Integer,String> aTable)
Sets the table of objects to be imported. |
void |
setUrl(String aString)
Sets the URL of the file containing the imported objects. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Import(SWFDecoder coder) throws IOException
coder
- an SWFDecoder object that contains the encoded Flash data.
IOException
- if an error occurs while decoding the data.public Import()
public Import(String aUrl, Map<Integer,String> map)
aUrl
- the URL referencing the file to be imported.map
- the table to add the identifier-name pairs of the objects that
will be imported.public Import(Import object)
object
- an Import object from which the values will be
copied.Method Detail |
---|
public Import add(int uid, String aString)
uid
- the identifier of the object to be imported. Must be in the
range 1..65535.aString
- the name of the imported object to allow it to be referenced.
Must not be null or an empty string.
public String getUrl()
public Map<Integer,String> getObjects()
public void setUrl(String aString)
aString
- a URL relative to the URL of the file containing the Import
object. Must not be null or an empty string.public void setObjects(Map<Integer,String> aTable)
aTable
- the table of objects being imported. Must not be null.public Import copy()
copy
in interface Copyable<MovieTag>
public String toString()
toString
in class Object
public int prepareToEncode(Context context)
prepareToEncode
in interface SWFEncodeable
context
- an Context that allows information to be passed between
objects to control how they are initialised for encoding.
public void encode(SWFEncoder coder, Context context) throws IOException
encode
in interface SWFEncodeable
coder
- an SWFEncoder object.context
- an Context that allows information to be passed between
objects to control how they are initialised for encoding.
IOException
- if an error occurs while encoding the object.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |