Flasher Archive

[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]


Subject: Re: FLASH: email to asp to database to flash question
From: Matt Wobensmith
Date: Wed, 10 May 2000 18:28:20 +0100

Hi Larry -

You had several questions about Flash and ASP. I will answer them generally,
and point you towards a good Flash and ASP tutorial.

You asked how to make a Flash movie pull a unique set of values from a
database using ASP. It's like this.

Ingredients:

1 database with 10 records (for example)
1 server that supports ASP
1 ASP page that embeds the Flash SWF
1 ASP page that loads the variables to the Flash movie
1 Flash movie
10 users with 10 different possible combinations


Breakdown:

1. User comes to your page via the same URL, but with a unique value passed
in the query string:

http://www.mydomain.com/welcome.asp?name=Bobby

2. In the welcome.asp page, you can obtain the query string info and pass it
to the Flash movie via the OBJECT and EMBED tags. Sort of like this:

<%
userID = Request.QueryString("name")
.... <snip> ....
EMBED src="flashmovie.swf?userID=<% userID%>"
.... <snip> ....
%>

This will pass the variable to the Flash movie, which will then have this
information, and request a different data source via the loader ASP page.

3. In the Flash movie, use Load Variables action. In the "URL" field of that
action, use an expression instead of a hard-coded URL.

Load Variables ("loader.asp?userID="&userID, "", vars=POST)

Because the value of "userID" was passed to the movie in step 2, it can now
be used to talk to the loader.asp page to request a unique set of data from
the database.

4. The loader.asp page recieves the data that first came from the URL, then
into the Flash movie, and now it's here. With this, the ASP page can use
this to query the database for a record by this name, and then return
whatever recordsets you want, formatted however you want, to the Flash
movie.

5. The Flash movie now has unique data, identified by the original query
string from the URL, and can build a Flash movie for you based on the
original URL in step 1.

------

OK, so this is extremely simplified. I didn't want to hit you over the head
with code here. :>)

Two more resources:

1. Here's a great Flash and ASP tutorial:

http://www.asptoday.com/articles/19991001.htm

2. I've pushed this before, and I'll do it again, at the risk of being a
self-promoter - to see this in action, check out www.sendasketch.com - this
does exactly what you are asking.

Post any questions to the list and I'm sure we'll have good pointers for
you.

Matt

---------------
Matt Wobensmith
Macromedia Tech Support
Flash Team Lead

flasher is generously supported by...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Get the last 100 messages from the flasher list NOW
http://www.chinwag.com/flasher/last100.shtml

Flash books http://www.chinwag.com/flasher/books.shtml
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpatchinwag [dot] com


[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]