From Test-Scratch-Wiki

視訊設為 ()
視訊設為 [開啟 v]
類別 偵測類積木
形狀 條形積木
加入於 2.0

The Turn Video () 積木 is a 偵測類積木 and a 條形積木. It can turn the webcam on, off, or on flipped horizontally, depending on the 參數. Early in the Scratch 2.0 alpha, it was categorized as a 外觀類積木.


Note Caution: This block can turn on the computer's webcam. If you are uncomfortable with using a webcam for safety, avoid usage of this block or click "Deny" on the Adobe Flash Player warning if one pops up.

Options

The block contains a drop-down list of three options.

  • On

— Turns the webcam on for utilization of the motion-sensing features in Scratch 2.0.

  • Off

— Turns the webcam off which will cause the constant film pasted onto the 舞台 to remove.

  • On-flipped

— Turns the webcam on but displays the video footage in a horizontally flipped form. This option is not available in the stage but only in sprites.

用法示例

  • Showing the user what they look like
當 @greenflag 被點擊
視訊設為 [開啟 v]
  • Turning the video on, to use the motion
當 @greenflag 被點擊 // in Stage
視訊設為 [開啟 v]

當 @greenflag 被點擊 // in a sprite
重複無限次 
  移動 (視訊 [動作 v] \( [舞台 v] \)) 點
  碰到邊緣就反彈
end

參見

Cookies help us deliver our services. By using our services, you agree to our use of cookies.