-
1. Re: How to link swf to database asp
moccamaximum Sep 27, 2013 1:53 AM (in response to vari25)I have a swf file to be linked to a database asp
What kind of database?
I want my visible movieclips on stage to be listed in a output file
Is this required at runtime or at authoring time?
-
2. Re: How to link swf to database asp
vari25 Sep 27, 2013 2:14 AM (in response to moccamaximum)Hi,
As far as I know, Its a asp created server database i assume because i exactly don't know the what type of database it is.
But i do know that, when the swf output file in a website is accessed the list of movieclips visible on stage (i.e., enabled through buttons) have to be created as a list,
for the database to be further processed.
So, the thing is wen the button (submit) for example is clicked, the movieclips which are enabled on stage to be added to a list.
Any idea in this or help with this is appreciated.
Thank you in advance.
-
3. Re: How to link swf to database asp
moccamaximum Sep 27, 2013 3:01 AM (in response to vari25)there are really dozens of scenarios for the usecase you describe.
first thing: you somehow have to store the relevant Moviclips in an Objcet which can be an Array or a stribng or An XmlList whatever is easier for your webservice to process.
Basics about connecting flash with asp here:
http://blog.thinksharp.nl/2008/03/01/FlashCS3AndASPNETWebservicesInclSessions.aspx
-
4. Re: How to link swf to database asp
vari25 Oct 9, 2013 2:27 AM (in response to moccamaximum)The link provided by you has a downlaodable library.
But I have a file that is the images sequence file with color options with user interactive.
That is the color changes when the user clicks on the button like garage_blue, garage_brown etc.
Now when the user clicks the save button, the enabled movieclips or selected clors has to be generated in a list.
Hope I made myself clear.
Now, could you please suggest what could be done?
Many thanks in advance.
-
5. Re: How to link swf to database asp
moccamaximum Oct 9, 2013 2:48 AM (in response to vari25)there are at least 4 possibilities to handle this:
1.Store data in a LocalSharedObject
2.store data in simple texts files
3.store data in structured text files(xml,html)
4.Excnahge Data with a database via FlashVars/Xml
It all depends what the endgame is.
Working with XML is pretty much a standard with most webservices:
http://help.adobe.com/en_US/as3/dev/WS5b3ccc516d4fbf351e63e3d118a9b90204-7ff5.html
LSO, textfiles and FlashVars are easier to work with, but not suited for complex/large data
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/SharedObject. html
http://help.adobe.com/en_US/as3/dev/WS5b3ccc516d4fbf351e63e3d118a9b90204-7cf8.html
the moment you want to store data on a server you will have to use sth like asp or php in addition to as3.
If you have no experience in using these webtechnologies expect a steep learning curve
-
6. Re: How to link swf to database asp
vari25 Oct 9, 2013 3:22 AM (in response to moccamaximum)Many thanks.
If you have no experience in using these webtechnologies expect a steep learning curve
I'll keep that in mind of course.
And also many thanks for cooperating with all the silly doubts I might be giving.
And for all the links you are providing.
-
7. Re: How to link swf to database asp
vari25 Oct 17, 2013 12:15 AM (in response to vari25)Hello again.
I have so far come to this. Is it relevant to the output which I want?
submit.addEventListener(MouseEvent.CLICK, sendData);
function sendData(event:MouseEvent):void
{
var urlreq:URLRequest = new URLRequest ("http://www.mydomain.com/file.asp");
urlreq.method = URLRequestMethod.POST;var urlvars:URLVariables = new URLVariables();
/* urlvars.uname = nametxt.text;
urlvars.apellido = aptxt.text;
urlvars.email = emtxt.text;
urlvars.cedula = cctxt.text;
urlvars.score = scoretxt.text;*/
urlreq.data = urlvars;var loader:URLLoader = new URLLoader (urlreq);
loader.addEventListener(Event.COMPLETE, completed);
loader.dataFormat = URLLoaderDataFormat.VARIABLES;
loader.load(urlreq);
}function completed (event:Event):void
{
var variables:URLVariables = new URLVariables( event.target.data );
//resptxt.text = variables.done;
}Here instead of this .text area, what should I do to get movieclip instances.
That is the selected movieclip instances at every runtime has to be get in a .txt file or a databse file.
What is the changes to do in Flash file to acheive this. i.e. index the mc's or creating arrays or something.
If any other suggestions, Please help.
Hope I made myself clear.
Thank u in advance.

