Actionscript/MovieClip

From Gnash Project Wiki

Jump to: navigation, search

Contents

MovieClip

Every sprite in a movie is accessible though ActionScript as an instance of the MovieClip class.

Methods

  • MovieClip.attachAudio()
  • MovieClip.attachMovie()
  • MovieClip.createEmptyMovieClip()
  • MovieClip.createTextField()
  • MovieClip.duplicateMovieClip()
  • MovieClip.getBounds()
  • MovieClip.getBytesLoaded()
  • MovieClip.getBytesTotal()
  • MovieClip.getDepth()
  • MovieClip.getInstanceAtDepth()
  • MovieClip.getNextHighestDepth() -- available since player v7
  • MovieClip.getSWFVersion()
  • MovieClip.getTextSnapshot()
  • MovieClip.getURL()
  • MovieClip.globalToLocal()
  • MovieClip.gotoAndPlay()
  • MovieClip.gotoAndStop()
  • MovieClip.hitTest()
  • MovieClip.loadMovie()
  • MovieClip.loadVariables()
  • MovieClip.localToGlobal()
  • MovieClip.nextFrame()
  • MovieClip.play()
  • MovieClip.prevFrame()
  • MovieClip.removeMovieClip()
  • MovieClip.attachMovie().
  • MovieClip.setMask()
  • MovieClip.startDrag()
  • MovieClip.stop()
  • MovieClip.stopDrag()
  • MovieClip.swapDepths()
  • MovieClip.unloadMovie()

Drawing API

This is a set of functions implemented in players for SWF6 and up, allowing drawing trough ActionScript

beginFill

beginGradientFill

clear

curveTo

endFill

Ends the fill specified by beginFill() or beginGradientFill().

lineStyle

Defines the stroke of lines created with the lineTo() and curveTo() methods.

lineTo

moveTo

Properties

  • MovieClip._alpha
  • MovieClip._currentframe
  • MovieClip._droptarget
  • MovieClip.enabled
  • MovieClip.focusEnabled
  • MovieClip._focusrect
  • MovieClip._framesloaded
  • MovieClip._height
  • MovieClip.hitArea
  • MovieClip._lockroot
  • MovieClip.menu
  • MovieClip._name
  • MovieClip._parent
  • MovieClip._quality
  • MovieClip._rotation
  • MovieClip._soundbuftime
  • MovieClip.tabChildren
  • MovieClip.tabEnabled
  • MovieClip.tabIndex
  • MovieClip._target
  • MovieClip._totalframes
  • MovieClip.trackAsMenu
  • MovieClip._url
  • MovieClip.useHandCursor
  • MovieClip._visible
  • MovieClip._width
  • MovieClip._x
  • MovieClip._xmouse
  • MovieClip._xscale
  • MovieClip._y
  • MovieClip._ymouse
  • MovieClip._yscale

Event handlers

Create function members of MovieClip instances with these names to have them called on specified event

onData

onDragOut

onDragOver

onEnterFrame

onKeyDown

onKeyUp

onKillFocus

onLoad

onLoadInit

This event will be fired *after* a loaded movieclip has been initialized (ie: all properties reachable and such). Sounds weird, but that is, found in a mail post on flashcoders@chattyfig.

onLoadComplete

This event will be fired as soon as all data (bytes) from a load have been received. NOTE this is NOT after actually parsing it. Despite the name, onLoadInit will be fired after this event.

Also note that this event is sent for load request of any type in (SWF, JPEG, GIF, or PNG)

onMouseDown

onMouseMove

onMouseUp

onPress

onRelease

onReleaseOutside

onRollOut

onRollOver

onSetFocus

onUnload