|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.flagstone.transform.Import2
public final class Import2
Import2 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.
Import2 was added in Flash 8. It currently has the same functionality as Import.
Export
,
Import
Constructor Summary | |
---|---|
Import2()
Creates a Import2 object with an empty table. |
|
Import2(Import2 object)
Creates and initialises an Import2 object using the values copied from another Import2 object. |
|
Import2(String aUrl,
Map<Integer,String> map)
Creates an Import2 object that imports an object from the specified file. |
|
Import2(SWFDecoder coder)
Creates and initialises an Import2 object using values encoded in the Flash binary format. |
Method Summary | |
---|---|
Import2 |
add(int uid,
String aString)
Adds the identifier and name to the list of objects to be imported. |
Import2 |
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 Import2(SWFDecoder coder) throws IOException
coder
- an SWFDecoder object that contains the encoded Flash data.
IOException
- if an error occurs while decoding the data.public Import2()
public Import2(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 Import2(Import2 object)
object
- an Import2 object from which the values will be
copied.Method Detail |
---|
public Import2 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 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 Map<Integer,String> getObjects()
public void setObjects(Map<Integer,String> aTable)
aTable
- the table of objects being imported. Must not be null.public Import2 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 |