A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: a few questions!

  1. #1
    GCP
    Join Date
    Mar 2001
    Location
    New York, NY
    Posts
    18
    ok here's my goal, I wnat to send a request to my servlet, for a list of two rows in a db, say a document id and title,
    q1. I want to put the response in a var, I assume this is posible...
    var returnStr = "";
    loadVariables ("http://localhost/servlet/flashDBServlet?command=doTitles", returnStr, "GET");
    q2. once that happens, I split the returnStr into two strings delimited by comma, and split those into two arrays, then I want to dup a movie clip that has a button, and a dyna-text field, can I put the array values into the text fields?

    the goal is to give the user a list of doc titles in the db, and a button to retrieve the contents with, and then send them to a frame to start editing

    thanks

  2. #2
    Senior Member sxdesign's Avatar
    Join Date
    Aug 2000
    Location
    Serbia
    Posts
    844
    huh... it's not easy to explain whole thing, but you can check my info on connectivity between flash and CGI (perl in my case)...

    http://64.224.111.148/forums/showthr...threadid=48918

    it might help you to understand how to make connection... if not, paste more info so i can see what exactly you want to achieve...

    hope it helps...


  3. #3
    GCP
    Join Date
    Mar 2001
    Location
    New York, NY
    Posts
    18
    I think I understand, rather than asigning the response to a target, I say myVar = "[GET|POST]" ok, thats cool, would you just look at this script for me?
    var ids = new Array();
    var titles = new Array();
    var returnStr = "";
    var
    loadVariables ("http://localhost/servlet/flashDBServlet?command=doTitles", "", returnStr=GET);

    var retArr = returnStr.split('|');// first delim
    var idStr = retArr[0];
    var titleStr = retArr[1];
    ids = idStr.split(',');
    titles = titleStr.split(',');
    for (var i = 0; i<titles.length; i++) {
    var name = "movEditBtn"+i;
    duplicateMovieClip (_root.movEditBtn, name, i+1);
    setProperty (name, _x, _root.movEditBtn._x+(_root.movEditBtn._height*i+1) );
    setProperty (name, _y, _root.movEditBtn._y);
    _root.name.docTitle = titles[i];
    }

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