Well, here is the first public release of Alph:
Alph is a Ruby/Java/Flash (I know...I am insane) that bridges the Ruby and Flash runtimes (and Java too...but that is to solve the cross-platform projector problem that Macromedia will not solve.) With Alph and Ruby (>= 1.8.1) you can create Flash user interfaces (forms, etc) that are fully coded in, and controlled by Ruby. No Actionscript required, no Flash IDE required, just Ruby (and those dependent runtimes). Here is a simple ruby script:
This example demonstrates the List Box family of components (ComboBox, ListBox, Grid). See: http://www.ultrashock.com/tutorials/flashmx2004/ui-components06.php
$:.unshift '../lib' require 'alph' app = Alph::Application.new frame = app.new_frame frame.control.setBounds(100, 100, 640, 480)
flash = frame.flash myComboBox = flash.new_component("mx.controls.ComboBox", :editable=>false, :rowCount=>5, :_x=> 14, :_y=>26, :_width=>291, :_height=>22) myComboBox.labels = ['Organic Snacks', 'Recycled Office Paper', 'Wind Energy', 'Solar Power'] myComboBox.change do |event| # The myComboBox.selectedItem method returns # the label (not an object) because the data is not set. puts "You selected #{myComboBox.selectedItem}." end myList = flash.new_component("mx.controls.List", :_x=> 14, :_y=>66, :_width=>291, :_height=>120) # Data provider is an array of anonymous objects (label/data) myList.dataProvider = [ {:label=> "Organic cotton underwear", :data=> 7.25}, {:label=> "Organic T-Shirt", :data=> 15}, {:label=> "Recycled Office Paper", :data=> 6.99}, {:label=> "Organic Cola", :data=> 1.25} ] myList.change do |event| # The myList.selectedItem method returns an object with # a label and data property because the data _is_ set. item = myList.selectedItem puts "#{item.label} costs $#{item.data}" end myDataGrid = flash.new_component("mx.controls.DataGrid", :_x=> 14, :_y=>200, :_width=>291, :_height=>120) # Column names align with column ids myDataGrid.setColumnNames( ["Product", "Price", "Quantity"] ) # Data provider is an array of anonymous objects (keys = column ids) myDataGrid.dataProvider = [ {:Product=> "Underwear", :Price=> 7.25, :Quantity=> 3}, {:Product=> "T-Shirt", :Price=> 15, :Quantity=> 1}, {:Product=> "Paper", :Price=> 6.99, :Quantity=> 7}, {:Product=> "Cola", :Price=> 1.25, :Quantity=> 24} ] myDataGrid.change do |event| # The myDataGrid.selectedItem method returns the anonymous object item = myDataGrid.selectedItem puts "#{item.Product} costs $#{item.Price} (#{item.Quantity} left in stock)" end # You can rename column names by index myDataGrid.getColumnAt(0).headerText = "Product Name"; myDataGrid.getColumnAt(1).headerText = "Price"; myDataGrid.getColumnAt(2).headerText = "Quantity Left"; flash.new_component("mx.controls.Button", :label=>" Close", :_x=>380, :_y=>89, :_width=>120, :_height=>35, :icon=>"icon_16x16_warning") do |closeButton| closeButton.click do frame.control.close exit end end
frame.control.show app.wait_until_done
Pretty sweet eh?
Go download it, and let me know what you think.
From what I read on the wiki it appears that the examples only work with the stand alone Flash Projector. Is there an easy way to get this to work on the web as well? Or does that already work?
Just curious, I haven't tried the examples on my own machine yet but will give it a go very soon. This has great potential!
Posted by: Wally Atkins | Tuesday, October 05, 2004 at 09:42 AM
This works on the standalone player/projector I created. The Web thing is easy though, I will likely post how to do that soon (the current code is focused on local execution).
Posted by: Richard Kilmer | Tuesday, October 05, 2004 at 12:11 PM
Hi sounds really interesting I was trying to work out how to get ming/ruby running and came accoss this, not yet done any ruby yet but it is installed on my pc under XP and I have the pixaxes 2 book can you give me a really simple explaination into getting this running on my local machine?
Many thanks
Justin
Posted by: JLM | Sunday, November 28, 2004 at 07:16 PM
I could not get the required SWT runtime from eclipse.org.
Where do I get this? Do I need to have Eclipse installed ?
Posted by: anon | Tuesday, November 30, 2004 at 06:33 PM
This project sounds really interesting. I just got started with doing ActionScript for work, but I'd like to work with Ruby instead. I installed the JRE1.4, SWT runtime and the other components, but I run the examples I get an exception about the "Browser" class being undefined on line 72 of Obsidian.java. Do I have to have Eclipse SDK installed? Also, in the latest SWT runtime "swt-pi.jar" doesn't exist.
Posted by: Don Quach | Wednesday, December 08, 2004 at 04:12 PM
Hi,
The Alph project looks and sounds great! Would it be possible to use this with the Ruby Application framework "Arrow"? Would it be possible to access code libraries that a flashprojector/flash web player imports? I think when that works one could build powerful Webservice applications with Alph. I wish you luck on this project, keep it up!
Sharriff
Posted by: Sharriff | Sunday, February 20, 2005 at 02:22 PM
This looks incredibly promising as well as wicked cool, but the wiki is hosed. Can you provide an alternate download link? I just found Ruby and ROR the past couple weeks, but I primarily develop desktop and rich client apps. This would totally be something I could use!
Posted by: Jason Foreman | Tuesday, March 29, 2005 at 04:54 PM
the alph wiki has been spammed. are you stil working on this project?
Posted by: oliver oli | Monday, July 25, 2005 at 09:54 AM
Rich, this looks great - unbelievably seems to have passed with little note in the Macromedia development community. let me know if/how we can help with this project.
Thanks,
Robin
Posted by: Robin Hilliard | Tuesday, August 09, 2005 at 09:33 AM
I'd be very interested in looking at this, but alph.rubyforge.net is very broken. Where is the download now?
Posted by: Mike Pearson | Wednesday, April 12, 2006 at 09:23 AM
The wiki on rubyforge is completely spammed. I tried to reverse a revision, but it seems the spammers managed to remove these too.
Posted by: Bèr | Monday, May 15, 2006 at 05:46 AM
I'm always into discussions on anything organic, so this read made me feel at home.
I'll bookmark the site and subscribe to the feed!
Posted by: Acai Berry Detox | Sunday, August 24, 2008 at 04:34 PM
I'm always into discussions on anything organic, so this read made me feel at home.
Posted by: ghd | Thursday, March 17, 2011 at 04:32 AM
This is a good article, thank you for your share.
Posted by: cheap Oakley Half Wire 2.0 | Monday, June 20, 2011 at 10:38 PM
радикулит острый
Posted by: Draissele | Tuesday, December 13, 2011 at 04:06 AM
9.07.2011 года, мною был приобретен диван «Амстердам» в интернет магазине http://www.good-mebel.com
Товар был доставлен 5.08.2011 года ненадлежащего качества, была составлена претензия.
Менеджер рекламации не посчитала нужным связаться со мной по существу заявленной претензии. Позвонила менеджер рекламации фабрики Татьяна ,с которой мы обговорили возможность замены деталей .
Замена деталей произошла 21.09.2011, но цвет детали отличался, произошел разнотон тканей.
отдел рекламации http://www.good-mebel.com » в очередной раз не удосужился даже позвонить мне в целях урегулирования спора, связь поддерживалась через менеджера Татьяну.(фабрика).
Мне было предложено заменить диван целиком, я согласилась. 22.10.11 года диван заменили, но в новом диване оказались те самые старые детали с той самой дырой, в том же самом месте.
Звонка из магазина « http://www.good-mebel.com » в очередной раз не последовало. И в очередной раз мне позвонила менеджер Татьяна(фабрика). И вот наконец звонок рекламации магазин 1.11.2011 года поступил от неизвестной, которая с угрозами начала свой диалог о том, что мне не положено никаких возмещений и если я подам в суд то проиграю.
2.11.11 года я безуспешно пыталась дозвониться до менеджера рекламации . Оператор отдела рекламации пояснила мне, что все претензии устранены. Однако это не соответствует действительности.Мне было обещано ., что до конца дня со мной свяжутся и урегулируют спор. Однако звонка не последовало.
3.11.11 товар бал вывезен. Написала очередную претензию от 18.11.11 сегодня позвонила узнать результат так конкретного ответа не услышала. буду подавать в суд.
Не стоит связываться с " http://www.good-mebel.com . Поберегите свои нервы и силы.
Posted by: Acrocaiva | Thursday, January 05, 2012 at 04:20 AM