• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Movie Clip Object

Movie Clip Object

Method Description Parameters
attachMovie(idName , newName , depth ) Attaches a movie clip from the Library to a movie-clip instance on the Stage. idName , the identifier of the movie- clip symbol in the Library’s Linkage property

newName , the instance name of the attached movie-clip symbol

depth , the depth level
createEmptyMovieClip (name, depth ) Creates an instance of a movie clip containing no content on the Stage. name , the instance name depth, the depth level
createTextField(name, depth, x, y, width, height ) Creates a new text field. name , the instance name

depth , the depth level

x , the x position

y , the y position

width , the horizontal dimension in pixels

height , the vertical dimension in pixels
duplicateMovieClip (newName , depth ) Creates another instance of a movie-clip instance on the Stage. newName , the instance name of the duplicate depth , the depth level
getBounds (targetCoordinateSpace ) Returns the minimum and maximum x and y positions of the movie clip in the space of the specified target. The returned object contains the properties xMin, xMax, yMin, and yMax. targetCoordinateSpace , the Timeline whose coordinate coordinate space is the reference
getBytesLoaded() Returns the amount of a movie clip downloaded, in bytes. 
getBytesTotal() Returns the total size of a movie clip, in bytes. 
getDepth() Returns the depth level of a movie-clip instance. 
getURL (URL , window , variables ) Loads a URL into a browser window. URL, an Internet address of relative path window , optional parameter for browser window or frame variables , optional parameter specifying the CGI GET or POST method
globaltoLocal(point ) Converts the global coordinates of the point object to coordinates relative to the movie clip. point , an object that contains x and y coordinates.
gotoAndPlay(frame ) Sends the playhead to the specified frame or label and begins playing. frame , the number of the frame or name of the label
gotoAndStop(frame ) Sends the playhead to the specified frame or label and stops. frame , the number of the frame or name of the label
hitTest(x , y , shapeFlag ) Returns true if the x and y coordinates intersect the movie clip. x , the x coordinate y , the y coordinate
hitTest(target ) Returns true if the specified target movie clip intersects the movie clip. shapeFlag , true or false parameter that determines if the coordinates intersect the shape of the movie clip (true) or its bounding box (false) target , the intersecting movie- clip instance
loadMovie(URL , method ) Loads an external SWF or JPEG into the movie clip. URL , the path to the external SWF file or JPEG file method , optional argument specifying the CGI GET or POST method
loadVariables (URL , method ) Loads external variables kept in a text file into the movie clip. URL , the path to the external text file method , optional argument specifying the CGI GET or POST method
localtoGlobal (point ) Converts the coordinates of the point object from a movie clip to coordinates relative to the Stage. point , an object that contains x and y coordinates.
nextFrame() Sends the playhead to the next frame and stops. 
play() Begins playing the movie-clip Timeline at the current position of the playhead. 
prevFrame() Sends the playhead to the previous frame and stops. 
removeMovieClip() Removes a movie-clip instance created with createEmptyMovieClip(), duplicateMovieClip(), or attachMovie(). 
setMask(maskMC ) Makes the movie clip specified in the parameter into a mask that affects the movie clip that calls this method maskMC , a movie clip
startDrag(lockCenter , left , top , right , bottom ) Makes the movie clip follow the pointer. lockCenter , true or false parameter that determines if the center point of the movie clip is locked to the pointer left, top, right, bottom , values to constrain the movie clip’s position
stop() Stops the playhead. 
stopDrag() Stops the movie clip from following the pointer. 
swapDepths(depth ) Switches the stacking order of movie clips. depth , the depth level that contains a movie clip to swap
swapDepths(target )  target , the movie clip that swaps
unloadMovie() Removes the loaded SWF file in a movie movie-clip instance or a movie clip created at run time or author time. 
Drawing Method Description Parameters
beginFill (0xRRGGBB, alpha ) Indicates the fill for the start of a drawing path. 0xRRGGBB , the red, green, and blue values for the color alpha , an optional value for the transparency
beginGradientFill(fillType, colors, alphas, ratios, matrix ) Indicates the gradient fill for the start of a drawing path. fillType , either “radial” or “linear”

colors , an array containing the hex code colors

alphas , an array containing the transparency values

ratios , an array containing the color-distribution values (0-255)

matrix , an object with the properties

matrixType , x, y, w, h, and r which determines the gradient orientation
clear() Removes shapes created with the drawing methods 
curveTo(controlX, controlY, anchorX, anchorY ) Creates a curve from the previous point to the anchor point using the control point to determine curvature. controlY , y position of control point

anchorX , x position of end point

anchorY , y position of end point

controlX , x position of control point
endFill() Applies a fill to the paths since the last beginFill() or beginGradientFill() method. 
lineStyle(thickness, 0xRRGGBB, alpha ) Defines the line style thickness , thickness of the line (0-255)

0xRRGGBB , optional hex code value for the line color

alpha , optional value for the transparency of the line
lineTo(x, y ) Draws a line from the previous position to the x and y positions x , the x position of the end point y , the y position of the end point
moveTo(x, y ) Moves the current drawing position. X , the new x position y , the new y position
Property Description
_alpha Alpha transparency from 0 (transparent) to 100 (opaque)
_currentframe Current frame position of the playhead (read-only)
_droptarget Target path of a movie clip that the draggable movie clip is dropped on (in slash notation, read-only)
_focusrect Visibility of the yellow rectangle around a focused movie clip, either true or false
_framesloaded Number of frames that have been downloaded to the viewer’s computer (read -only)
_height Vertical dimension in pixels
_name Name of the movie- clip instance
_rotation Rotation in degrees, clockwise from the 12 o’clock position
_target Target path of the movie- clip instance (read -only)
_totalframes Total number of frames in the movie- clip symbol (read -only)
_url The URL of the SWF file loaded into the movie clip (read -only)
_visible Visibility, either true or false
_width Horizontal dimension in pixels
_x x position
_xmouse x position of the pointer
_xscale Percentage of the horizontal dimension of the movie- clip symbol
_y y position
_ymouse y position of the pointer
_yscale Percentage of the vertical dimension of the movie- clip symbol
enabled Movie clip can receive events, either true or false
focusEnabled Movie clip can receive focus even when it is not acting as a button, true or false.
hitArea Another movie clip that serves as the active area
tabChildren Movie clips inside movie clips can receive focus when using the Tab key, true or false.
tabEnabled Movie clip can receive keyboard focus with the Tab key, either true or false.
tabIndex Order of focus when using the Tab key.
trackAsMenu Track as menu (true) or track as button (false).
useHandCursor Visibility of the hand icon, either true or false.



PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint