Multiple Buttons Not Working? Actionscript 3 - actionscript-3

In actionscript 3 (flash cs6), I am trying to make multiple buttons (I am somewhat of a beginner).
I do the code right (I think), because 1 button works, but the other button (when I add it in) shows 2 error messages.
1023: Incompatible override.
1021: Duplicate function definition.
I added a separate event listener and a separate function for both of these buttons.
I do have import flash.events.MouseEventin the beginning, and I do not know if I have to do anything with this.
Here is all my code for both buttons (note: they are on the same frame, but I split them for ease):
https://s3.postimg.io/4vt5prb6r/Help.png

Related

Jump to specific field when a multiple choice radio button is selected in Gravity Forms

is there an option or maybe a small custom code to make Gravity Forms radio buttons jump to a field on selection?
In my example, i have a list of 14 options. Using a condition logic when you select one option a custom HTML is revealed right under each and every option. For desktop is super ok, the screen is big and all fit well. The problem is for mobile devices because you select an option but after that, you have to scroll to see the custom HTML.
Is there any option or custom code snippet in Gravity Forms that jumps to that custom HTML when an option is selected?
I found some resources on how to make this using HTML code with ids but this is somehow dynamic though the HTML code is placed in the same position. My first idea was to add the same ID to each and every HTML code so that when a radio button is pressed it scrolls to that ID. Don't know if it makes sense but ...
Can someone help me with some resources or give me some hints? Many thanks.

Action script 3.0 reusable button function

I am new to AS3.0 and am trying to create a reusable button class. I am working on a quiz game where I have multiple correct and incorrect buttons and instead of copying the same code over and over again I am trying to create a simple way to reuse the code. I am unaware how to do this. I have created various generic button classes and none have worked. I believe the best way would revolve around creating a generic class with a Boolean 'correct' and each button class extends this parent class and sets the correct Boolean true or false. In the parent class there would be a function saying if correct then go to next frame, if !correct go to lose frame. I have tried this but to no avail; any help?
If that's a design question, then no, a button should not know if it's "the correct one" in a given quiz. All logic should be handled by button's parents, whatever type they are. A simple design would do like this: Create a set of buttons with texts, then you addEventListener(MouseEvent.CLICK,someFunction) to each, where someFunction is one for the correct button, and another for wrong-answer buttons.

Problema with ng-click function

I am trying to make a product configurator for a website. I'm using MEAN but at this point I just have a problem with AngularJS.
I proceed to explain my program. In the application you have three buttons for the first step of the configuration.
When you click one, AngularJS send back to the web the next three buttons (the values of this buttons depends on the first one you click). And here arrives the problem, this last buttons doesnt seems to work.
After clicking the first button I call the function $scope.getOption2 and it returns this:
htmlsString= '<div><button id="btnS2-1" ng-click= getOption3(1)>1</button></div>'+
'<div><button id="btnS2-2" ng-click= getOption3(2)>2</button></div>'+
'<div><button id="btnS2-3" ng-click= getOption3(3)>3</button></div>';
And this is the way I print it on screen:
$scope.option2 = $sce.trustAsHtml(pruebaHTML);
But the function $scope.getOption3 is never called when I click in one of those buttons.
I have simplified the code, but the essential part is here. I hope somebody can see my problem.
Appending elements like this is not the Angular way, and is frowned upon. Angular does not know of your new buttons, because you cannot manipulate your DOM in this way. You could $compile your elements again, but maybe you should just have the buttons in your template to begin with, you could show them with ngShow. Maybe better yet, see if there is some directive out there that can do what you want - or roll your own.
Look http://docs.angularjs.org/api/ng.$compile for details on $compile.

How can I change the style of UITabBar?

I want to make UITabBar in such a way that it will have 5 items and the middle one will be come out of the tab bar. How can I get these done?
I can't share my code. What I am doing in my code I can describe.
In my Delegate.m file I am creating one UITabBarController and created 5 UIViewControllers. For each tabItem I kept one View Controller and kept them in an Array and added them to my tabbar.viewControllers.

VBA Code Import - MS Access

I have several buttons coded with VBA behind an Access form. I will have a number of forms which will have these buttons in their footer (new, next, prev, duplicate etc). These buttons are not standard macros, but are simple enough to have the same code work across all of my forms.
How might I go about coding these buttons (which have the same names across all forms.. kind of template-like) so I don't have to copy-paste the code in all my forms? Is there a way to write these buttons in a Module and have the form import that module's text (kind of like most other languages)?
Just curious. Makes the code a lot cleaner/easier, as the beef of the programming is my own but others will be making small edits to the form code.
The simplest thing to do would be to create a Function for each button's functionality in a standard code module. Then change the Click property of each button from [Event Procedure] to the name of the function that corresponds with that button (eg, =MyPrevFunction([Form])).
Note that in order for this to work you must specifically use Function and not Sub. There is no requirement in VBA for a function to return anything, so simply substituting the word Function for Sub is all that is required to make the change.
A picture is worth a thousand words.
As well as the idea suggested by #mwolfe02, you can have your buttons in a subform, which means that only one set of buttons need to be edited, or better yet, set up your own custom menus. These can be invoked on a per form basis or as 'standard' menus for your application. You can even have your own right-click menus.