Calculator using buttons

Flash CS3/AS3
Hey all,
  Sorry, not trying to wear out my welcome but have a series of questions but maybe the best question is the 1st being how do you learn? I have posted in other forums as well as this one asking the best way to go about learning. My main issue is not having any code education and not knowing the 'best' approach. I tried just reading the help but that does nothing if I don't have a project to help put things in perspective. I do that now, I make a project for myself then find out how to do that (and if I can in Flash for that matter). I have a membership with linda.com and take notes all day, but sometimes don't even know what to look up to answer a question. This seems like a backward approach to me but has been fine until the last couple months in trying to better learn Actionscript. (would appreciate book titles also if that is a better method from reading tutorials and watching videos.)
The past few weeks I've been trying to do projects with user input and so far so good but now thinking I was going to something much simpler is proving the exact opposite and seems like a very complex project and maybe it would be better for one to look at it and tell me a better place to start.
"The Project"
My last calculator was input text and makes complete sense to me (know) how it works. This one I want a button to declare the value such as a number 1, 2, 3 etc, depending on the button. I would like to have a preview of what is being calculated as well. The more I play with it the worst I make it so stripped it and below is a cut down fla for those wanting to see what mean.
My test fla file is here. It has only one operator (+) and only two buttons for values (1 & 2). It has two dynamic text fields, one for preview and one for end result.
To just see the swf, click here.
If someone wants to show how they would do it, great!
If someone just wants to tell me where to start studying, great!
If someone can show me via example in using the provided fla, then I would name my first, second & third born after you
Thanks,
~Dan

I'd like to help you but the code you privided doesn't compile... is that what you have?

