<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>สุขสันต์ Archives - KarnLab</title>
	<atom:link href="https://karnlab.com/tag/%e0%b8%aa%e0%b8%b8%e0%b8%82%e0%b8%aa%e0%b8%b1%e0%b8%99%e0%b8%95%e0%b9%8c/feed/" rel="self" type="application/rss+xml" />
	<link>https://karnlab.com/tag/สุขสันต์/</link>
	<description>Blog รีวิว หนังสือ เขียนโปรแกรม นานาสาระ</description>
	<lastBuildDate>Sat, 19 Jan 2019 10:13:26 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0</generator>

<image>
	<url>https://karnlab.com/wp-content/uploads/2017/12/Logo-150x150.png</url>
	<title>สุขสันต์ Archives - KarnLab</title>
	<link>https://karnlab.com/tag/สุขสันต์/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>สร้างเกมส์ด้วย Scratch : ตอนที่ 3 สุขสันต์วันเกิด</title>
		<link>https://karnlab.com/scratch-ep3-happy-birthday/</link>
					<comments>https://karnlab.com/scratch-ep3-happy-birthday/#respond</comments>
		
		<dc:creator><![CDATA[Admin]]></dc:creator>
		<pubDate>Sat, 19 Jan 2019 10:13:26 +0000</pubDate>
				<category><![CDATA[สอนเขียนโปรแกรม]]></category>
		<category><![CDATA[Birthday]]></category>
		<category><![CDATA[Games]]></category>
		<category><![CDATA[Happy]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Scratch]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[บทเรียน]]></category>
		<category><![CDATA[วันเกิด]]></category>
		<category><![CDATA[สุขสันต์]]></category>
		<category><![CDATA[เกมส์]]></category>
		<category><![CDATA[โปรแกรม]]></category>
		<guid isPermaLink="false">http://karnlab.com/?p=1907</guid>

					<description><![CDATA[<p>สวัสดีครับน้องๆ ทุกคนครับ วันนี้เราจะมาสร้าง Happy Birthday Card แบบ interactive กันครับ 🙂 สำหรับวิธีการใช้งานโปรแกรม Scratch – น้องๆ สามารถอ่านได้ที่ https://karnlab.com/scratch-ep1-lets-start/ &#160; ใส่พื้นหลัง ที่แถบ Sprites [&#8230;]</p>
<p>The post <a href="https://karnlab.com/scratch-ep3-happy-birthday/">สร้างเกมส์ด้วย Scratch : ตอนที่ 3 สุขสันต์วันเกิด</a> appeared first on <a href="https://karnlab.com">KarnLab</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>สวัสดีครับน้องๆ ทุกคนครับ วันนี้เราจะมาสร้าง Happy Birthday Card แบบ interactive กันครับ <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
<p>สำหรับวิธีการใช้งานโปรแกรม Scratch – น้องๆ สามารถอ่านได้ที่ <a href="https://karnlab.com/scratch-ep1-lets-start/">https://karnlab.com/scratch-ep1-lets-start/</a></p>
<p>&nbsp;</p>
<h2>ใส่พื้นหลัง</h2>
<ol>
<li>ที่แถบ Sprites ข้างล่างข้อความ New Backdrop คลิกไอคอนรูปภาพ</li>
</ol>
<figure id="attachment_1891" aria-describedby="caption-attachment-1891" style="width: 492px" class="wp-caption alignnone"><img fetchpriority="high" decoding="async" class="size-full wp-image-1891" src="https://karnlab.com/wp-content/uploads/2019/01/Scratch-EP3-1.jpg" alt="Scratch - EP3 (1)" width="492" height="183" /><figcaption id="caption-attachment-1891" class="wp-caption-text">Scratch &#8211; EP3 (1)</figcaption></figure>
<ol start="2">
<li>จากนั้นเลือกพื้นหลังที่ต้องการ แล้วกดปุ่ม OK – เราจะเห็นพื้นหลังที่เราเลือกปรากฏที่ Stage</li>
</ol>
<figure id="attachment_1892" aria-describedby="caption-attachment-1892" style="width: 1322px" class="wp-caption alignnone"><img decoding="async" class="size-full wp-image-1892" src="https://karnlab.com/wp-content/uploads/2019/01/Scratch-EP3-2.jpg" alt="Scratch - EP3 (2)" width="1322" height="662" /><figcaption id="caption-attachment-1892" class="wp-caption-text">Scratch &#8211; EP3 (2)</figcaption></figure>
<p>&nbsp;</p>
<h2>เปลี่ยนสีพื้นหลัง</h2>
<ol start="3">
<li>คลิกที่แถบ Scripts – พร้อมกับเช็คว่า Stage (ที่แถบ Sprites) กำลังถูกเลือกอยู่</li>
</ol>
<figure id="attachment_1893" aria-describedby="caption-attachment-1893" style="width: 721px" class="wp-caption alignnone"><img decoding="async" class="size-full wp-image-1893" src="https://karnlab.com/wp-content/uploads/2019/01/Scratch-EP3-3.jpg" alt="Scratch - EP3 (3)" width="721" height="595" /><figcaption id="caption-attachment-1893" class="wp-caption-text">Scratch &#8211; EP3 (3)</figcaption></figure>
<ol start="4">
<li>เพิ่ม Scripts เปลี่ยนสีพื้นหลัง</li>
</ol>
<p>4.1) ที่แถบ Scripts ให้คลิกที่คำว่า Events (สีน้ำตาล) – ให้ลากกล่อง [ when Stage clicked ] มาที่พื้นที่ว่างด้านขวา</p>
<p>4.2) ที่แถบ Scripts ให้คลิกที่คำว่า Looks (สีม่วง) – ให้ลากกล่อง [ change color effect by 25 ] มาต่อข้างล่างกล่องที่แล้ว</p>
<figure id="attachment_1894" aria-describedby="caption-attachment-1894" style="width: 1032px" class="wp-caption alignnone"><img loading="lazy" decoding="async" class="size-full wp-image-1894" src="https://karnlab.com/wp-content/uploads/2019/01/Scratch-EP3-4.jpg" alt="Scratch - EP3 (4)" width="1032" height="627" /><figcaption id="caption-attachment-1894" class="wp-caption-text">Scratch &#8211; EP3 (4)</figcaption></figure>
<p>เมื่อเราลองคลิกที่พื้นหลังก็จะพบว่าสีเปลี่ยนไปครับ</p>
<figure id="attachment_1895" aria-describedby="caption-attachment-1895" style="width: 719px" class="wp-caption alignnone"><img loading="lazy" decoding="async" class="size-full wp-image-1895" src="https://karnlab.com/wp-content/uploads/2019/01/Scratch-EP3-5.jpg" alt="Scratch - EP3 (5)" width="719" height="453" /><figcaption id="caption-attachment-1895" class="wp-caption-text">Scratch &#8211; EP3 (5)</figcaption></figure>
<p>&nbsp;</p>
<h2>เพิ่มตัวละคร</h2>
<ol start="5">
<li>ที่แถบ Sprites ข้างขวาข้อความ New Sprite คลิกไอคอนตัวละคร</li>
</ol>
<figure id="attachment_1896" aria-describedby="caption-attachment-1896" style="width: 492px" class="wp-caption alignnone"><img loading="lazy" decoding="async" class="size-full wp-image-1896" src="https://karnlab.com/wp-content/uploads/2019/01/Scratch-EP3-6.jpg" alt="Scratch - EP3 (6)" width="492" height="179" /><figcaption id="caption-attachment-1896" class="wp-caption-text">Scratch &#8211; EP3 (6)</figcaption></figure>
<p>จากนั้นเลือกตัวละครที่ต้องการ แล้วกดปุ่ม OK ครับ</p>
<figure id="attachment_1897" aria-describedby="caption-attachment-1897" style="width: 1331px" class="wp-caption alignnone"><img loading="lazy" decoding="async" class="size-full wp-image-1897" src="https://karnlab.com/wp-content/uploads/2019/01/Scratch-EP3-7.jpg" alt="Scratch - EP3 (7)" width="1331" height="665" /><figcaption id="caption-attachment-1897" class="wp-caption-text">Scratch &#8211; EP3 (7)</figcaption></figure>
<p>คลิกลากตัวละครบน Stage เพื่อปรับตำแหน่งให้สวยงามครับ</p>
<figure id="attachment_1898" aria-describedby="caption-attachment-1898" style="width: 718px" class="wp-caption alignnone"><img loading="lazy" decoding="async" class="size-full wp-image-1898" src="https://karnlab.com/wp-content/uploads/2019/01/Scratch-EP3-8.jpg" alt="Scratch - EP3 (8)" width="718" height="627" /><figcaption id="caption-attachment-1898" class="wp-caption-text">Scratch &#8211; EP3 (8)</figcaption></figure>
<p>&nbsp;</p>
<h2>พูดทักทาย</h2>
<ol start="6">
<li>คลิกเลือกตัวละครที่ต้องการ (ที่แถบ Sprites) – จากนั้นสร้าง Script</li>
</ol>
<p>6.1) ที่แถบ Scripts ให้คลิกที่คำว่า Events (สีน้ำตาล) – ให้ลากกล่อง [ when Green Flag clicked ] มาที่พื้นที่ว่างด้านขวา</p>
<p>6.2) ที่แถบ Scripts ให้คลิกที่คำว่า Looks (สีม่วง) – ให้ลากกล่อง [ say Hello! for 2 secs ] มาต่อข้างล่างกล่องที่แล้ว – จากนั้นเปลี่ยนข้อความ จาก Hello! เป็น Happy Birthday!</p>
<figure id="attachment_1899" aria-describedby="caption-attachment-1899" style="width: 967px" class="wp-caption alignnone"><img loading="lazy" decoding="async" class="size-full wp-image-1899" src="https://karnlab.com/wp-content/uploads/2019/01/Scratch-EP3-9.jpg" alt="Scratch - EP3 (9)" width="967" height="626" /><figcaption id="caption-attachment-1899" class="wp-caption-text">Scratch &#8211; EP3 (9)</figcaption></figure>
<p>&nbsp;</p>
<h2>เล่นดนตรี</h2>
<ol start="7">
<li>แต่งานวันเกิดจะขาดเค้กไม่ได้ เราต้องเพิ่มเค้กก่อนครับ – ที่แถบ Sprites ข้างขวาข้อความ New Sprite คลิกไอคอนตัวละคร – จากนั้นเลือกเค้กที่ต้องการ แล้วจัดตำแหน่งให้สวยงามครับ</li>
</ol>
<figure id="attachment_1900" aria-describedby="caption-attachment-1900" style="width: 1321px" class="wp-caption alignnone"><img loading="lazy" decoding="async" class="size-full wp-image-1900" src="https://karnlab.com/wp-content/uploads/2019/01/Scratch-EP3-10.jpg" alt="Scratch - EP3 (10)" width="1321" height="664" /><figcaption id="caption-attachment-1900" class="wp-caption-text">Scratch &#8211; EP3 (10)</figcaption></figure>
<figure id="attachment_1901" aria-describedby="caption-attachment-1901" style="width: 738px" class="wp-caption alignnone"><img loading="lazy" decoding="async" class="size-full wp-image-1901" src="https://karnlab.com/wp-content/uploads/2019/01/Scratch-EP3-11.jpg" alt="Scratch - EP3 (11)" width="738" height="619" /><figcaption id="caption-attachment-1901" class="wp-caption-text">Scratch &#8211; EP3 (11)</figcaption></figure>
<p>&nbsp;</p>
<ol start="8">
<li>เพิ่มเสียงเพลง</li>
</ol>
<p>8.1) ที่แถบ Scripts ให้คลิกที่คำว่า Events (สีน้ำตาล) – ให้ลากกล่อง [ when this Sprite clicked ] มาที่พื้นที่ว่างด้านขวา</p>
<p>8.2) ที่แถบ Scripts ให้คลิกที่คำว่า Sound (สีม่วง) – ให้ลากกล่อง [ play sound birthday song ] มาต่อข้างล่างกล่องที่แล้ว – ลองคลิกที่เค้ก เราจะได้ยินเพลง Happy Birthday ครับ (อย่าลืมเปิดลำโพงด้วยนะ)</p>
<figure id="attachment_1902" aria-describedby="caption-attachment-1902" style="width: 963px" class="wp-caption alignnone"><img loading="lazy" decoding="async" class="size-full wp-image-1902" src="https://karnlab.com/wp-content/uploads/2019/01/Scratch-EP3-12.jpg" alt="Scratch - EP3 (12)" width="963" height="633" /><figcaption id="caption-attachment-1902" class="wp-caption-text">Scratch &#8211; EP3 (12)</figcaption></figure>
<p>&nbsp;</p>
<h2>ใส่การเคลื่อนไหว</h2>
<ol start="9">
<li>9. คลิกเลือก Sprite ที่ต้องการ จากนั้นใส่ Script ต่อไปนี้</li>
</ol>
<p>9.1) ที่แถบ Scripts ให้คลิกที่คำว่า Events (สีน้ำตาล) – ให้ลากกล่อง [ when this Sprite clicked ] มาที่พื้นที่ว่างด้านขวา</p>
<p>9.2) ที่แถบ Scripts ให้คลิกที่คำว่า Looks (สีม่วง) – ให้ลากกล่อง [ change size by 10 ] มาต่อข้างล่างกล่องที่แล้ว</p>
<p>9.3) ที่แถบ Scripts ให้คลิกที่คำว่า Control (สีส้ม) – ให้ลากกล่อง [ wait 1 sec ] มาต่อข้างล่างกล่องที่แล้ว</p>
<p>9.4) ที่แถบ Scripts ให้คลิกที่คำว่า Looks (สีม่วง) – ให้ลากกล่อง [ change size by 10 ] มาต่อข้างล่างกล่องที่แล้ว – เปลี่ยนตัวเลข จาก 10 เป็น -10</p>
<p>9.5) ที่แถบ Scripts ให้คลิกที่คำว่า Control (สีส้ม) – ให้ลากกล่อง [ wait 1 sec ] มาต่อข้างล่างกล่องที่แล้ว</p>
<p>ลองคลิกที่รูปเค้ก แล้วสังเกตผลลัพธ์ครับ</p>
<figure id="attachment_1903" aria-describedby="caption-attachment-1903" style="width: 963px" class="wp-caption alignnone"><img loading="lazy" decoding="async" class="size-full wp-image-1903" src="https://karnlab.com/wp-content/uploads/2019/01/Scratch-EP3-13.jpg" alt="Scratch - EP3 (13)" width="963" height="627" /><figcaption id="caption-attachment-1903" class="wp-caption-text">Scratch &#8211; EP3 (13)</figcaption></figure>
<p>&nbsp;</p>
<h2>ทำซ้ำ</h2>
<ol start="10">
<li>เพื่อที่จะทำให้เค้กของเราดุ๊กดิ๊กซ้ำๆ เราต้องเพิ่มคำสั่ง repeat ครับ – ที่แถบ Scripts ให้คลิกที่คำว่า Control (สีส้ม) – ให้ลากกล่อง [ repeat 10 ] มาครอบคำสั่งในข้อที่ 9 – แล้วเปลี่ยนตัวเลข จาก 10 เป็น 4 (ดังภาพด้านล่าง)</li>
</ol>
<figure id="attachment_1904" aria-describedby="caption-attachment-1904" style="width: 956px" class="wp-caption alignnone"><img loading="lazy" decoding="async" class="size-full wp-image-1904" src="https://karnlab.com/wp-content/uploads/2019/01/Scratch-EP3-14.jpg" alt="Scratch - EP3 (14)" width="956" height="621" /><figcaption id="caption-attachment-1904" class="wp-caption-text">Scratch &#8211; EP3 (14)</figcaption></figure>
<p>เมื่อเราคลิกที่รูปเค้ก เค้กของเราก็จะดุ๊กดิ๊กนานขึ้นจนจบเพลงครับ</p>
<p>&nbsp;</p>
<h2>หมุนรอบๆ</h2>
<ol start="11">
<li>สุดท้ายเราจะมาทำให้ตัวละครหมุนรอบตัวเองกันครับ – เลือกตัวละคร (Sprite) ที่ต้องการ จากนั้นใส่ Script ดังนี้</li>
</ol>
<p>11.1) ที่แถบ Scripts ให้คลิกที่คำว่า Events (สีน้ำตาล) – ให้ลากกล่อง [ when this Sprite clicked ] มาที่พื้นที่ว่างด้านขวา</p>
<p>11.2) ที่แถบ Scripts ให้คลิกที่คำว่า Motion (สีน้ำเงิน) – ให้ลากกล่อง [ turn right 15 degrees ] มาต่อข้างล่างกล่องที่แล้ว</p>
<p>11.3) ที่แถบ Scripts ให้คลิกที่คำว่า Control (สีส้ม) – ให้ลากกล่อง [ repeat 10 ] มาครอบคำสั่ง [ turn right 15 degrees ] – แล้วเปลี่ยนตัวเลข จาก repeat 10 เป็น repeat 24 (ดังภาพด้านล่าง)</p>
<figure id="attachment_1905" aria-describedby="caption-attachment-1905" style="width: 958px" class="wp-caption alignnone"><img loading="lazy" decoding="async" class="size-full wp-image-1905" src="https://karnlab.com/wp-content/uploads/2019/01/Scratch-EP3-15.jpg" alt="Scratch - EP3 (15)" width="958" height="619" /><figcaption id="caption-attachment-1905" class="wp-caption-text">Scratch &#8211; EP3 (15)</figcaption></figure>
<p>เมื่อเราคลิกที่ตัวละคร ก็จะพบว่าตัวละครหมุน 360 องศาครับ</p>
<figure id="attachment_1906" aria-describedby="caption-attachment-1906" style="width: 495px" class="wp-caption alignnone"><img loading="lazy" decoding="async" class="size-full wp-image-1906" src="https://karnlab.com/wp-content/uploads/2019/01/Scratch-EP3-16.jpg" alt="Scratch - EP3 (16)" width="495" height="425" /><figcaption id="caption-attachment-1906" class="wp-caption-text">Scratch &#8211; EP3 (16)</figcaption></figure>
<p>&nbsp;</p>
<p>น้องๆ สามารถติดตามสร้างเกมส์ด้วย Scratch ตอนต่อไปได้ที่นี่ครับ <a href="https://karnlab.com/tag/scratch/">https://karnlab.com/tag/scratch/</a></p>
<p>สำหรับโปรเจคทั้งหมด สามารถเข้าไปเยี่ยมชมได้ที่นี่ครับ <a href="https://scratch.mit.edu/users/doctorkarn/">https://scratch.mit.edu/users/doctorkarn/</a></p>
<p><strong>หมายเหตุ:</strong> บทเรียนนี้เขียนตอน Scratch 2.0 นะครับ ตอนนี้เป็น Scratch 3.0 แล้ว อาจจะมีบางส่วนเปลี่ยนไปบ้าง แต่คำสั่งส่วนใหญ่ยังเหมือนเดิมครับ</p>
<p>The post <a href="https://karnlab.com/scratch-ep3-happy-birthday/">สร้างเกมส์ด้วย Scratch : ตอนที่ 3 สุขสันต์วันเกิด</a> appeared first on <a href="https://karnlab.com">KarnLab</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://karnlab.com/scratch-ep3-happy-birthday/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/?utm_source=w3tc&utm_medium=footer_comment&utm_campaign=free_plugin

Page Caching using Disk: Enhanced 

Served from: karnlab.com @ 2026-06-23 17:15:44 by W3 Total Cache
-->