📄 fsplaceobject2.java
字号:
@param anIdentifier the identifier of a new object to be displayed.
@param aLayer the layer number on which an object is being displayed.
@param aDepth the layer number up to which objects will be clipped by this object's outline.
@param xLocation the x-coordinate where the object will be displayed.
@param yLocation the y-coordinate where the object will be displayed.
*/
public FSPlaceObject2(int anIdentifier, int aLayer, int aDepth, int xLocation, int yLocation)
{
super(PlaceObject2);
setPlaceType(FSPlaceObject2.New);
setIdentifier(anIdentifier);
setLayer(aLayer);
setClippingDepth(aDepth);
setTransform(new FSCoordTransform(xLocation, yLocation));
}
/** Constructs an FSPlaceObject2 object that places a new, named movie clip on the display list at the coordinates on the screen.
@param anIdentifier the identifier of a new movie clip to be displayed.
@param aLayer the layer number on which the clip is being displayed.
@param anArray an array of FSClipEvent objects that define the events responded to by the movie clip.
@param aName a c-string that define a name for the movie clip.
@param xLocation the x-coordinate where the object will be displayed.
@param yLocation the y-coordinate where the object will be displayed.
*/
public FSPlaceObject2(int anIdentifier, int aLayer, ArrayList anArray, String aName, int xLocation, int yLocation)
{
super(PlaceObject2);
setPlaceType(FSPlaceObject2.New);
setIdentifier(anIdentifier);
setLayer(aLayer);
setClipEvents(anArray);
setName(aName);
setTransform(new FSCoordTransform(xLocation, yLocation));
}
/** Constructs an FSPlaceObject2 object that places a new, named movie clip
* on the display list at the coordinates on the screen. The array of bytes
* contains the encoded FSClipEvent objects which specify the events and
* actions that the movie clip will respond to. These are typically generated
* using the classes in the Translate framework.
*
* @param anIdentifier the identifier of a new movie clip to be displayed.
* @param aLayer the layer number on which the clip is being displayed.
* @param bytes an array of encoded clip event objects.
* @param aName a c-string that define a name for the movie clip.
* @param xLocation the x-coordinate where the object will be displayed.
* @param yLocation the y-coordinate where the object will be displayed.
*/
public FSPlaceObject2(int anIdentifier, int aLayer, byte[] bytes, String aName, int xLocation, int yLocation)
{
super(PlaceObject2);
setPlaceType(FSPlaceObject2.New);
setIdentifier(anIdentifier);
setLayer(aLayer);
setEncodedEvents(bytes);
setName(aName);
setTransform(new FSCoordTransform(xLocation, yLocation));
}
/** Constructs an FSPlaceObject2 object that replaces the object at the specified layer in the display list, aLayer with the object with the identifier, anIdentifier. The location and transforms currently applied to the object being replaced will be preserved.
@param anIdentifier the identifier of the object that will replaced the one current displayed on <i>aLayer</i>.
@param aLayer the layer number on which the object being replaced is displayed.
*/
public FSPlaceObject2(int anIdentifier, int aLayer)
{
super(PlaceObject2);
setPlaceType(FSPlaceObject2.Replace);
setIdentifier(anIdentifier);
setLayer(aLayer);
}
/** Constructs an FSPlaceObject2 object that changes the location of the object in the display list at layer, aLayer to the coordinates (x,y).
@param aLayer the layer number on which the object is being displayed.
@param xLocation the x-coordinate where the object will be displayed.
@param yLocation the y-coordinate where the object will be displayed.
*/
public FSPlaceObject2(int aLayer, int xLocation, int yLocation)
{
super(PlaceObject2);
setPlaceType(FSPlaceObject2.Modify);
setLayer(aLayer);
setTransform(new FSCoordTransform(xLocation, yLocation));
}
/** Constructs an FSPlaceObject2 object that applies the specified coordinate transform to the object in the display list at layer, aLayer.
@param aLayer the layer number on which the object is being displayed.
@param transform an FSCoordTransform object that will be applied to the object displayed in the display list at layer, aLayer.
*/
public FSPlaceObject2(int aLayer, FSCoordTransform transform)
{
super(PlaceObject2);
setPlaceType(FSPlaceObject2.Modify);
setLayer(aLayer);
setTransform(transform);
}
/** Constructs an FSPlaceObject2 object that applied the specified colour transform to the object in the display list at layer, aLayer.
@param aLayer the layer number on which the object is being displayed.
@param colorTransform an FSColorTransform object that will be applied to the object displayed in the display list at layer, aLayer.
*/
public FSPlaceObject2(int aLayer, FSColorTransform colorTransform)
{
super(PlaceObject2);
setPlaceType(FSPlaceObject2.Modify);
setLayer(aLayer);
setColorTransform(colorTransform);
}
/** Constructs an FSPlaceObject2 object that applies the specified coordinate and colour transforms to the object in the display list at layer, aLayer.
@param aLayer the layer number on which the object is being displayed.
@param transform an FSCoordTransform object that will be applied to the object displayed in the display list at layer, aLayer.
@param colorTransform an FSColorTransform object that will be applied to the object displayed in the display list at layer, aLayer.
*/
public FSPlaceObject2(int aLayer, FSCoordTransform transform, FSColorTransform colorTransform)
{
super(PlaceObject2);
setPlaceType(FSPlaceObject2.Modify);
setLayer(aLayer);
setTransform(transform);
setColorTransform(colorTransform);
}
/** Constructs an FSPlaceObject2 object that changes the location of the object in the display list at layer, aLayer to the coordinates (x,y).
@param aLayer the layer number on which the object is being displayed.
@param aRatio the ratio of the progress in morphing the shape.
@param xLocation the x-coordinate where the object will be displayed.
@param yLocation the y-coordinate where the object will be displayed.
*/
public FSPlaceObject2(int aLayer, float aRatio, int xLocation, int yLocation)
{
super(PlaceObject2);
setPlaceType(FSPlaceObject2.Modify);
setLayer(aLayer);
setRatio(aRatio);
setTransform(new FSCoordTransform(xLocation, yLocation));
}
/** Constructs an FSPlaceObject2 object that modifies the morphing shape located on layer, aLayer in the display list. The progress of the morphing process is controlled by aRatio.
@param aLayer the layer number on which the object is being displayed.
@param aRatio the ratio of the progress in morphing the shape.
@param transform an FSCoordTransform object that will be applied to the object displayed.
*/
public FSPlaceObject2(int aLayer, float aRatio, FSCoordTransform transform)
{
super(PlaceObject2);
setPlaceType(FSPlaceObject2.Modify);
setLayer(aLayer);
setRatio(aRatio);
setTransform(transform);
}
/** Constructs an FSPlaceObject2 object with the specified placement type, object identifier, layer number, coordinate transform and colour transform. The exact operation performed is dependent on the placement type specified.
@param aPlace the type of operation to be performed, either New, Modify or Replace.
@param anIdentifier the identifier of a new object to be displayed.
@param aLayer the layer number on which an object is being displayed.
@param transform an FSCoordTransform object that will be applied to the object displayed in the display list at layer, aLayer.
@param colorTransform an FSColorTransform object that will be applied to the object displayed in the display list at layer, aLayer.
*/
public FSPlaceObject2(int aPlace, int anIdentifier, int aLayer, FSCoordTransform transform, FSColorTransform colorTransform)
{
super(PlaceObject2);
setPlaceType(aPlace);
setIdentifier(anIdentifier);
setLayer(aLayer);
setTransform(transform);
setColorTransform(colorTransform);
}
/**
* Constructs an FSPlaceObject2 object by copying values from an existing
* object.
*
* @param obj an FSPlaceObject2 object.
*/
public FSPlaceObject2(FSPlaceObject2 obj)
{
super(obj);
place = obj.place;
layer = obj.layer;
identifier = obj.identifier;
if (obj.transform != null)
transform = new FSCoordTransform(obj.transform);
if (obj.colorTransform != null)
colorTransform = new FSColorTransform(obj.colorTransform);
ratio = obj.ratio;
clippingDepth = obj.clippingDepth;
if (obj.name != null)
name = new String(obj.name);
if (obj.clipEvents != null)
{
clipEvents = new ArrayList(obj.clipEvents.size());
for (Iterator i = obj.clipEvents.iterator(); i.hasNext();)
clipEvents.add(((FSClipEvent)i.next()).clone());
}
else
{
encodedEvents = Transform.clone(encodedEvents);
}
}
/** Adds a clip event to the array of clip events. If the object already
* contains a set of encoded clip event objects they will be deleted.
*
* @param aClipEvent a clip event object.
*/
public void add(FSClipEvent aClipEvent)
{
if (clipEvents == null)
clipEvents = new ArrayList();
clipEvents.add(aClipEvent);
encodedEvents = null;
}
/**
* Gets the array of FSClipEvent object that define the actions that will be
* executed in response to events that occur in the FSDefineMovieClip being placed.
*
* @return the array of clip events
*/
public ArrayList getClipEvents()
{
return clipEvents;
}
/**
* Set the array of Clip events. Clip Events are only valid for movie clips
* and the argument should be set to null when placing other types of object.
*
* If the object already contains a set of encoded clip event objects they
* will be deleted.
*
* @param anArray an array of FSClipEvent objects.
*/
public void setClipEvents(ArrayList anArray)
{
clipEvents = anArray;
if (encodedEvents != null)
encodedEvents = null;
}
/**
* Set the encoded clip event objects generated by the classes in the Translate
* framework. If the object already contains an array of clip events objects
* then they will be deleted.
*
* @param bytes the array of encoded clip events.
*/
public void setEncodedEvents(byte[] bytes)
{
encodedEvents = bytes;
clipEvents = null;
}
/** Gets the type of place operation being performed.
@return the placement type.
*/
public int getPlaceType()
{
return place;
}
/** Gets the Layer on which the object will be displayed in the display list.
@return the layer number being referenced.
*/
public int getLayer()
{
return layer;
}
/** Gets the identifier of the object to be placed. This is only required when placing an object for the first time. Subsequent references to the object on this layer can simply use the layer number.
@return the identifier of an object being placed on the display list.
*/
public int getIdentifier()
{
return identifier;
}
/** Gets the coordinate transform.
@return the FSCoordTransform that will be applied to an object in the display list.
*/
public FSCoordTransform getTransform()
{
return transform;
}
/** Gets the colour transform.
@return the FSColorTransform that will be applied to an object in the display list.
*/
public FSColorTransform getColorTransform()
{
return colorTransform;
}
/** Gets the morph ratio, in the range 0..65535 that defines the progress in the morphing process performed by the Flash Player from the defined start and end shapes. A value of 0 indicates the start of the process and 65535 the end.
@return the morph ratio, in the range 0..65535.
*/
public float getRatio()
{
return ratio;
}
/** Gets the number of layers that will be clipped by the object placed on the layer specified in this object.
@return the number of layers that will be clipped.
*/
public int getClippingDepth()
{
return clippingDepth;
}
/** Gets the name of the object.
@return the name assigned to an object.
*/
public String getName()
{
return name;
}
/** Sets the type of placement.
@param aType the type of operation to be performed, either New, Modify or Replace.
*/
public void setPlaceType(int aType)
{
place = aType;
}
/** Sets the layer at which the object will be placed.
@param aLayer the layer number on which the object is being displayed.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -