Flasher Archive
[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]
Subject: | FLASH: Dynamically Filled Form Fields (Correction--opps Sorry) |
From: | John Stanley |
Date: | Tue, 11 Jul 2000 18:45:46 +0100 |
(Correction in step 4, please forgive my repost)
1. Set up your server side page, in my case it is a cfm (cold fusion
template). In it, have it recieve a variable from your flash movie. This
should be done using the loadvariables command on the same level as your
main movie and have it send using post.
2. Have your server-side page do whatever manipulation with that variable as
necessary and have it return a variable in this fashion:
&Result=#Firstname#+#LastName# (url-encoded format)
Where Firstname and Lastname are variables returned from a SQL query
and result is a
arbitrary variable name that will also be the name of the textfield
in your flash movie.
The pound signs are used in ColdFusion to express the value of a
given variable and can be ignored if you are not using it.
3. In your flash movie have your page wait to recieve input from the user of
some type (in my case filling out a text field) when this happens and a
button is pressed that has the loadvariables command attached to it it will
take the variable and pass it to whatever template you are using.
4. As you can see below, the variable 'name' is the value recieved from
flash and the variable 'result' is the value returned to flash.
The rest of the code will be gibberish if
you are not using CF. But I am sure that whatever server-side processing you
are using would follow much the same procedures.
5. Using this example allows you to dynamically change the value of a text
area using your server side stuff, without having to reset the values in
flash.
Hope this helps. :-)
<cfparam name="name" default="">
<cfif #len(name)# is not 0>
<cfquery name="GetConsumers" datasource="homepage">
select distinct top 1
Lastname, FirstName
from
Extranetlogin
where
Lastname like '%#name#%' and Lastname!='admin'
</cfquery>
<cfif getconsumers.recordcount gt 0>
<cfoutput query="getconsumers">
&Result=#Firstname#+#LastName#
</cfoutput>
<cfelse>
<cfoutput>
&Result=None+Found
</cfoutput>
</cfif>
<cfelse>
<cfoutput>
&Result=Enter+a+Name
</cfoutput>
</cfif>
</body>
</html>
John Stanley
Programmer
Internet Visions Group
Centromine, Inc
flasher is generously supported by...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
flashforward2000 and the Flash(tm) Film Festival
July 24-26, 2000, NEW YORK CITY, Hammerstein Ballroom
www.flashforward2000.com
Produced by United Digital Artists and lynda.com
Sponsored by Macromedia, Adobe Systems, Fusion, Inc, AtomFilms,
shockwave.com and Electric Rain.
1.877.4.FLASH.4 or (1.805.640.6679 outside the US and Canada)
Register before June 30 and save $200!!-- www.flashforward2000.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpchinwag [dot] com
flasher is generously supported by...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
flashforward2000 and the Flash(tm) Film Festival
July 24-26, 2000, NEW YORK CITY, Hammerstein Ballroom
www.flashforward2000.com
Produced by United Digital Artists and lynda.com
Sponsored by Macromedia, Adobe Systems, Fusion, Inc, AtomFilms,
shockwave.com and Electric Rain.
1.877.4.FLASH.4 or (1.805.640.6679 outside the US and Canada)
Register before June 30 and save $200!!-- www.flashforward2000.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpchinwag [dot] com
[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]