|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.flagstone.transform.action.GotoFrame2
public final class GotoFrame2
The GotoFrame2 action instructs the player to go to the named or numbered frame in the current movie's main time-line. It extends the functionality provided by the GotoFrame action by allowing the name of a frame, previously assigned using the FrameLabel object, to be specified.
Up to Flash Version 4, movies contained a single sequence of 65536 frames. In Flash 5 the concept of Scenes was added which allowed movies to contain 'pages' of frames. GotoFrame2 contains a frameOffset attribute which allows the frames in each scene to be referenced by its 'logical' number. The frameOffset for a given scene is added to the frame number to generate the 'physical' page number.
GotoFrame2 is a stack-based action. The name or number of the frame is pushed onto the stack before the GotoFrame2 action is executed. If a frameOffset is specified it is added to the number of the frame identified by the stack arguments to give the final frame number. Whether the movie starts playing the frame is controlled by the boolean attribute, play. When set to true the movie starts playing the frame as soon as it has been loaded by the Flash Player.
GotoFrame2 is only used to control the main time-line of a movie. Controlling how an individual movie clip is played is handled by a different mechanism. From Flash 5 onward movie clips are defined as objects. The ExecuteMethod action is used to execute the gotoAndPlay() or gotoAndStop() methods that control a movie clip's time-line.
GotoFrame| Constructor Summary | |
|---|---|
GotoFrame2(boolean aBool)
Creates a GotoFrame2 object with the specified play flag setting. |
|
GotoFrame2(GotoFrame2 object)
Creates and initialises a GotoFrame2 action using the values copied from another GotoFrame2 action. |
|
GotoFrame2(int offset,
boolean aBool)
Creates a GotoFrame2 object with the specified play flag setting and frame offset for a given scene. |
|
GotoFrame2(SWFDecoder coder)
Creates and initialises an GotoFrame2 action using values encoded in the Flash binary format. |
|
| Method Summary | |
|---|---|
GotoFrame2 |
copy()
Creates a complete copy of this object. |
void |
encode(SWFEncoder coder,
Context context)
Encode an object to the Flash binary format. |
int |
getFrameOffset()
Returns the offset that will be added to the 'logical' frame number obtained from the stack to generate the 'physical' frame number. |
boolean |
isPlay()
Returns the play flag. |
int |
prepareToEncode(Context context)
Prepare an object for encoding, returning the expected size of an object when it is encoded. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public GotoFrame2(SWFDecoder coder)
throws IOException
coder - an SWFDecoder object that contains the encoded Flash data.
IOException - if an error occurs while decoding the data.public GotoFrame2(boolean aBool)
aBool - true if the player should being playing the movie at the
specified frame. false if the player should stop playing the
movie.
public GotoFrame2(int offset,
boolean aBool)
offset - a number which will be added to the number of the frame popped
from the stack to give the final frame number. Must be in the
range 1..65535.aBool - true if the player should being playing the movie at the
specified frame, false if the player should stop playing the
movie.public GotoFrame2(GotoFrame2 object)
object - a GotoFrame2 action from which the values will be
copied.| Method Detail |
|---|
public int getFrameOffset()
public boolean isPlay()
public GotoFrame2 copy()
copy in interface Copyable<Action>public String toString()
toString in class Objectpublic int prepareToEncode(Context context)
prepareToEncode in interface SWFEncodeablecontext - 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 SWFEncodeablecoder - 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 | |||||||||