1 / 4

圖層: actions, buttons , bkground

Sketch Pad. . 圖層: actions, buttons , bkground. 圖層: bkground. . clear. 圖層: buttons 插入  新增元件 ( 按鈕: button) 插入  新增元件 ( 按鈕: clrbtn). clear. 從元件庫把按鈕 (button, clrbtn) 拉入舞台. 為每個按鈕命名 ( 實體名稱 ) color Red , color Green , color Blue , clrbtn. 修改元件 (button) 之滑鼠滑入圖案為圓形. thickness = 0;

Télécharger la présentation

圖層: actions, buttons , bkground

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Sketch Pad  圖層:actions, buttons, bkground 圖層:bkground  clear 圖層:buttons 插入新增元件(按鈕:button) 插入新增元件(按鈕:clrbtn) clear 從元件庫把按鈕 (button, clrbtn) 拉入舞台 為每個按鈕命名(實體名稱) colorRed, colorGreen, colorBlue,clrbtn 修改元件 (button) 之滑鼠滑入圖案為圓形

  2. thickness = 0; colour = "0x000000"; pen_mc.startDrag(true); Mouse.hide(); _root.onMouseDown = startDrawing; _root.onMouseUp = stopDrawing; 圖層:actions, 按F9(動作) function startDrawing() { if (_xmouse<455) { _root.lineStyle(thickness, colour); _root.moveTo(_root._xmouse, _root._ymouse); _root.onMouseMove = drawLine; } } function drawLine() { _root.lineTo(this._xmouse, this._ymouse); } function stopDrawing() { delete this.onMouseMove; }

  3. _root.lineStyle(thickness, colour); 實體名稱.onPress colorRed.onPress = function() { colour = "0xFF0000"; } colorGreen.onPress = function() { colour = "0x00FF00"; } colorBlue.onPress = function() { colour = "0x0000FF"; } clrbtn.onPress = function() { _root.clear(); } colorYellow.onPress = function() { colour = "0xFFFF00"; } colorMagenta.onPress = function() { colour = "0xFF00FF"; } colorCyan.onPress = function() { colour = "0x00FFFF"; } colorBlack.onPress = function() { colour = "0x000000"; }

  4. _root.lineStyle(thickness, colour); 圖層:buttons 插入新增元件(按鈕) line0, line3, line6 line0.onPress = function() { thickness = 0; } line3.onPress = function() { thickness = 3; } line6.onPress = function() { thickness = 6; } thickness = 0; colour = "0x000000"; pen_mc.startDrag(true); Mouse.hide(); _root.onMouseDown = startDrawing; _root.onMouseUp = stopDrawing; 

More Related