method:Yahoo.util.Motion ( element, attributes, duration, method )
return type:Motion
content:ใช้สร้าง object Motion
example:var attributes = { points: { to: [ 600, 10 ] } };
var motion = new YAHOO.util.Motion ( "bamboo", attributes );
comment:ตัวแปร element คือ id ของ element หรือ dom element ที่ต้องการให้เกิดการกระทำนี้
ตัวแปร attributes คือ คำสั่งของ css ที่กำหนด attribute ได้แก่ to, by, from, units
ตัวแปร duration คือ กำหนดระยะเวลาที่เกิดการกระทำนี้ ( default = 1 )
ตัวแปร method คือ ฟังก์ชันที่จะทำงานในขณะเกิดการกระทำนี้ ( default = Yahoo.util.Easing.easeNone )