...

View Full Version : Flash as submit?



rossored
06-01-2004, 04:13 PM
Does anyone know how I can make a .swf file act as a submit button on a form?

mindlessLemming
06-01-2004, 04:41 PM
As far as I know, that is impossible.
Your next best option is to create the entire form in Flash, but remember to make an HTML version for people without the plugin ;)
Here's some help making Flash forms:
Actionscript - The Definitive Guide: Forms (http://skaiste.elekta.lt/Books/O'Reilly/Bookshelfs/books/webdesign/action/ch17_01.htm)
Flashkit.com - Creating Forms in Flash (http://www.flashkit.com/tutorials/Interactivity/Creating-Matthew_-807/index.php)
Flash Technotes - Forms in Flash (http://www.macromedia.com/support/flash/ts/documents/f4_form.htm)
That should get you well on your way :thumbsup:

rossored
06-01-2004, 05:38 PM
Bummer.

Can it be done with a Flash button do you know, or is that regarded as the same thing? Have I got to stick with dull old gifs and jpgs?

Thanks for the links if not, I'll take a look when my brain doesnt hurt so much.

sidvorak
06-01-2004, 06:45 PM
umm...this shouldn't be impossible...make your flash button and use this code attatched to the first frame...
btw...make sure to give your button a name in the property inspector and that it matches the name in the function.
i.e. here I use myButton as the name of the button instance. Also, "myform" would be the name you give your form element.


mybutton.onPress=function(){
getURL=("javascript:document.myform.submit()");
}

Cheers,
Simon

mindlessLemming
06-02-2004, 01:29 PM
Of course! Using javascript with getURL in the A.S. should do the trick :thumbsup:
Although now you are relying on two technologies that can't be relied on ;)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum