Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Ruby



any one knows similarities and differences between AS and RUBY? or if
RUBY can be used/mixed with AS?

many thnx,

hog!!~~



ActionScript.org Forums > Flash General Questions > Other Flash General Questions
Posted on: 03-15-2005, 03:46 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

[F5] Using Ruby On Rails With Flash?
I am currently learning Ruby On Rails for work.

Does anyone know how to communicate with Flash/ActionScript using the Ruby on Rails framework??

FYI... We have Flash 5, but will be upgrading sometimes within the year once we get RoR going.

Thanks
Frank

Using Ruby In Place Of Actionscript
I love flash (design tools, stage / layout concepts, etc.), but I hate actionscript. I've been a programmer for about 10 years now, programming in everything from C to C#, java, php, perl, ruby, and actionscript. Actionscript is by far my least favorite of the group. It is a clumsy language (just have a look at the way actionscript 2 handled method closures on callbacks) and I'd prefer to use another scripting language in place of it for my flash development. Ruby would be an excellent replacement, offering everything actionscript has to offer (object oriented, event handling, etc.) with a number of additional features that come through ruby core and the ruby gems (excellent date and time libraries, database libraries, file handling libraries, etc.).

Does anyone with an in-depth knowledge of actionscript and flash know what it would take to achieve some sort of common language API that would allow such a substitution? If the ruby on rails guys came across a solution allowing them to leverage the benefits of ruby (superior language to actionscript) with the benefits of the flash platform (superior visual control to html/ajax), flash would be unstoppable.

LoadVars With Ruby On Post
howdy,

I recently built a flash uploader thats integrated into a rails app. seems to work fine only cant track what user goes with what file. so when i upload the file, i need to pass the ruby script a var.

i'm not totally sure on the syntax as well as the best place to put this in my AS. any help you guys can provide on the loadvars function id greatly appreciate it!

Flash, Ruby, And MYSQL
Hello,

I have recenltly started database integration with Flash and was wondering if anyone has any information, links, or tutorials on how to use Ruby with flash instead of PHP.
Is this even possible? Any information or a direction to start will help.

Thanks,

- Haxorbox
- http://www.haxorbox.com

Ruby On Rails & Actionscript
My boss, not tech savvy at all, just hired a new web developer that is nuts about Ruby on Rails (RoR). My boss hired him on the fact he was going to revamp our website with this new platform. I am a flash developer that has to create games and apps for this website, right now I am using AS3 & php/MySQL as well as a few AS3 & XML. Is AS3 able to communicate with RoRs, kind of like php?

I have never heard of this platform until now, and a little concerned it might be buggy &/or trouble. Any experience or advice with RoR. Hopefully, the new hirer isn't a bust. Thanks, everyone.

Ruby On Rails And Flash 8
Dear Sitepoint furormers,

I'm considering learning ruby on rails but as I know some of my clients will request web based application in Flash, I was wondering if it was possible to use ruby on rails instead of Php for example to do that.

I will also need to develop flash websites that my customers will be able to update themselves. Do you think that Ruby on rails can help me do that?

I know almost nothing in programming, basic action script, CSS, HTML and a little VB.net. That's why I'm considering Ruby on rails.

Thanks,

UHU - Laure

For Ruby Fans: Array.each
Ruby fans out there will appreciate the simplicity of the ruby .each method.

I have tried to replicate this as best I could in Flash.

One advantage of this method is that it handles both ordered arrays and hashed arrays correctly. If you use "for (var i in myArr)" syntax, this will not step through an ordered array in the correct order. Similarly, using "for (var i=0;i<myArr.length;i++)" will not work on hashes (also known as "indexed arrays").

Other than that, it doesn't really add any new capabilities, but I find the syntax far cleaner.


