Terima kasih untuk jawabannya, bakal saya coba.
----- Original Message ---- From: irfani YangBaikHati <[EMAIL PROTECTED]> To: [email protected] Sent: Sunday, August 3, 2008 9:37:04 PM Subject: Re: [id-ruby] Bagaimana cara 1. Copy Ruby var array ke javascript array. 2. Flash integration? 1. pake to_json aja lebih mudah konvert ruby object ke js. kalo utk cth sperti diatas, AR object bisa langsung pake method to_json > @stories= Story.all.to_ json di view <script type="text/javascri pt"> var story_list = <%= @stories %>; for(i=0;i<story_ list.length; i++) { document.write( story_list[ i].story. url + story_list[i] .story.descripti on); } </script> bisa plih2 jg field apa aja di konversi ke json, liat APInya ActiveRecord kalo plain Ruby Object pake method encode ke json dari ActiveSupport Rails ActiveSupport: :JSON 2. get x y mouse dari flash bisa kan? saya ga pernah coba. dari flash jg create GET atau POST request bs kan ya? ya dikirim aja x,y nya ke method rails yg nanganin save ke DB ini doang yg saya mengerti. -- irfani http://irfani. web.id Y! irfani_s [Non-text portions of this message have been removed]

