On 3 Jun 2006 02:28:36 -0700, vivek wrote:
I am new to flash and want someone to guide me,
Is it possible to create a UI entirely in Flash and that will inetract
with C# components (backend) and these components will in return
interact with database etc.
If flash and C# interaction is possbile then, what are the prons and
cons of this interaction?
As using flash, one can create wonderful UI. But in return I also want
it to interact fully with C# components.
That's possible but it depends on what kind of applications you want to do.
If you want to develop a desktop application with a Flash interface, you
can place the Flash ActiveX control on a Form. Then communicating between
flash and C# is easy (although very limited:
- Flash -> C#: in your action script, call the fscommand() method. This
will cause the ActiveX to raise the FsCommand event that can then be
handled by your C# program. fscommand takes 2 string as parameters so
you'll have to find a way to fit all the data you want to pass into 2
strings (for complex set of data, you'll probably want to pass XML string).
- C# -> Flash: you can use the SetVariable function of the ActiveX to set
an ActionScript variable value from C#. In Flash, place a watch on this
variable to be notified when its value has changed.
W've used this this technique to add a video-conferencing feature to our C#
application using Flash Media server and it works fine and it alowed us to
add video-conferencing in a matter of days instead of months. But i would
not recommend it to build a complete UI is Flash. Flash UI is just too
different from a normal Windows UI and this will surely cause loads of
confusion among your users. There are maybe a few very specific
applications that could benefit from having a Flash interface but don't
forget that there are third party C# UI component that can make a C#
application look great without having to use Flash. Plus, as we've seen
communication between Flash and C# is very limited so if you often have
loads of data to pass back and forth, this might become really messy.
If you're talking about web interfaces, then there are loads of examples on
the web that explain how to query an ASP or ASP .NET page from flash to
retrieve or pass data (typically, this is used to access a database).