เนื่องจากผมมีโปรเจทที่ทำให้ต้องมาเขียน action script3
ผมจึงลง flash player debug version ทั้งเครื่องที่ทำงานและเครื่องส่วนตัว
ทำให้ผมได้รู้สาเหตุที่แท้จริงที่ flash crash บ่อยๆ นั้นก็คือ programmer ที่เขียนเองนั้นล่ะ ส่วนใหญ่ไม่เขียน error handler พอมี runtime error ขึ้นมามันก็ค้างน่ะสิ และพอ flash ไม่รู้จะทำอะไรเพราะไม่มี error handler มันก็ crash น่ะสิครับ

แบบว่าผมพึ่งจะใช้ debug version มา 5 เดือนแต่เจอพวกเขียน program แบบไม่มี error handler เกือบทุกเว็บที่มี flash แม้แต่ youtube

แบบว่า /me facepalm

Hiring! บริษัทที่น่าสนใจ

Carmen Software company cover
Carmen Software
Hotel Financial Solutions
Next Innovation (Thailand) Co., Ltd. company cover
Next Innovation (Thailand) Co., Ltd.
We are web design with consulting & engineering services driven the future stronger and flexibility.
KKP Dime company cover
KKP Dime
KKP Dime บริษัทในเครือเกียรตินาคินภัทร
Kiatnakin Phatra Financial Group company cover
Kiatnakin Phatra Financial Group
Financial Service
Fastwork Technologies company cover
Fastwork Technologies
Fastwork.co เว็บไซต์ที่รวบรวม ฟรีแลนซ์ มืออาชีพจากหลากหลายสายงานไว้ในที่เดียวกัน
Thoughtworks Thailand company cover
Thoughtworks Thailand
Thoughtworks เป็นบริษัทที่ปรึกษาด้านเทคโนโยลีระดับโลกที่คว้า Great Place to Work 3 ปีซ้อน
Iron Software company cover
Iron Software
Iron Software is an American company providing a suite of .NET libraries by engineer for engineers.
CLEVERSE company cover
CLEVERSE
Cleverse is a Venture Builder. Our team builds several tech companies.
Nipa Cloud company cover
Nipa Cloud
#1 OpenStack cloud provider in Thailand with our own data center and software platform.
Bangmod Enterprise company cover
Bangmod Enterprise
The leader in Cloud Server and Hosting in Thailand.
CIMB THAI Bank company cover
CIMB THAI Bank
MOVING FORWARD WITH YOU - CIMB is the leading ASEAN Bank
Bangkok Bank company cover
Bangkok Bank
Bangkok Bank is one of Southeast Asia's largest regional banks, a market leader in business banking
MuvMi (Urban Mobility Tech Co.,Ltd.) company cover
MuvMi (Urban Mobility Tech Co.,Ltd.)
Shape the future of urban mobility towards affordable, clean, and safe solutions
T.N. Digital Solution Co., Ltd. company cover
T.N. Digital Solution Co., Ltd.
TNDS has been involving in every first move of banking’s major digital transformation.
KBTG - KASIKORN Business-Technology Group company cover
KBTG - KASIKORN Business-Technology Group
KBTG - "The Technology Company for Digital Business Innovation"
Siam Commercial Bank Public Company Limited company cover
Siam Commercial Bank Public Company Limited
"Let's start a brighter career future together"
Icon Framework co.,Ltd. company cover
Icon Framework co.,Ltd.
Global Standard Platform for Real Estate แพลตฟอร์มสำหรับธุรกิจอสังหาริมทรัพย์ครบวงจร มาตรฐานระดับโลก
REFINITIV company cover
REFINITIV
The Financial and Risk business of Thomson Reuters is now Refinitiv
H LAB company cover
H LAB
Re-engineering healthcare systems through intelligent platforms and system design.
The Gang Technology Co., Ltd. company cover
The Gang Technology Co., Ltd.
We're a Digital Agency that helps our customers transform their business into digital with ease.
LTMH company cover
LTMH
LTMH มุ่งเน้นการพัฒนาผลิตภัณฑ์ที่สามารถช่วยพันธมิตรของเราให้บรรลุเป้าหมาย
Seven Peaks company cover
Seven Peaks
We Drive Digital Transformation
Wisesight (Thailand) Co., Ltd. company cover
Wisesight (Thailand) Co., Ltd.
The Best Choice For Handling Social Media · High Expertise in Social Data · Most Advanced and Secure
MOLOG Tech company cover
MOLOG Tech
We are Modern Logistic Platform, Specialize in WMS, OMS and TMS.
Data Wow Co.,Ltd company cover
Data Wow Co.,Ltd
We enable our clients to realize increased productivity by solving their most complex issues by Data
LINE Company Thailand company cover
LINE Company Thailand
LINE, the world's hottest mobile messaging platform, offers free text and voice messaging + Call
LINE MAN Wongnai company cover
LINE MAN Wongnai
Join our journey to becoming No.1 food platform in Thailand

polawing Tue, 20/12/2011 - 12:40

