Thursday, April 1, 2010

Need Help

Hi every body

i have a problem regarding the integration between flash and
ASP file

i have an ASP file that gets a record set from the database

i don't know how to send this record set to flash and place
it in a data grid

thanks in advance

ranyNeed Help
This is a wide open field of decisions you have to make.



First choice you have is sending via URL variable encoding or
XML. That will define your tasks needed in ASP. As well would you
want to simply (most beginners would) just have the ASP send the
URL variables or XML with Response.write or are you planning a web
service type of app.



For Flash you will find the examples in the docs are all you
need to get the data from the ASP and send back if necessary. Still
the choices depend on the server (ASP) choices.



For URL Encoding from ASP:
LoadVars.load

For URL Encoding to and from ASP:
LoadVars.sendAndLoad

For XML from ASP:
XML.load

For XML to and from ASP:
XML.sendAndLoad


For overall details on data integration





In general for the DataGrid component you would populate it
using
DataGrid.addItem.




You can also bind the DataGrid to data providers such as an
array so it updates when the data source changes.



You also can use the




FLash
8 Pro data binding component approach. You should review
Data
Integration in the Flash Docs for this approach.



Need Help
Thankx for your reply

but let me explain in more deails

its a messaging system

first i have a login module which send user name and password
(using loadVars.sendAndLoad) to an ASP file which check(from
database) if the user name and password is correct or not if the
user name and password is correct

flash login

the problem now is

when the user is logged in i have to retrieve all his
messages ok

and so an asp file retrieve the messages of this user and put
it in a Record set

now i want to send this recorde set back to flash and
displayed it in a data gride

Please advise

thanks Lon Hosford


Thankx for your reply

but let me explain in more deails

its a messaging system

first i have a login module which send user name and password
(using loadVars.sendAndLoad) to an ASP file which check(from
database) if the user name and password is correct or not if the
user name and password is correct

flash login

the problem now is

when the user is logged in i have to retrieve all his
messages ok

and so an asp file retrieve the messages of this user and put
it in a Record set

now i want to send this recorde set back to flash and
displayed it in a data gride

Please advise

thanks Lon Hosford


On the server side you need to reply with the data. Depends
on what type of server script you are using. For example in PHP you
would use echo or ASP Response.write. For Flash is does not matter
as it receives the data in the standard data format parsed into the
return LoadVars object.



The example for LoadVars.sendAndLoad shows how to display
return values in a TextField. See link in my first post in this
thread.

No comments:

Post a Comment