ActionScript Code:
Array.prototype.each = function(dis, fn) {
    if (this.length>0) {
        for (var i = 0; i<this.length; i++) {
            fn.apply(dis, [i, this[i]]);
        }
    } else {
        for (var i in this) {
            fn.apply(dis, [i, this[i]]);
        }
    }
};
Object.prototype.each = Array.prototype.each;
ASSetPropFlags(Array.prototype, null, 1);
ASSetPropFlags(Object.prototype, null, 1);
//----
trace("-----------regular array-----------");
vals = ["HORSE", "CAT", "DOG"];
vals.each(this, function (i, v) {
    trace(i+": "+v);
});
//---
trace("-----------hash (object)-----------");
hash = {cat:"dog", hot:"cold", fast:"slow"};
hash.each(this, function (i, v) {
    trace(i+": "+v);
});
//---
trace("-----------hash_array-----------");
hash_array = new Array();
hash_array.cat = "Dog";
hash_array.hello = "Goodbye";
hash_array.each(this, function (i, v) {
    trace(i+": "+v);
});

Ruby Controller Won't Redirect Page With Flash
hi everyone,

i was wondering if any of you might have some insight as to how to solve a problem that i am having. i am trying to build a site using ruby on rails and flash. i am trying to build a login page and i have my flash component with two text fields for user name and password. when the submit button is pressed, it sends the login info typed in to the text fields to the ruby controller via xml through a URLLoader. the controller then looks at this info and determines if it is correct or not and if it is, then it attempts to redirect the page in the view to another part of the website.

this is where the problem comes in. when the page is being redirected, it gets stuck and just says "transfering data from host" at the bottom but never redirects the page. this is all still on a local machine so it is not some sort of communication problem with the server. also if i replace the flash component with plain html it will redirect just fine. in addition to this, if i make it redirect from withen the flash component using navigateToURL that will work as well. the information is also getting sent correctly because it is setting off a COMPLETE event.

so i am at a bit of a loss as to why this is happening. i tried to search google at length and i have searched this site but i have not found any answers thus far. any ideas would be greatly appriciated. i can post code if it helps.

thanks,

chris

Problems W/ Ruby On Rails And Datagrid Images And Css Style Sheets
Hello,
I'm developing some flash programs that use datagrids w/ HtmlCellRenderer that allows for embedded images w/in datagrid cells and also
calls an external css stylesheet w/in a rails environment

The problem is that every call to the image in the datagrid is registered as a GET call w/in the rails environment and the image path is registered
as an id param as such:

Processing ArtistController#tune_widget_popup (for 71.120.222.79 at 2007-12-28 13:50:58 by 14585) [GET]
Session ID: 59ede4facabee1ac6f36fb3ca9aa1685
Parameters: {"action"=>"tune_widget_popup", "id"=>"about.jpg", "controller"=>"artist"}

The image never gets rendered in the datagrid

The same happens w/ the .css file - it gets registered as a GET call, the css attributes don't show up, and the name is attributed to the id param as such:

Parameters: {"action"=>"tune_widget_popup", "id"=>"feed_widget.css", "controller"=>"artist"}

Any ideas how to work around this?

Thanks,
Clem C

Problems W/ Ruby On Rails And Datagrid Images And Css Style Sheets
Hello,
    I'm developing some flash programs that use datagrids w/ HtmlCellRenderer that allows for embedded images w/in datagrid cells and also
calls an external css stylesheet w/in a rails environment

The problem is that every call to the image in the datagrid is  registered as a GET call w/in the rails environment and the image path is registered
as an id param as such:

Processing ArtistController#tune_widget_popup (for 71.120.222.79 at 2007-12-28 13:50:58 by 14585) [GET]
  Session ID: 59ede4facabee1ac6f36fb3ca9aa1685
  Parameters: {"action"=>"tune_widget_popup", "id"=>"about.jpg", "controller"=>"artist"}

The image never gets rendered in the datagrid

The same happens w/ the .css file - it gets registered as a GET call, the css attributes don't show up,  and the name is attributed to the id param as such:

 Parameters: {"action"=>"tune_widget_popup", "id"=>"feed_widget.css", "controller"=>"artist"}

Any ideas how to work around this?

Thanks,
Clem C

Copyright © 2005-08 www.BigResource.com, All rights reserved