www.webdeveloper.com
Results 1 to 7 of 7

Thread: Voting script??

  1. #1
    Join Date
    Jul 2005
    Posts
    3

    Voting script??

    Not sure if i am in right place! But am looking for script and information on it. I want a vote section where you cannot click "no" and have to vote yes.
    Here is an example
    http://www.amunt-valencia.net/antimadridismo/index.htm

    Please help, any info greatly appreciated

    Steve

  2. #2
    Join Date
    Jul 2005
    Location
    England
    Posts
    15

    Lightbulb

    I can't do it all for you because I'm at work and don't have the right tools with me, but I can tell you what to do.


    I think the best way to do it would be to take the example you found there, copy it, edit it, then use it yourself.

    Firstly, if you right-click it, you can see it uses Macromedia Flash Player 7. That means that the voting field is a .swf file. You'll need to copy that file so we can edit it. I'll assume you're using Internet Explorer or something very similar. Go to Tools->Internet Options, then in the Temporary Internet Files box, click 'Delete Files...'. Check the box to delete offline content as well, then click 'OK'. Now, open your temporary Internet folder (which you can find by clicking 'Settings' and then 'View Files...' in the Internet Options window). It should be empty. Refresh your example page there and then refresh your temporary Internet folder and you should find that there are now 4 files in there. One of them will be 'encuesta_marca.swf'. Copy that to your desktop or something.

    Now, you'll need some decompiling software. You can find that here:
    http://www.*******.com/flashdecompiler/download.htm
    Use the free trial version. You'll need to register first.


    After you install the Flash decompiler, run the program and have it open the encuesta_marca.swf file that you copied. It should decompile it and give you the source code for the voting box. All you have to do is edit some of the code so it asks your question and says 'Yes' or 'No', then publish/compile the new file as 'yourvoteboxfilename.swf' and you're laughing!


    It's a bit long-winded and seems a bit complicated, but it works.

  3. #3
    Join Date
    Jul 2005
    Posts
    3

    Thank you!......................but

    Thank you very much for your reply.
    I followed as you said, but found trouble in the decomplier, as it says it only decompiles the 1st 2 actions, as it is only trial version.

    Also not sure, if I am to edit it in the decompiler or not?............and will I be able to copy it into my html page............??..........if i get that far!!

    many thanks for your help

    Steve

  4. #4
    Join Date
    Jun 2005
    Posts
    81
    do you need to do it in flash?

    you can do something similar with simple scripting.. for example, set up a form with radios for yes and no with a submit button.. your script would automatically switch the selection to yes if the no button was clicked.

    not as "flashy" but same basic idea. there's other cute things you can do along the same lines....

    if it really MUST be flash, the effect being used is a simple one to apply... just run through the flash tutorials and it'll be pretty clear (sorry, nowhere near my computer with flash installed, so can't point ya any closer in the right direction)

  5. #5
    Join Date
    Jul 2005
    Posts
    3

    flash or not

    Thank you.

    I dont think it has to be in flash, it is just that the only example I have found of what I want is in flash.

    I thought it might be simple, but for me it is proving difficult!.........I thought i could acquire the code and alter the text for my subject..........and place it into a simple html page...........

    Steve

  6. #6
    Join Date
    Jun 2005
    Posts
    81
    you can try something like this
    Code:
    <html>
    <head>
    <title>
    Rigged Voting
    </title>
    <script type="text/javascript">
    <!--
    function selectYes() {
    theForm.YesOrNo[0].checked = true;
    theForm.YesOrNo[1].checked = false;
    }
    //-->
    </script>
    <body>
    <form name="theForm">
    <input type="radio" name="YesOrNo" value="Yes">Yes</input>
    <input type="radio" name="YesOrNo" value="No" onclick="selectYes()">No</input>
    </form>
    </body>
    </html>

  7. #7
    Join Date
    Jul 2005
    Location
    England
    Posts
    15
    Yeah, when you decompile the .swf file you might have to edit it in Flash. There's probably a trial version of that too though.

    The only alternative (which I'm not suggesting you do) is to download cracked versions of the software involved.

    Or you could just use the simple radio button idea. That'll work, but it's not quite as fun, what with it not jumping around all over the place and whatnot.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles