February 24, 200223 yr Newbies Just because i think that Flash makes pretty good looking interface, and is pretty uncrashable... I m trying to get access to a Filemaker pro database from a swf... (macromedia flash animation) If anybody has ever done it before, i would be glad to share info... It feels like i should try to understand the CDML usage but i have never heard of this...
February 24, 200223 yr Yes you can. Look at the function 'getVariables()'. You can use a URL in this function, the format file can look like this (just a single line): var1=[FMP-Field: myfield1]&var2=[FMP-Field: myfield2] Hope this helps. Garry
August 30, 200223 yr I would like to use flash and Filemaker pro also, but I am still a little confused. could you give an example of what the action script would look like ?
August 30, 200223 yr You can use the 'loadvariables()' actionscript. It can be used to query and edit a database. Example: loadvariables("/FMPro?-db=mydb.fp5&-lay=CGI&-format=myvars.txt&-findany",0) The 'myvars.txt' format file could look like this:myvar1=[FMP-Field:myvar1]&myvar2=[FMP-Field:myvar2] The variables myvar1 and myvar2 would have been declared at level 0. Hope this helps. Garry
February 20, 200322 yr I am a little clueless about this and I am trying to muddle my way through a basic contact form where the user submits some information to the database . Could you take a look at what I have done so far to see if you can see what I am doing wrong ? The contact.fp5 and the swf file are in the same folder I defined the variables for the Input text fields I added this actionscript to the submit button on (release) { loadvariables("FMPro?-db=contact.fp5&-lay=dataentry&-format=vars.txt&-new",this,"POST"); nextFrame(); } My vars.txt file: date=[FMP-Field:date]&email=[FMP-Field:email]&firstname=[FMP-Field:firstname]&lastname=[FMP-Field:lastname]&phone=[FMP-Field:phone]
February 20, 200322 yr The swf and the database do not have to be together. Filemaker needs to be running with WebCompanion enabled. All the best. Garry
February 21, 200322 yr web companion is enabled, the pages work as html. I have searched the web and I can not find any documentation anywhere on how to use cdml and action script together. If I had an example, I think I could follow it, but I'm don't know enough to figure it out from scratch.
July 1, 200322 yr Your example works well, can you tell me how to list a found set of records? -I have changed the URL string, and tested the format file and all is ok, but how can I get flash to list the found set and have them set as activet links.
July 1, 200322 yr I don't know enough about Flash to know how it would process a text-based array. Maybe the Format file can produce a Comma-Delimited text steam. Flash may have Functions for converting this to an Array. All the best. Garry
July 1, 200322 yr Maybe Flash will take some XML output. But in my browser all boring Flash stuff is disabled.
July 1, 200322 yr Following on from garrycl's response, if the format file can produce a string delimited by commas (or any other delimeter) then you can use this code... myArray =myDelimetedString.split(","); Where myArray is a new Array created by the split function, and myDelimetedString is the Comma delimeted string you have passed to Flash by the format file. Change the comma in 'split(",")' to whatever your delimeter is. You could do this with as many delimeted strings as needed then you have a series of Arrays that can be used and abused in Flash. HTH
July 18, 200322 yr Hi Gary, This is my first time tring to get Flash to talk to FM. I have used this thread as an example but I'm missing something. I saw some talk about example files?: Is there anyway to get ahold of a example file of a .fla, fp5 and txt. Thanks for the Help.
July 19, 200322 yr Todd, I don't know about any example files. However, a search of the Macromedia Tech Notes for "loadvariables" may give some examples. Try this: http://www.macromedia.com/support/flash/action_scripts/actionscript_dictionary/actionscript_dictionary425.html I'm guessing that you are able to use CDML (in URLs) effectively. All the best. Garry
July 22, 200322 yr Thanks for the help. Gary I'm almost there. I get a filemaker error of 4 (big help) Attached are my files. I was wondering if you or some one could look at and tell me whats worry. This is driving me mad.
July 23, 200322 yr Todd, Unfortunately I do not have Flash. I'm travelling at the moment so I will not be back to where the Flash developer I work with until the 31Jul. Please show us the line of code for "loadvariable()" All the best. Garry
July 23, 200322 yr Here is my code. on (press) { loadVariablesNum("http://10.0.1.2/FMPro?-db=test.fp5&-lay=cgi&-format=var.txt&-new", this, "POST"); nextFrame(); } I have a input field on one frame with the var name of name and a button that uses the above action scirpt. One fileMaker file that has one text field: named name. Sharing is set to web companion and the filemaker app has the web companion is on. One text file named var.txt and the content is: name=[FMP-Field:name] Thanks again for the help.
July 24, 200322 yr Todd, I've tested the URL in a Browser and it works fine. I guess that you have done the same thing. I think, however, that the method should be "GET" not "POST". This maybe what is causing the FM "command unknown" error. Hope this helps. Garry
July 24, 200322 yr Gary, I tried the get option and got a total diffrent error message. It said unknow comand used. Maybe my error is in the HTML file. Does the SWF need to be between form tags? Do I need the hidden fields: suchas format, error, DB....? Thanks
July 24, 200322 yr The URL itself should be enough. I'm not sure how "loadVariableNum()" works in comparsion to "loadVariables()". However, "loadVariables()" is the function we have used before. All the best. Garry
July 25, 200322 yr The problem is that I can not pass variables to filemaker using Flash Loadvarables. Trying to create a new record in FM with the info I type into my flash movie. on (release) { loadVariablesNum("http://192.168.100.67/FMPro?-DB=flash.fp5&-lay=web&-format=var.txt&-new", 0, "POST"); } This will give me a filemaker error of 4 (unknown). If I change the POST to DON't SEND. This will create a new record in the DB but does not pass the Variables to the new record. I read last night in Flash 5 action script Reference guide that a command of GET: will append the variables to the end of the URL up to 128 charters. on (release) { loadVariablesNum("http://192.168.100.67/FMPro?-DB=flash.fp5&-lay=web&-format=var.txt&-new", 0, "GET"); } POST: send the variables in a separate header. on (release) { loadVariablesNum("http://192.168.100.67/FMPro?-DB=flash.fp5&-lay=web&-format=var.txt&-new", this, "POST"); } DO NOT SEND; will send no variables. on (release) { loadVariablesNum("http://192.168.100.67/FMPro?-DB=flash.fp5&-lay=web&-format=var.txt&-new", 0); } I think that the web companion needs to have the variables before the last tag (-new,-find,-delete.......) in the URL. have you or do you know anyone that has push info from flash to Filemaker? Again Thanks for your help.
July 27, 200322 yr We were using Flash to maintain player's scores and dates for an online game. To update the FM database we used: loadVariable("http://123.123.123.123/FMPro?-db=scores.fp5&-lay=cgi&-format=var.txt&-edit&",0) I don't have the syntax with me for including the values into the URL. However, you may be able to do something like this: loadVariable("http://123.123.123.123/FMPro?-db=scores.fp5&-lay=cgi&-format=var.txt&-edit&",0,score,-recid) Where "score" and "-recid" are variable names used in Flash. Also, note that I have included a "&" after the "-edit". Good Luck. Garry
Create an account or sign in to comment