AS3 มีความยืดหยุ่นของภาษามากเพราะเป็น ภาพ + code programmer จะต้องมีความเข้าใจ เป็นอย่างดีเกี่ยวกับ สิ่งที่ตัวเองกำลังจะเขียน ส่วนใหญ่ที่ค้าง เพราะ programmer สักแต่ว่าเขียน ๆให้ได้ผลตามที่ตัวเองต้องการ แต่ไม่สน อัลกอลิทึ่ม ว่าสิ่งที่ตัวเองคิดนั้นถูกต้องแล้วหรือยังครับ

function ของ flash ส่วนใหญ่นั้นทำงานได้แม้เราเขียนถูกต้องเพียง 50%ของ code ที่ควรจะเป้นแต่จะทำให้ค้างหาก คุณไม่ clear ค่ามัน เช่น Tween เป็นต้น และวิธีการเขียนอย่างถูกต้องและไม่ทำให้ กิน CPU นั้นจะต้องใช้ประสบการณ์ความเอาใจใส่มาก เพราะ flash คุณสามารถสร้างมันได้ทุกอย่าง แม้คุณกำลัง เขียน way ที่ผิดอยู่ก็ตาม

เรื่องคนเขียนโค๊ดห่วยนี่ยอมรับว่ามันมีจริงทุกที่ทุกภาษาครับ โดยเฉพาะการ optimize ต้องใช้ความรู้ความเข้าใจอย่างมาก แต่คนทั่วไปมักจะเอาแค่ให้มันรันได้เป็นพอ

บางครั้งมันก็ถูกจำกัดด้วยเวลาครับ เวลาที่เหลือน้อยทำให้โปรแกรมเมอร์หลายคนต้องตัดสินใจ ใช้วิธีทำให้งานจบเร็วมากกว่างานคุณภาพดีครับ

แต่เรื่องที่มี runtime error แล้วค้างนี่ผมว่าปัญหามันก็คงอยู่ที่ตัว adobe เองแล้วล่ะครับ
เพราะ framework ควรเป็นตัวดักจับ exception ที่หลุดรอดออกมาแล้วแจ้งเป็น message ให้ผู้ใช้งานรู้ครับ ไม่ใช่ค้างไปเลย

heart Tue, 20/12/2011 - 15:24

flashplayer debugger เป็นศัตรูกับ firefox นะครับ
บางครั้งโค้ดไม่ได้ทำให้ค้างอะไร แต่การเตือน error เล็กน้อยก็ทำให้ firefox ค้างได้
ไม่แน่ใจว่าใช้ firefox ในการเช็คหรือเปล่า

แต่ว่าต้องยอมรับว่า เป็นที่ผู้เขียนซะส่วนใหญ่ครับ ที่ทำให้เจอปัญหาแปลกๆประมาณนี้

เกี่ยวกับเวอร์ชั่นของ Flash,AS ที่ใช้เขียนด้วยครับ เว็บ Flash เวอร์ชั่นเก่าๆที่เขียนมานานแล้วมีอยู่เยอะมาก บาง function มันไม่ compatible กับ flash player รุ่นใหม่ ถ้าไม่มีดักจับ error ไว้ก็คง crash ล่ะครับ

ประเด็นนั้นคงไม่ถูกต้องนักครับ
คำสั่งเก่าๆ จะสามารถรันบนแฟลชเวอร์ชั่นใหม่ได้ทั้งหมดครับ

แต่คำสั่งใหม่ๆต่างหาก ที่จะไม่สามารถทำงานได้บนเวอร์ชั่นเก่า

ยกเว้นว่าคุณใช้สับสนกันระหว่างคำสั่งของ actionscript 1.0 , 2.0 และ 3.0 ซึ่งถ้าใช้ข้ามเวอร์ชั่นกัน มีผลแน่นอนครับ

ผมเจอบ่อยเลยล่ะ โค้ดตัวเดียวกันเอาไปคอมไพล์ผ่าน flash 8 กับ cs3 มันแสดงผลไม่เหมือนกัน ปัญหาเรื่องค่า z บ้าง ,Transparent บ้าง , root บ้าง ฯลฯ

ผมก็คิดว่าน่าจะเป็นที่ผมเขียนโค้ดไม่ถูกต้องด้วยล่ะมั้ง แต่ตอนผมเทสกับเวอร์ชั่นเก่าๆ มันไม่เจอปัญหาเลยนะ พอไปลองกับเวอร์ชั่นใหม่เจอประจำ

ไม่เสมอไปครับ เช่น Security Sandbox ซึ่งเพิ่งจะมีในช่วงเวอร์ชัน 9 หรือ 10 คือโปรแกรมเดิมยังรันได้อยู่ แต่ไม่ผ่านเรื่อง Secuiry เพราะไม่ได้เอา crossdomain.xml ไปวางบนเซิฟเวอร์ที่จะคุยด้วย

ผมว่าคนทำ flash ส่วนใหญ่เป็น graphic design มากกว่าเป็น programmer ซึ่งมี logic ดีกว่า ดังนั้นพอไปเขียนโปรแกรมมันก็เลยสุกเอาเผากิน

เหมือนเอาเว็บมาสเตอร์มาเขียน PHP แหละครับ ส่วนใหญ่โค้ดจะเละเทะ