Search  

AS3 RADIO BUTTONS AND VOTING SYSTEMS..NEED HELP

HomeForumsHelp NeededAS3 radio buttons and voting systems..NEED HELP
Default-profile cjdsie
1 post
Bought between 10 and 49 items

Hey I’m new here and I really need some help with a project I’m working on. I created a voting system for subs but once you select the sub you think should be the favorite the result only displays the one you choose. What I need it to do is only display the most clicked on sub. Can anyone help me?

www.subwayvalues.com/bulldogs/

Here is the code so far…. ActionScript Code: messageBox.text = ””; // Clears the Response box var correctAnswer:String = “HAM”; // Sets correct answer for comparison var userAnswer:String; // with value from radio button group. var rbg:Object = rbNewton.group; // Get the name of the ragio button group from the first button.

btnCheck.addEventListener(MouseEvent.CLICK, checkAnswer);

function checkAnswer(evt:MouseEvent):void { userAnswer = String(rbg.selectedData); for(var i:Number = 0; i<30; i++); if (userAnswer == correctAnswer) { messageBox.text = userAnswer + i; gotoAndStop(“page2”;); // Track with no action URLLoader(“javascript:pageTracker._trackPageview(’/folder/file.html’;);”;); } else { messageBox.text = userAnswer; gotoAndStop(“page2”;); } trace(“working”;);

}

Posted 2 months ago