Similar Messages

  • Designing a calculator using selection screen(abap)

    hi i just now stepped into this technology. iam learning abap.  i like to jknow how to design a calculator using selection screen. 
    could any one give your  suggestions or any sites having such example programs . 
    thankyou

    Hi
    Welcome to SDN.
    Use the sample peace of code for design Calculator.
    Hi,
    Create push buttons for the + , - , / , * , = in your dialog program.
    Create an input field with the data type that can accept decimal places..
    When the enter 12 then press the push button "+" button store the value 12 in a variable v1..Then clear the input field..
    Then when the user enters another number..lets say "13"..
    Then if the user presses the "=" button...Then sum the values from the variable v1 with the input field..
    Hope this helps..
    Check this sample code..
    MODULE USER_COMMAND.
    CASE SY-UCOMM.
    WHEN 'ADDITION'.
    ASSUMING THE INPUT FIELD NAME IS P_INPUT.
    V_V1 = P_INPUT.
    V_OPERATION = '+'.
    CLEAR: P_INPUT.
    WHEN 'EQUALTO'.
    CASE V_OPERATION.
    ADDITION
    WHEN '+'.
    SUM UP THE VALUES.
    P_INPUT = P_INPUT + V_V1.
    ENDCASE.
    MULTIPLICATION
    WHEN '*'.
    MULTIPLY UP THE VALUES.
    P_INPUT = P_INPUT * V_V1.
    ENDCASE.
    ENDCASE.
    ENDMODULE.
    Regards,
    Sree

  • How can i use Button in BEx  7.0

    Dear Folks,
    Could you help me please ..
    In BI 7.0, for BEx analyzer i see we can use button, combo box, analysis grid.
    If i have a requirement like this:
    1. I have sales report, where it has information about sales person.
    2. And i want to filter that report with the sales person that i choose from combo box.
    For that requirement, i tried to :
    1. I Create a query to Sales info-provider for displaying sales.
    2. I Create a query to either to MD Sales person / Sales info-provider in order to get Sales persons data.
    3. I assign point no 1 to Analysis Grid.
    4. I assign point no 2 to Combo box.
    My questions are:
    a. Is my techniques correct ??
    b. How can i use button to execute filter into the corresponding report ???
    c. Is there any tutorial regarding this ?? Could you share it to me please ..
    Really need your guidances..
    regards,
    Niel..

    Hi Niel,
    You can use the method you specified.
    In Bex Analyzer you have design mode where you can have the following items Button, Analysis Grid and Combo box.
    To work with the button you need to use the Command Wizard which consists of pre-defined functions, out of those select the one which suits your requirement and supply the parameters. As it is done thorugh a Wizard it would be easy to do.
    Also,
    The Button Name displays the name of the button, which is generated automatically and is unique. This name is used on the BEx Analyzer Design Toolbar menu to refer to a particular instance of the button.
    · Range u2013 Manipulate coordinates for a cell or cells in this field to move or resize the button.
    · Button Text - The text (caption) you want to display on the button. You can use this to describe the command the button executes.
    · Command Range (optional) - Specify a three-column range of cells in the worksheet that contains command parameters. In these cells, you provide the same parameters (Name, Index, and Value) as in the Static Parameters, but in the worksheet these can be variable, changing during
    navigation based on query results or on a value you manually specify.
    Button in Bex analyzer
    Regards,
    Neelesh Jain.

  • PDF Form javascript for making readonly field by using button

    Please let me know the PDF Form JavaScript for making selected fields(Text field,Drop down list,..) as read-only by using Button.

    Do you want your button to be made read only?
    One starts with Acrobat JS Reference.
    // make all fields in a form read only;
    var oField; // variable for field being processed;
    // loop through the form fields;
    for (var i = 0; i < this.numFields; i++) {
    // process each field name;
    oField = this.getField(this.getNthFieldName(i)).readonly = true;

  • In making a form, I've used buttons for user to select a state. Can I make it go to cities next?

    I don't know the correct terminology, so I don't think that I've posed my question very well.  Employees will be using the form that I'm trying to make, and I want for them to be able to select a city from a large number of cities, and for that city to ultimately show up on the form (not merely in the data that is output.)
    I thought that the clearest way for them to select a city would be for them to start by selecting the pertinent state first.  That would allow the list of cities in that state to be shorter and more manageable.  So I'd like for them to be able to select a state, and then by virtue of that selection, have a list of cities pop up.  I sort of achieved that by using buttons for the states, and then under "actions", I chose "open a file".  Then I set it up to open a file that contained the cities that are options,and set each city with a button. 
    The result is that it goes from my form to a second window, containing states and then to a third window, containing cities.  (Actually, there are multiple "city" windows because there's a list of cities for each state.)  But then I'd like for the city that they select to wind up being on my original form.  Is there an "action" that I can choose that will make that happen?
    Or is there a better way to accomplish what I'm trying to accomplish?  Maybe I'm just going about this all wrong(?) Any suggestions would be very much appreciated  Thank you!

    Yes, there is a much better way. I'd recommend using a combo box for the list of states. When the user selects a state, the list of associated cities would populate a second combo box, allowing the user to select a city. This type of functionality relies on JavaScript. If you are unfamiliar with with JavaScript in Acrobat, I'd suggest starting with the following article: http://acrobatusers.com/tutorials/2007/js_list_combo_livecycle/
    Ignore anything to do with LiveCycle Designer. If you get stuck, post again.

  • How to move a selected row data from one grid to another grid using button click handler in flex4

    hi friends,
    i am doing flex4 mxml web application,
    i am struck in this concept please help some one.
    i am using two seperated forms and each form having one data grid.
    In first datagrid i am having 5 rows and one button(outside the data grid with lable MOVE). when i am click a row from the datagrid and click the MOVE button means that row should disable from the present datagrid and that row will go and visible in  the second datagrid.
    i dont want drag and drop method, i want this process only using button click handler.
    how to do this?
    any suggession or snippet code are welcome.
    Thanks,
    B.venkatesan.

    Hi,
    You can get an idea from foolowing code and also from the link which i am providing.
    Code:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
    width="613" height="502" viewSourceURL="../files/DataGridExampleCinco.mxml">
    <mx:Script>
    <![CDATA[
    import mx.collections.ArrayCollection;
    import mx.binding.utils.BindingUtils;
    [Bindable]
    private var allGames:ArrayCollection;
    [Bindable]
    private var selectedGames:ArrayCollection;
    private function initDGAllGames():void
    allGames = new ArrayCollection();
    allGames.addItem({name: "World of Warcraft",
    creator: "Blizzard", publisher: "Blizzard"});
    allGames.addItem({name: "Halo",
    creator: "Bungie", publisher: "Microsoft"});
    allGames.addItem({name: "Gears of War",
    creator: "Epic", publisher: "Microsoft"});
    allGames.addItem({name: "City of Heroes",
    creator: "Cryptic Studios", publisher: "NCSoft"});
    allGames.addItem({name: "Doom",
    creator: "id Software", publisher: "id Software"});
    protected function button1_clickHandler(event:MouseEvent):void
    BindingUtils.bindProperty(dgSelectedGames,"dataProvider" ,dgAllGames ,"selectedItems");
    ]]>
    </mx:Script>
    <mx:Label x="11" y="67" text="All our data"/>
    <mx:Label x="10" y="353" text="Selected Data"/>
    <mx:Form x="144" y="10" height="277">
    <mx:DataGrid id="dgAllGames" width="417" height="173"
    creationComplete="{initDGAllGames()}" dataProvider="{allGames}" editable="false">
    <mx:columns>
    <mx:DataGridColumn headerText="Game Name" dataField="name" width="115"/>
    <mx:DataGridColumn headerText="Creator" dataField="creator"/>
    <mx:DataGridColumn headerText="Publisher" dataField="publisher"/>
    </mx:columns>
    </mx:DataGrid>
    <mx:FormItem label="Label">
    <mx:Button label="Move" click="button1_clickHandler(event)"/>
    </mx:FormItem>
    </mx:Form>
    <mx:Form x="120" y="333">
    <mx:DataGrid id="dgSelectedGames" width="417" height="110" >
    <mx:columns>
    <mx:DataGridColumn headerText="Game Name" dataField="name" width="115"/>
    <mx:DataGridColumn headerText="Creator" dataField="creator"/>
    <mx:DataGridColumn headerText="Publisher" dataField="publisher"/>
    </mx:columns>
    </mx:DataGrid>
    </mx:Form>
    </mx:Application>
    Link:
    http://social.msdn.microsoft.com/Forums/en-US/winformsdatacontrols/thread/ae9bee8d-e2ac-43 c5-9b6d-c799d4abb2a3/
    Thanks and Regards,
    Vibhuti Gosavi | [email protected] | www.infocepts.com

  • Trying to use Buttons and keep getting an error code

    I am trying to use buttons and I keep getting the error code ReferenceError: Error #1074: Illegal write to read-only property graphics on flash.display.MovieClip.
    There is one button that doesnt appear when I view it live/in browser/ in flash professional
    I have created this button the SAME way, about 36 times, as the other buttons that work fine. What am I doing wrong?
    PLEASE HELP ASAP...

    The error appears to involve trying to assign a value to the graphics property of a MovieClip.  Do you have code that uses something.graphics =

  • Fixed: How to remember the DataTable state and still use buttons

    Lets say that you have a DataTable on a page, with a bunch of hyper links and buttons on the same page (for navigation to various parts of your application). If you use the built in pagination and sorting, you will find that the following behaviour:
    1. DataTable remembers its state (sorting, page number, etc.) if you click on any hyper link. You can even go back to a different page, and then come back to the original page to find that your DataTable is in the state you left it (very cool, it is session scope and works as intended).
    2. If you click on any button, DataTable does not remember its previous state (goes back to page 1 and default worting, etc.). After playing around with it and going nuts, I discovered the way to use Button and still have the DataTable remember its state. I wanted to share it with the rest of you:
        public String btnClose_action() {
            try {
                this.getExternalContext().redirect("faces/users.jsp");
            } catch (Exception ex) {
                log("Error: userDetail > btnClose_action", ex);
            return null;
        }This was my original post:
    http://swforum.sun.com/jive/thread.jspa?threadID=103583
    Message was edited by:
    Sabir

    II think there should be a property
    to disable form submission on buttons. There is!
    To make the form not be submitted by a button click:
    1. In the Visual Designer, select the button.
    2. In the Properties window set the JavaScript > onClick property to return false;
    This might interest you: http://blogs.sun.com/divas/entry/disabling_a_button_after_it

  • Help!!! How to implement a special useful button in tool bar?

    How to implement a special useful button in tool bar, when the button is clicked, then a menu shows under the button, just like the Internet Explorer's back button and forward button, there is a black arrow at the two buttons right, when click the black arrow, a menu shows under the back button or forward button, how to implement this in java?
    Please help!!!
    Thanks!!!

    Like an enhanced JComboBox?
    ;o)
    V.V.

  • Possible water damaged ipod shuffle, turns on and plays music, but have 3 seconds after turning it on to use buttons then they all lock up

    possible water damaged ipod shuffle, turns on and plays music, but have 3 seconds after turning it on to use buttons then they all lock up

    I think that you need to get a new one. I got mine at http://www.prizerebel.com/index.php?r=1552886

  • JDev- how to add data from postgres using buttons in a JClientEmptyForm

    hi! can anyone help me about my problem.. im working on a system that needs to use buttons for adding entries... can anyone give me some reference code that can help me figure out the solution to my problem.. i really appreciate if u answer immediately...thankz..

    Open the file, parse it, populate an ArrayCollection or XMLListCollection, and make the collection the DataGrid dataProvider:
    http://livedocs.adobe.com/flex/3/html/help.html?content=Filesystem_08.html
    http://livedocs.adobe.com/flex/3/html/help.html?content=12_Using_Regular_Expressions_01.ht ml
    http://livedocs.adobe.com/flex/3/html/help.html?content=dpcontrols_6.html
    http://livedocs.adobe.com/flex/3/langref/mx/collections/ArrayCollection.html
    http://livedocs.adobe.com/flex/3/langref/mx/collections/XMLListCollection.html
    If this post answered your question or helped, please mark it as such.

  • Is it possible to use booleans to build a VI that uses buttons to switch between screens (3 only) while the other screens disappear?

    As a beginner, I need help figuring out how to build a simply VI that uses boolean logic to switch between three different screens. I need a "Home" screen, the next screen which has a button to go back "Home" and a third screen which has two buttons to go "Home" and "Previous Screen". Can someone help me with a simple block diagram?

    Hi,
    Or put the data in three tab controls. The tabs itself are hidden. The
    program switches between the tab sheet if one of the buttons is pressed.
    The buttons are best not copied, e.g. the same buttons are used in every tab
    sheet (buttons hover above the tab, a black shadow will apear). If the first
    sheet is shown, button 2 and 3 are hidden, sheet two: only button 3 is
    hidden, sheet three no button is hidden.
    Showing the tabs allows the user to choose the views directlly. The button
    logic is not needed anymore. But you'll have to live with a simple tab
    sheet, instead of a fancy button system!
    Regards,
    Wiebe.
    "Jason R" wrote in message
    news:[email protected]...
    > Another solution if you want to avoid property-node hell...
    >
    > Divide your screen into 1/4ths. That is, make your FP 4x larger than
    > your desktop.
    >
    > Place screen 1 on the upper left quadrant.
    > Place screen 2 on the upper right quadrant.
    > Place screen 3 on the lower left quadrant.
    > Screen 4 (lower right quadrant) is unused.
    >
    > Disable the ability to scroll at run time.
    >
    > As the user clicks buttons, use the properties of this vi to move what
    > the user can see on the front panel.
    >
    > Cheating? yep. Easier? yep.
    >
    > Hope this helps! =)
    >
    > btw - be sure not to update the FP controls when they are not visible,
    > or this will eat processor cycles.
    >
    > Sincerely,
    > Jason G Richmond
    > Project Engineer II and LVAAD Instructor
    > VI Engineering
    > [email protected] (domain should be vieng.com (no A's))
    >
    >
    > missileman wrote:
    > > Is it possible to use booleans to build a VI that uses buttons to
    > > switch between screens (3 only) while the other screens disappear?
    > >
    > > As a beginner, I need help figuring out how to build a simply VI that
    > > uses boolean logic to switch between three different screens. I need a
    > > "Home" screen, the next screen which has a button to go back "Home"
    > > and a third screen which has two buttons to go "Home" and "Previous
    > > Screen". Can someone help me with a simple block diagram?
    >
    >

  • How to pass characterstic variable value using button in sap wad

    Hello Gurus,
    I have one requirement in WAD 7.0.i have made one user input characterstic variable in Bex i.e on 0calmonth.Now i have passed the same variable in WAD drop down button.Now suppose based on the logic on that variable which i have made in bex is like when i select 04.2010 in drop down button it dispalys data for next three months.
    Now my user wants same thing to be displayed with the help of button as well. I need to make two buttons one for previous month and other for next month.I made two button using button group and passed that variable also but data is not changing.
    How to get the desired output using buttons.
    I want two buttons like this <<(previous) >>(next) and i want to pass that same variable which i passed in drop down button and when i press previous button it should display last month data and when i press next it should display next month data.
    How to achieve this in WAD with the help of buttons.Give me your useful suggestions.
    Hope my requirement is clear.
    Thanks in advance
    Regards,
    AL

    Need your valuable suggestions on this...

  • How to connect one page using button and by link in BSP

    how to connect one page using button and by link in BSP

    hi,
    use on 'onclick' functionality.
    1. In layout, onclick = 'NEXT_PAGE' of the button
    2. Capture the event in onInputprocessing,
    DATA: event_id TYPE REF TO  cl_htmlb_event.
    case event_id.
    when 'NEXT_PAGE'.
                navigation->goto_page( 'URPAGE URL' ).

  • Interactive ROI Calculator using Flash Catalyst?

    Hello, a client of ours has asked us to create an interactive ROI calculator similar to the one in the following link:
    http://bit.ly/98vjCF
    Our design and production department does work in Flash, mainly to create simple web banners, however they're not hardcore Flash developers by any means. We'll be upgrading from CS4 to CS5 with Catalyst soon. Is it possible to create an interactive ROI calculator using this software or would using a seasoned Flash developer be a better choice?
    Thanks for any info.
    henry

    Hi Henry,
    You can use Flash Catalyst to design the UI of your calculator, both for protyping and optionally for final production too.  However, to do the actual calculations you'll have to write a bit of code using another tool.  For example, you can import the Catalyst project into Flash Builder and wire up the calculation logic to the UI you've created.  This gives you the option of having a nontechnical designer work on the UI, while a less design-oriented developer writes code without having to worry much about the visuals.
    The underlying code used in a Catalyst project is Flex 4.  This should be a snap for a seasoned Flash developer to work with.  Or, a Java or JavaScript developer should also be able to get up to speed on Flex pretty easily (especially if the UI was already built in Catalyst and the dev is just wiring up the "business logic").
    Hope that helps,
    - Peter

Maybe you are looking for

  • Magic Mouse works properly only on one user Account

    I just bought a Magic Mouse to use with my PPC Imac.  I have two users set up on this iMac and I set up the mouse while using one of those user accounts.  By the way I set it up to be a left-handed mouse with the left button being for the secondary (

  • "Date / Date Time" type parameters in crystal reports 2008

    i am using parameters in crystal report to select records. one of the parameters is "From Date" of type Date Time. i mapped this parameter to a field "DateIn" of type smalldatetime in my sql table. Now, when i open the report it asks for "From Date"

  • Update Bank Account number in Line items

    Hi All, How to update Bank account number in the bank clearing account line item. I used sort key to update but unsuccessful. please let me know the way to update the bank account number in the line item Thanks. Raj Edited by: Raj Racha on Nov 29, 20

  • Premiere Pro CS6 Video Startup Problem

    I just updated to Premiere Pro CS6. On one of my systems it would not load because of the following error: Adobe Premiere Pro Startup Error: Adobe Premiere Pro could not start any capable video play modules. Please update your video display drivers a

  • Select Hidden Divs

    Hi I'm building a website in Edge Reflow, I have set the screen conditions (regions) and I want to show buttons when the window is under 480px wide. When the window goes over 480px wide, I want the buttons to disappear. When I set the div buttons to