A Flash Developer Resource Site

Page 1 of 2 12 LastLast
Results 1 to 20 of 21

Thread: Flash / SQL Component Kit is available

  1. #1
    Senior Member
    Join Date
    Oct 2000
    Posts
    310
    YOu may download it and view the documentation for it(all 40 pages) at:

    http://www.markme.com/as/flashsql/

    What is the Flash / SQL component kit you ask?

    The FlashSQL component kit is a collection of client side ActionScript objects, and server side tags that work together to allow users to execute SQL database queries from within Flash 5, and then manipulate the results of the query within Flash 5 through a Java like ResultSet object.

    The kit includes both Cold Fusion and JSP custom tags, as well as PHP code that allow you to use these languages as the server side level of the architecture. In addition, this document describes what is necessary in order to use other middleware languages such as ASP and Perl as the server side part of this architecture.


    What does the code look like to execut a database query from flash?

    s = new Sql();
    s.sqlOnData = mySqlOnData;
    s.setServerUrl("http://localhost/test/FlashSQL.cfm");

    if(!s.isActive())
    {
    s.execute("select * from Weather");
    }


    have fun...

    mike chambers

  2. #2
    Senior Member
    Join Date
    Feb 2001
    Posts
    475
    hm... looks like cool stuff.
    I'll give it try tomorrow at work - lets see if it likes my Win2k, Apache, PHP4 and mySQL config
    Yours
    HTD

  3. #3
    Senior Member
    Join Date
    Oct 2000
    Posts
    310
    here are the php configurations i tested with:

    win 2000, php 4, apache 1.3.9, ODBC

    linux / red hat 6.2, php 4, apache 1.3.9, MySQL

    so you shouldn't have any problems (but let me know if you do).

    mike chambers

  4. #4
    Senior Member
    Join Date
    Feb 2001
    Posts
    475
    You're right... it works just fine, I tested it on our Server and on my machine. The AS, PHP and CF are very well designed (i can't tell if the JSP is too - i don't like java ) You have done a great job here, thank you!
    I'll tell you when we set up a Project on this FlashSQL thing. I think problems or ideas for new features only come up when it's used in "real-life"!

    Yours
    HTD

  5. #5
    Your site has a broken link for the string.as file in the "View Flash Objects" section.


  6. #6
    I like the sound of what you've done with this. A couple of questions:

    1. Since you are using the XML object, can I assume that the object doesn't really care what sort of data you are sending and retrieving? Doens't have to be XML at all, huh?

    2. Is the syntax the same for every type of middleware that you support? And the middleware (scripts) for CF, ASP, and PHP are all pre-written?)

    3. Were there any other reasons for using the XML object besides the ease of the load method? Seems you could have built that method yourself.

    4. How does the onData (callback?) function work? Is that a generalized version of onLoad for the XML object?

    Thanks!

  7. #7
    Senior Member
    Join Date
    Oct 2000
    Posts
    310
    Mike,

    Good questions.

    1. I am extending the XML object, but I am not sending and retrieving XML. I am sending a retrieving a string of data which I manually parse into a ResultSet object.

    I do this because it is significantly faster than loading and parsing XML.

    2. As far as the Flash ActionScript syntaz is concerned, yes, it is the same no matter what the server side code. All of the server side components i wrote (JSP, Cold Fusion, and PHP) basically work the same with some minor differences (which are documented).

    3. see 1. I basically did build the method myself.

    4. onData is an undocumented method that is called once all of the data is loaded. THe reason I extended the XML object is so that I could use its onData method, and the have the user define their own so i could pass the data to them.

    mike chambers


  8. #8
    Senior Member
    Join Date
    Oct 2000
    Posts
    310
    I know about the broken link for the string.as file. Branden has been doing some work on his web server, so the link should be fixed soon.

    the string.as is included with the download though.

    mike chambers


  9. #9
    Originally posted by MikeChambers

    4. onData is an undocumented method that is called once all of the data is loaded. THe reason I extended the XML object is so that I could use its onData method, and the have the user define their own so i could pass the data to them.
    I've been trying to gather more information about the XML object and XMLNode object.... more of the undocumented information. Do you know any other methods or properties for these objects that isn't referred to by Macromedia?


  10. #10
    Senior Member
    Join Date
    Oct 2000
    Posts
    310
    none that come to mind...

    you should check out:

    ActionScript the Definitive Guide

    by Colin Moock

    http://www.amazon.com/exec/obidos/ASIN/1565928520

    It covers everything, and i mean everything, there is to know about ActionScript.

    mike chambers

    mesh@macromedia.com

  11. #11
    Thanks for the book reference. I just looked at that yesterday. There is some great info in there -- seems to be the most technical book I've seen about Flash.

  12. #12
    Junior Member
    Join Date
    May 2001
    Posts
    5

    FlashSQL Kit - middleware

    Mike, Thanx for the flashSQL Kit. Haven't been able to us it yet as my host refuses to install php4.0.5. Is it possible to create php3 middleware to work with flashSQL Kit?

    The alternative is to try and get it working with jServ on a unix. Can you see any problems with that before I go down a dead end?

    cheers
    stuartha

  13. #13
    Senior Member
    Join Date
    Oct 2000
    Posts
    310
    I would imagine that it would be relatively easy to get it to work with php 3. do you know what parts of the php page it is choking on.

    if you know some java, it would be pretty simple to create a java servlet to get it to work with jserv. just use the jsp custom tags and pages included as a guide.

    i have a new version done, i just need osme time to polish it. it is much faster now. if i get a chance i will add a servlet to the kit. also, if you get it working with php 3, send me your page and i will add it to the kit.

    mike chambers


  14. #14
    Junior Member
    Join Date
    May 2001
    Posts
    5
    the php is sending back

    Fatal error: Call to unsupported or undefined function writemessage() in /usr/local/etc/httpd/sites/abc.org/htdocs/bat/FlashSQL_MySQL.php on line 1

    I'm just a flash 'as' person, but I'll get a friend to take a look at the php4 convertion to php3.

    If you do get the time to put a servlet in the next version of the kit.... 8)

    thanx again
    stuartha
    [Edited by stuartha on 10-11-2001 at 04:42 AM]

  15. #15
    Junior Member
    Join Date
    May 2001
    Posts
    5

    php middleware working with php3

    In your script the function declaration appears BELOW the function calls. By putting the function declaration ABOVE the calls to it....

    function writeMessage($msg, $conn)
    {
    if($conn)
    {
    mysql_close($conn);
    }
    out.print($msg);
    exit();
    }

    8)) and now it works..... with php3

    Great KIT.....


  16. #16
    Senior Member
    Join Date
    Oct 2000
    Posts
    310
    cool, that was easy. i will update it in the kit for the next release.

    thanks for the help...

    mike chambers


  17. #17
    Junior Member
    Join Date
    May 2001
    Posts
    5

    php middleware

    Hi Mike,

    Just to let you know that the php middleware, does not seem to utilize the ResultSet as intended.

    all rows returned from FlashSQL_MySQL.php are present in the first row.

    which meant that i had to .split up the first row into my own array.

    Hope it makes sence.

    by the way markme does not seem to be up.

    Stu

  18. #18
    Senior Member
    Join Date
    Oct 2000
    Posts
    310
    lets see, i think that that bug was fixed, and has something to do with single quotes automaticalyl being escaped? to be honest i dont remeber.

    the web site is down indefinately until i find time to get it on a new host.

    if you send me an email offline, i will see if i can find the update php file, or find out for sure what the bug was.

    mike chambers

    mesh@macromedia.com

    p.s. sorry for all of the typos, i am tired.

  19. #19
    Registered User
    Join Date
    Feb 2001
    Posts
    13,041
    Hi Mark,

    first of all - thanks for that great work.
    I just want to point out that there may be some reasons to do databasing the traditional way (with scripts on the server)
    a) if you view websites you might wonder why one site's search feature takes one second to produce results, and another one takes half a minute. This may be just a slow server, or a better organiztion of the database tables. Now, with the sql codes inside the flash movie, it is very easy for your competitors to find out. Exposing details like table and column names might even make it easier to hack a database
    b) some queries cannot really be done in mysql, so you would normally produce an enormous result set and use php to filter it. If you make the db call directly from flash, all that lot would be transferred to the movie

    Musicman

  20. #20
    Junior Member
    Join Date
    Aug 2000
    Posts
    6
    g'day all


    hey ... where can I download or get the FlashSQL.zip ... ???


    I've search thru all the sites but still can't found it ...


    Please ... if someone know how to get it ... please let me know ...


    I'm dying to learn it ...


    Thanks ...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center