楼ä¸å¤ªå°äºä¸è¿èªå·±åç满累.以ä¸MovieClipå±æ§è¡¨,æä¸é¢æ¯æèªå·±åçä¾å.
_alpha:Number
å½±çåªè¾ç Alpha éæ度å¼ã
blendMode:Object
æ¤å½±çåªè¾çæ··å模å¼ã
cacheAsBitmap:Boolean
å¦æ设置为 trueï¼å Flash Player å°ç¼åå½±çåªè¾çå
é¨ä½å¾è¡¨ç¤ºã
_currentframe:Number [åªè¯»]
è¿åæå®å¸§çç¼å·ï¼è¯¥å¸§ä¸çææ¾å¤´ä½äºå½±çåªè¾çæ¶é´è½´ä¸ã
_droptarget:String [åªè¯»]
è¿åå¨å
¶ä¸æ¾ç½®æ¤å½±çåªè¾çå½±çåªè¾å®ä¾çç»å¯¹è·¯å¾ï¼ä»¥ææ è¯æ³è®°å·è¡¨ç¤ºã
enabled:Boolean
ä¸ä¸ªå¸å°å¼ï¼æ示影çåªè¾æ¯å¦å¤äºæ´»å¨ç¶æã
filters:Array
ä¸ä¸ªç´¢å¼æ°ç»ï¼å
å«å½åä¸å½±çåªè¾ç¸å
³èçæ¯ä¸ªè¿æ»¤å¨å¯¹è±¡ã
focusEnabled:Boolean
å¦æå¼ä¸º undefined æ falseï¼åé¤éå½±çåªè¾æ¯ä¸ä¸ªæé®ï¼å¦åå®æ æ³è·å¾è¾å
¥ç¦ç¹ã
_focusrect:Boolean
ä¸ä¸ªå¸å°å¼ï¼æå®å½å½±çåªè¾å
·æé®çç¦ç¹æ¶å
¶å¨å´æ¯å¦æé»è²ç©å½¢ã
_framesloaded:Number [åªè¯»]
ä»æµå¼ SWF æ件å è½½ç帧æ°ã
_height:Number
å½±çåªè¾çé«åº¦ï¼ä»¥åç´ ä¸ºåä½ã
_highquality:Number
èª Flash Player 7 åä¸æ¨è使ç¨ãä¸æ¨è使ç¨æ¤å±æ§ï¼èæ¨èä½¿ç¨ MovieClip._qualityã
æå®å½å SWF æ件æåºç¨çæ¶é¤é¯é½¿ç级å«ã
hitArea:Object
å°å¦ä¸ä¸ªå½±çåªè¾æå®ä¸ºå½±çåªè¾çç¹å»åºåã
_lockroot:Boolean
ä¸ä¸ªå¸å°å¼ï¼æå®å° SWF æ件å è½½å°å½±çåªè¾ä¸æ¶ _root å¼ç¨çå
容ã
menu:ContextMenu
å°æå®ç ContextMenu 对象ä¸å½±çåªè¾ç¸å
³èã
_name:String
å½±çåªè¾çå®ä¾å称ã
opaqueBackground:Number
ç±æ°åï¼RGB åå
è¿å¶å¼ï¼æå®çé¢è²çå½±çåªè¾çä¸éæèæ¯é¢è²ã
_parent:MovieClip
对å
å«å½åå½±çåªè¾æ对象çå½±çåªè¾æ对象çå¼ç¨ã
_quality:String
设置ææ£ç´¢ç¨äº SWF æ件çåç°åè´¨ã
_rotation:Number
æå®å½±çåªè¾ç¸å¯¹äºå
¶åå§æ¹åçæ转ç¨åº¦ï¼ä»¥åº¦ä¸ºåä½ã
scale9Grid:Rectangle
ç©å½¢åºåï¼å®å®ä¹å½±çåªè¾çä¹ä¸ªç¼©æ¾åºåã
scrollRect:Object
éè¿ scrollRect å±æ§ï¼å¯ä»¥å¿«éæ»å¨å½±çåªè¾å
容ï¼å¹¶å
·æä¸ä¸ªç¨æ¥æ¥çè¾å¤§å
容ççªå£ã
_soundbuftime:Number
æå®å¨å£°é³å¼å§è¿å
¥æµä¹åï¼é¢å
ç¼å²çç§æ°ã
tabChildren:Boolean
ç¡®å®å½±çåªè¾çå级æ¯å¦å
æ¬å¨ Tab é®çèªå¨æåºä¸ã
tabEnabled:Boolean
æå®å½±çåªè¾æ¯å¦å
æ¬å¨ Tab é®çèªå¨æåºä¸ã
tabIndex:Number
å¯ç¨äºèªå®ä¹å½±çä¸å¯¹è±¡ç Tab é®æåºã
_target:String [åªè¯»]
è¿åå½±çåªè¾å®ä¾çç®æ è·¯å¾ï¼ä»¥ææ è®°å·è¡¨ç¤ºã
_totalframes:Number [åªè¯»]
è¿åç± MovieClip åæ°æå®çå½±çåªè¾å®ä¾ä¸çæ»å¸§æ°ã
trackAsMenu:Boolean
å¸å°å¼ï¼æ示å
¶å®æé®æå½±çåªè¾æ¯å¦å¯æ¥æ¶é¼ æ éæ¾äºä»¶ã
transform:Transform
ä¸ä¸ªå¯¹è±¡ï¼å
·æä¸å½±çåªè¾çç©éµãé¢è²è½¬æ¢ååç´ èå´æå
³çå±æ§ã
_url:String [åªè¯»]
æ£ç´¢ä»å
¶ä¸è½½å½±çåªè¾ç SWFãJPEGãGIF æ PNG æ件ç URLã
useHandCursor:Boolean
ä¸ä¸ªå¸å°å¼ï¼æ示å½é¼ æ æ»è¿å½±çåªè¾æ¶æ¯å¦æ¾ç¤ºææå½¢ï¼æå½¢å
æ ï¼ã
_visible:Boolean
ä¸ä¸ªå¸å°å¼ï¼æ示影çåªè¾æ¯å¦å¤äºå¯è§ç¶æã
_width:Number
å½±çåªè¾ç宽度ï¼ä»¥åç´ ä¸ºåä½ã
_x:Number
ä¸ä¸ªæ´æ°ï¼å®è®¾ç½®å½±çåªè¾ç¸å¯¹äºç¶çº§å½±çåªè¾çæ¬å°åæ ç x åæ ã
_xmouse:Number [åªè¯»]
è¿åé¼ æ ä½ç½®ç x åæ ã
_xscale:Number
ç¡®å®ä»å½±çåªè¾æ³¨åç¹å¼å§åºç¨çå½±çåªè¾æ°´å¹³ç¼©æ¾æ¯ä¾ (percentage)ã
_y:Number
设置影çåªè¾ç¸å¯¹äºç¶çº§å½±çåªè¾çæ¬å°åæ ç y åæ ã
_ymouse:Number [åªè¯»]
æç¤ºé¼ æ ä½ç½®ç y åæ ã
_yscale:Number
设置ä»å½±çåªè¾æ³¨åç¹å¼å§åºç¨çå½±çåªè¾åç´ç¼©æ¾æ¯ä¾ (percentage)ã
以ä¸äºä»¶è¡¨:
onData = function() {}
å¨å½±çåªè¾ä» MovieClip.loadVariables() è°ç¨æ MovieClip.loadMovie() è°ç¨è·å¾æ°æ®æ¶è°ç¨ã
onDragOut = function() {}
å½æä¸é¼ æ æé®å¹¶ä¸æéæ»åºå¯¹è±¡æ¶è°ç¨ã
onDragOver = function() {}
å½é¼ æ æéå¨å½±çåªè¾å¤æå¨å¹¶ä¸éåæè¿è¯¥å½±çåªè¾æ¶è°ç¨ã
onEnterFrame = function() {}
以 SWF æ件ç帧é¢éå¤è°ç¨ã
onKeyDown = function() {}
å½å½±çåªè¾å
·æè¾å
¥ç¦ç¹å¹¶ä¸ç¨æ·æä¸æ个é®æ¶è°ç¨ã
onKeyUp = function() {}
å½éæ¾æé®æ¶è°ç¨ã
onKillFocus = function(newFocus:Object) {}
å½å½±çåªè¾å¤±å»é®çç¦ç¹æ¶è°ç¨ã
onLoad = function() {}
å½å½±çåªè¾è¢«å®ä¾å并æ¾ç¤ºå¨æ¶é´è½´ä¸æ¶è°ç¨ã
onMouseDown = function() {}
å½æä¸é¼ æ æé®æ¶è°ç¨ã
onMouseMove = function() {}
å½é¼ æ 移å¨æ¶è°ç¨ã
onMouseUp = function() {}
éæ¾é¼ æ æé®æ¶è°ç¨ã
onPress = function() {}
å½é¼ æ æéå¤äºå½±çåªè¾ä¹ä¸èç¨æ·åå»é¼ æ æ¶è°ç¨ã
onRelease = function() {}
å½ç¨æ·å¨å½±çåªè¾ä¸éæ¾é¼ æ æé®æ¶è°ç¨ã
onReleaseOutside = function() {}
ç¨æ·å¨å½±çåªè¾åºåä¸æä¸é¼ æ æé®å¹¶ä¸å¨å½±çåªè¾åºåä¹å¤éæ¾å®åè°ç¨ã
onRollOut = function() {}
å½é¼ æ æé移å°å½±çåªè¾åºåçå¤é¢æ¶è°ç¨ã
onRollOver = function() {}
å½é¼ æ æéæ»è¿å½±çåªè¾åºåæ¶è°ç¨ã
onSetFocus = function(oldFocus:Object) {}
å½å½±çåªè¾è·å¾é®çç¦ç¹æ¶è°ç¨ã
onUnload = function() {}
ä»æ¶é´è½´å é¤å½±çåªè¾åï¼å¨ç¬¬ 1 帧ä¸è°ç¨ã
以ä¸æ¹æ³æè¦:
修饰符
ç¾å
说æ
attachAudio(id:Object) : Void
æå®è¦ææ¾çé³é¢æºã
attachBitmap(bmp:BitmapData, depth:Number, [pixelSnapping:String], [smoothing:Boolean]) : Void
å°ä½å¾å¾åéå å°å½±çåªè¾ã
attachMovie(id:String, name:String, depth:Number, [initObject:Object]) : MovieClip
ä»åºä¸åå¾ä¸ä¸ªå
件并å°å
¶éå å°å½±çåªè¾ä¸ã
beginBitmapFill(bmp:BitmapData, [matrix:Matrix], [repeat:Boolean], [smoothing:Boolean]) : Void
ç¨ä½å¾å¾åå¡«å
ç»ç»åºåã
beginFill(rgb:Number, [alpha:Number]) : Void
æ示æ°çç»ç»è·¯å¾çå¼å§ã
beginGradientFill(fillType:String, colors:Array, alphas:Array, ratios:Array, matrix:Object, [spreadMethod:String], [interpolationMethod:String], [focalPointRatio:Number]) : Void
æ示æ°çç»ç»è·¯å¾çå¼å§ã
clear() : Void
å é¤ä½¿ç¨å½±çåªè¾ç»ç»æ¹æ³ï¼å
æ¬ç¨ MovieClip.lineStyle() æå®ç线æ¡æ ·å¼ï¼å¨è¿è¡æ¶å建çææå¾å½¢ã
createEmptyMovieClip(name:String, depth:Number) : MovieClip
å建ä¸ä¸ªç©ºå½±çåªè¾ä½ä¸ºç°æå½±çåªè¾çå级ã
createTextField(instanceName:String, depth:Number, x:Number, y:Number, width:Number, height:Number) : TextField
å建ä¸ä¸ªæ°ç空ææ¬å段ä½ä¸ºå¨å
¶ä¸è°ç¨æ¤æ¹æ³çå½±çåªè¾çå级ã
curveTo(controlX:Number, controlY:Number, anchorX:Number, anchorY:Number) : Void
éè¿ç± ((controlX, controlY) æå®çæ§å¶ç¹ï¼ä½¿ç¨å½å线æ¡æ ·å¼ç»å¶ä¸æ¡æ²çº¿ï¼è¯¥æ²çº¿ä»å½åç»ç»ä½ç½®å° (anchorX, anchorY)ã
duplicateMovieClip(name:String, depth:Number, [initObject:Object]) : MovieClip
å¨ SWF æ件æ£å¨ææ¾æ¶ï¼å建æå®å½±çåªè¾çå®ä¾ã
endFill() : Void
对ä»ä¸ä¸æ¬¡è°ç¨ beginFill() æ beginGradientFill() ä¹ååå¨çç´çº¿ææ²çº¿åºç¨å¡«å
ã
getBounds(bounds:Object) : Object
åºäº bounds åæ°ï¼è¿åä½ä¸ºå½±çåªè¾çæå°åæ大 x å y åæ å¼çå±æ§ã
getBytesLoaded() : Number
è¿åå·²å è½½ï¼æµå¤çï¼çå½±çåªè¾çåèæ°ã
getBytesTotal() : Number
以åè为åä½è¿åå½±çåªè¾ç大å°ã
getDepth() : Number
è¿åå½±çåªè¾å®ä¾ç深度ã
getInstanceAtDepth(depth:Number) : MovieClip
ç¡®å®ç¹å®æ·±åº¦æ¯å¦å·²è¢«å½±çåªè¾å ç¨ã
getNextHighestDepth() : Number
ç¡®å®å¯ä¼ éç» MovieClip.attachMovie()ãMovieClip.duplicateMovieClip() æ MovieClip.createEmptyMovieClip() ç深度å¼ï¼ä»¥ç¡®ä¿ Flash å°è¯¥å½±çåªè¾åç°å¨å½åå½±çåªè¾ä¸åä¸çº§ååä¸å±ä¸ææå
¶å®å¯¹è±¡çåé¢ã
getRect(bounds:Object) : Object
åºäº bounds åæ°ï¼è¿åä½ä¸ºå½±çåªè¾çæå°åæ大 x å y åæ å¼çå±æ§ï¼ä¸å
æ¬å½¢ç¶ä¸çä»»ä½ç¬è§¦ã
getSWFVersion() : Number
è¿åä¸ä¸ªæ´æ°ï¼è¯¥æ´æ°æ示æåå¸çå½±çåªè¾ç Flash Player çæ¬ã
getTextSnapshot() : TextSnapshot
è¿åä¸ä¸ª TextSnapshot 对象ï¼è¯¥å¯¹è±¡å
å«æå®å½±çåªè¾çææéæææ¬å段ä¸çææ¬ï¼ä¸å
æ¬å级影çåªè¾ä¸çææ¬ã
getURL(url:String, [window:String], [method:String]) : Void
ä»æå® URL å°ææ¡£å è½½å°æå®çªå£ã
globalToLocal(pt:Object) : Void
å° pt 对象ä»èå°ï¼å
¨å±ï¼åæ 转æ¢ä¸ºå½±çåªè¾ï¼æ¬å°ï¼åæ ã
gotoAndPlay(frame:Object) : Void
ä»æå®å¸§å¼å§ææ¾ SWF æ件ã
gotoAndStop(frame:Object) : Void
å°ææ¾å¤´ç§»å°å½±çåªè¾çæå®å¸§å¹¶åå¨é£éã
hitTest() : Boolean
计ç®å½±çåªè¾ï¼ä»¥ç¡®è®¤å
¶æ¯å¦ä¸ç± target æ x å y åæ åæ°æ è¯çç¹å»åºååçéå æç¸äº¤ã
lineGradientStyle(fillType:String, colors:Array, alphas:Array, ratios:Array, matrix:Object, [spreadMethod:String], [interpolationMethod:String], [focalPointRatio:Number]) : Void
æå® Flash ç¨äºåç» lineTo() å curveTo() æ¹æ³è°ç¨ç线æ¡æ ·å¼ï¼å¨ä»¥ä¸ååæ°è°ç¨ lineStyle() æ¹æ³æ lineGradientStyle() æ¹æ³ä¹åï¼çº¿æ¡æ ·å¼ä¸ä¼æ¹åã
lineStyle(thickness:Number, rgb:Number, alpha:Number, pixelHinting:Boolean, noScale:String, capsStyle:String, jointStyle:String, miterLimit:Number) : Void
æå® Flash ç¨äºåç» lineTo() å curveTo() æ¹æ³è°ç¨ç线æ¡æ ·å¼ï¼å¨ä»¥ä¸ååæ°è°ç¨ lineStyle() æ¹æ³ä¹åï¼çº¿æ¡æ ·å¼ä¸ä¼æ¹åã
lineTo(x:Number, y:Number) : Void
使ç¨å½å线æ¡æ ·å¼ç»å¶ä¸æ¡ä»å½åç»ç»ä½ç½®å° (x, y) ç线æ¡ï¼å½åç»ç»ä½ç½®éåä¼è®¾ç½®ä¸º (x, y)ã
loadMovie(url:String, [method:String]) : Void
å¨ææ¾åå§ SWF æ件æ¶ï¼å° SWFãJPEGãGIF æ PNG æ件å è½½å° Flash Player ä¸çå½±çåªè¾ä¸ã
loadVariables(url:String, [method:String]) : Void
ä»å¤é¨æ件读åæ°æ®å¹¶è®¾ç½®å½±çåªè¾ä¸åéçå¼ã
localToGlobal(pt:Object) : Void
å° pt 对象ä»å½±çåªè¾ï¼æ¬å°ï¼åæ 转æ¢ä¸ºèå°ï¼å
¨å±ï¼åæ ã
moveTo(x:Number, y:Number) : Void
å°å½åç»ç»ä½ç½®ç§»å¨å° (x, y)ã
nextFrame() : Void
å°ææ¾å¤´è½¬å°ä¸ä¸å¸§å¹¶åæ¢ã
play() : Void
å¨å½±çåªè¾çæ¶é´è½´ä¸ç§»å¨ææ¾å¤´ã
prevFrame() : Void
å°ææ¾å¤´è½¬å°åä¸å¸§å¹¶åæ¢ã
removeMovieClip() : Void
å é¤ç¨ duplicateMovieClip()ãMovieClip.duplicateMovieClip()ãMovieClip.createEmptyMovieClip() æ MovieClip.attachMovie() å建çå½±çåªè¾å®ä¾ã
setMask(mc:Object) : Void
使åæ° mc ä¸çå½±çåªè¾æ为å±ç¤ºè°ç¨å½±çåªè¾çé®ç½©å±ã
startDrag([lockCenter:Boolean], [left:Number], [top:Number], [right:Number], [bottom:Number]) : Void
å
许ç¨æ·æå¨æå®çå½±çåªè¾ã
stop() : Void
åæ¢å½åæ£å¨ææ¾çå½±çåªè¾ã
stopDrag() : Void
ç»æ MovieClip.startDrag() æ¹æ³ã
swapDepths(target:Object) : Void
交æ¢æ¤å½±çåªè¾ä¸å¦ä¸å½±çåªè¾çå æ æ深度级å«ï¼z-顺åºï¼ï¼å¦ä¸å½±çåªè¾ç± target åæ°æå®ï¼ææå®ä¸ºå½åå ç¨ç± target åæ°æå®ç深度级å«çå½±çåªè¾ã
unloadMovie() : Void
å é¤å½±çåªè¾å®ä¾çå
容ã
继æ¿èª Object ç±»çæ¹æ³
æ§å¶MCæ¹æ³.以ä¸æ¬äººä¸¾ä¾å
容:
//å¨ä¸»åºæ¯å»ºç«ä¸ä¸ªç©ºå½±çåªè¾.æ§å¶å½±çåªè¾çx y alphaçå¼
this.createEmptyMovieClip("mymc",1)
mymc.loadMovie("
https://gss0.bdstatic.com/70cFsjip0QIZ8tyhnq/img/logo-zhidao.gif")
mymc.onLoad=function(ok){
if(ok){
this.mymc._x=100//xåæ
this.mymc._y=100//yåæ
this.mymc._alpha=50//éæ度
this.mymc._visible=true//æ¾ç¤º
this.mymc.useHandCursor=false//ä¸è¦æå½¢
}}