View your Shopping CartFrequently Asked QuestionsEmail Us
Home | About Us | Contact Us
SmartWebby.com provides best web design & web programming services globally
We specialize in Rapid Web Design, ASP.net, ASP and PHP web programmingBest Web Design, Best Web Programming, Global Service Provider - Dependable Professionals to build your website right!

Basics of Flash and ASP

Interaction between Flash, ASP and the Database

Below is shown the Diagrammatic Representation of how Flash interacts with the database via an Active Server Page (ASP). The same cycle is followed for both sending data to and receiving data from the database.

Though this seems like a round about way of getting data (and time consuming) you will be surprised to see what wonders can be achieved with a little optimization and care. Note : All the three interactive Flash products done in Flash and ASP on our site have super-fast loading times. Infact the SmartPoll loads faster than the HTML page for a 56K modem ;-)

Role played by Flash

Simply put Flash in our context is just used to create the Interface which:

You might be wondering how a flash (.SwF) file obtains data. You must be knowing that to be able to view a flash file your browser needs to have a plug-in called 'Flash Player' installed. The flash player loads variables and their values (when requested to) from a remote file (in our case the ASP file) into its memory and then uses them as required.

Loading variables from a remote file into Flash

Flash can call a remote file by using a command in the Action tab called 'Load/Unload Movie'. Select its 'Load Variables into location' option and give the URL of your file in the URL box provided. The command will now look like:

     Load Variables ("your_file_URL.asp","")

The above command gets data from your file without sending any data of its own to it. If you need to send some data to your ASP page from the Flash interface, then in addition to the above command just select the 'Send using POST' option from the drop down menu called 'Variables'. Thus the command looks like:
     Load Variables ("your_file_URL.asp","", vars=POST)
View Screenshot of how to do this 
  

The format in which the data should be supplied to Flash is highly crucial to the concept of Flash 'n' ASP. Let us call this special structure of supplying data as the Variable-Value format that is explained in the ASP section below. When data is sent in this format the Flash player takes each variable with its value and supplies it to the .SwF file. Similarly, when it sends variables to a remote file, they will be in this format and will have to be derived.

For your information please note that the remote file can be a static HTML or TEXT file too instead of an ASP page. The data just has to be in the Variable-Value form as explained above.

Role played by ASP

Active Server Pages (ASP) - Is a technology that provides a framework for building dynamic HTML pages. Simply put ASP in our context is used as the Mediator between the database and the Flash interface which:

Sending of variables and their values to the Flash interface by the ASP file should be done in a special format as mentioned above. This format can be remembered easily as the Variable-Value format, otherwise known as the URL-Encoded format in ASP.

Variable-Value Format

Flash needs to receive the variables and values in the format below:
For a single variable:

     variable1=value1

And thus for multiple variables it needs the same format separated by a "&" in between:

     variable1=value1&variable2=value2&variable3=value3&variable4=value4

Note: The variable name should be understandable by you as to what it represents and shouldn't include spaces. Spaces should not be present between the '&', the variable name and the '=' sign. The values can have spaces.

The Database

We will be using a Microsoft Access 2000 Database to store our form data. However for the web since speed is very crucial we recommend the use of a SQL Server or an Oracle Database.

That covers the bare basics of Flash and ASP.

Absolutely FREE Web Templates
Check out these quality free web templates and download them without any registration or sign-up!

FREE Web Design Guide
From web design tips & ideas to HTML, CSS Styles, Fireworks & Dreamweaver you'll find all you need to know about effective web site design right here!

Quality Dreamweaver Templates
Professional quality dreamweaver templates in over 20 categories, starting at just $9.95! Instant download & easy customization