Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Flash button in a Dreamweaver form...

Status
Not open for further replies.

Ignis

Technical User
May 3, 2005
10
HR
Hi,

I would like to use a Flash button (that I created) in a Dreamweaver form in order to send the data (that user wrote) from a form to a php server using post method...

Can anyone please tell me how do I make my Flash button to send the data from a form to a php server usind post method?

Thank you.
 
Have the form insert into a database, then the data will always be available.

Dodge20
 
I am not really familiar with php but from a pure forms standpoint you want to do the following:

Make sure your form action is directed to the file that will process your page results
Make sure your form method is post
(note both of these settings can be made by selecting the form element of your page and setting values in the properties tool)

Then you need to set up the button to submit the form (which may be the main question you are asking). I am not in front of Dreamweaver right now but I will try to get a chance to take a look at this and see if there are any special things to do when it is a flash button.

Hope this helps a little bit at least!

Crystal
--------------------------------------------------

Experience is one thing you can't get for nothing.

-Oscar Wilde

 
crystalized wrote: "I am not in front of Dreamweaver right now but I will try to get a chance to take a look at this and see if there are any special things to do when it is a flash button."

I would appreciate very much if you would do just that because that is exactly what I'm trying to find out. :)

 
I just created this form to add a flash button
Code:
<form name="form1" method="post" action="whatever.asp">
  <p>
    <input type="text" name="textfield">
</p>
  <p>
    <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="[URL unfurl="true"]http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0"[/URL] width="105" height="23">
      <param name="movie" value="button2.swf">
      <param name="quality" value="high">
      <embed src="button2.swf" quality="high" pluginspage="[URL unfurl="true"]http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"[/URL] type="application/x-shockwave-flash" width="105" height="23" ></embed>
    </object>
</p>
</form>

This was done by using Insert>Media>Flash Button and setting the values on the popup panel.

Cheech

[Peace][Pipe]
 
Cheech wrote: "...This was done by using Insert>Media>Flash Button and setting the values on the popup panel."

Yes, I know about that option. The problem is it uses swt files and not swf files... And I would like to use my own button, not a preset one (so called generator template file - swt.file)... :/

(This site tells how to make a swt file, only I have Flash MX 7.0 and I don't have that option to export movie to a generator template file... :////)

There is another problem... If I insert flash button in my form (swf, not swt - because I can't make a swt file :/), it's still possible that that button will not send the data from a web form to a desired php file/script... So, if this is true and the button when pressed or realesed does not send the data to a *.php I probiably have to add ActionScript to my button? The problem is I don't know what function should I use... I found some functions that load data from a php script to Flash, only I can't find a function that sends the data from flash to a php script...

Do you see what my problems are? ;))))

If anyone has a solution to this problem I would appreciate it very much... :))
 
Hope this isnt too late but it should help
If you want to use flash to submit a form, you're better off creating the whole form in flash. Just make the text fields "input text" and name the form field "var" appropriately.
After you make the form with Flash add this action script to your submit buttion to post the data to your script on mouseclick or on enter press
----
on (release)
{
loadVariablesNum (" _blank, "POST");
}
on (keyPress "<Enter>")
{
loadVariablesNum (" _blank, "POST");
}
----
This will submit the form to whatever page you want. "_blank" means it will open your script in a new page this can be changed to _self or _parent or to a specific frame name
 
Thank you for your answer... :) I'll try that...

If I stuck somwhere in the middle I will ask you a few more questions... :)))

Thank you very, very much... :))
 
you can also use the GetURL method to post form data from flash

ie.

getURL(" _blank, "POST");

you can also use any button or link to change variables in flash
ie.

on (release)
{
set ("YourFormInputName","YourFormInputValue");
}

or
on (release)
{
set ("YourFormInputName","YourFormInputValue");
getURL(" _blank, "POST");
}

Or have multiple submit buttons giving you multiple options for your form

For example I have a navigation bar which gives the option to search the database or do a direct company pull if you put in a co. ID number and hit A different button for Company
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top