A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: Input type to be replaced! Pls!!!!

  1. #1
    Senior Member
    Join Date
    Aug 2009
    Posts
    113

    Input type to be replaced! Pls!!!!

    I have a form (freedback) and the last part goes like this:

    <tr>
    <td colspan="2" align="center">
    <input type="image" src="http://geocities.com/ayusuits/wall.jpg" value="Submit Form" />
    </td>
    </tr>
    </table>
    </form>


    if I change type to IMAGE, I could replace it with an image, but what if I want to replace it with an SWF file button? I want an animated button when mouse over it. Please help...

  2. #2
    Senior Member
    Join Date
    May 2007
    Posts
    266
    Try
    Code:
    <input type="swf" src="myImage.swf" value="Submit Form" />

  3. #3
    Senior Member
    Join Date
    Apr 2002
    Posts
    2,849
    Quote Originally Posted by sticks464 View Post
    Try
    Code:
    <input type="swf" src="myImage.swf" value="Submit Form" />
    Except that code won't actually do anything...there are only a few input types, and .swf isn't one of them.

    To make a .swf file submit a form, you're going to need some Actionscript and probably even some Javascript to submit the form.

    What I'd recommend is you look at the animation and whether it could be done in some other way. For example, you could use an animated .gif, or use javascript to animate the button.

    If Flash is the only way you can accomplish what you want, embed it in the normal way, create a Javascript function to submit it, and look into externalInterface in Flash to call the Javascript function.

  4. #4
    Senior Member
    Join Date
    Aug 2009
    Posts
    113
    thanks! yes, input type SWF will not work. Ill try javascript

  5. #5
    Bearded (M|G)od MyFriendIsATaco's Avatar
    Join Date
    Dec 2002
    Location
    Awesomeville.
    Posts
    3,045
    Quote Originally Posted by sticks464 View Post
    Try
    Code:
    <input type="swf" src="myImage.swf" value="Submit Form" />
    Wow dude, seriously, at least have SOME knowledge before you pull things out of thin air. We don't have a problem with people who aren't experts, but don't pull things out of your ass to try and teach others. It's just bad for everyone.

    Thanks.

  6. #6
    Senior Member
    Join Date
    Apr 2006
    Posts
    1,059
    inside the swf

    myButton.onPress=function(){
    getUTL("javascript:document.forms[0].submit()");
    }

    then embed swf normally...should work assuming its the only form on the page

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center