MACROMEDIA FLASH MX 2004 - ACTIONSCRIPT Reference Manual page 399

Actionscript reference guide
Hide thumbs Also See for FLASH MX 2004 - ACTIONSCRIPT:
Table of Contents

Advertisement

The following example uses an
released by the user. If the object was released less than 300 milliseconds after dragging it, the
condition evaluates to
variables to store the new location of the object, how hard it was thrown, and the speed at which
it was thrown. The
milliseconds after it was dragged, the condition evaluates to
statements run.
if (getTimer()<timePressed+300) {
// if the condition is true,
// the object was thrown.
// what is the new location of this object?
xNewLoc = this._x;
yNewLoc = this._y;
// how hard did they throw it?
xTravel = xNewLoc-xLoc;
yTravel = yNewLoc-yLoc;
// setting the speed of the object depending on
// how far they travelled with it
xInc = xTravel/2;
yInc = yTravel/2;
timePressed = 0;
}
See also
else
ifFrameLoaded
Availability
Flash Player 3. The
using the
MovieClip._framesloaded
Usage
ifFrameLoaded([scene,] frame) {
statement(s);
}
Parameters
An optional string specifying the name of the scene that must be loaded.
scene
The frame number or frame label that must be loaded before the next statement
frame
is executed.
statement(s)
are loaded.
Returns
Nothing.
action to evaluate when a draggable object in the SWF file is
if
and the statements inside the curly braces run. Those statements set
true
variable is also reset. If the object was released more than 300
timePressed
action was deprecated in Flash 5; Macromedia recommends
ifFrameLoaded
The instructions to execute if the specified scene, or scene and frame,
false
property.
and none of the
ifFrameLoaded
399

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH MX 2004 - ACTIONSCRIPT and is the answer not in the manual?

Subscribe to Our Youtube Channel

Table of Contents