mercredi 21 septembre 2016

Flex - How to do calculation in Flash Builder

<?xml version="1.0" encoding="utf-8"?>
<s:View xmlns:fx="" 
    xmlns:s="library://" title="BMI Calculator">

        protected function calculate_clickHandler(event:MouseEvent):void
            // TODO Auto-generated method stub


    <!-- Place non-visual elements (e.g., services, value objects) here -->
    <s:Button label="Back" click="navigator.pushView(MainHomeView)" styleName="back"/>
<s:Label x="33" y="61" fontSize="30" text="Weight(kg) :"/>
<s:Label x="34" y="140" fontSize="30" text="Height(cm) :"/>
<s:TextInput id="mywieght" x="216" y="40" width="228" prompt="0.0kg" textAlign="right"/>
<s:TextInput id="myheight" x="216" y="119" width="228" prompt="0.0cm" textAlign="right"/>
<s:Button id="calculation" x="31" y="260" width="413" label="Calculate" fontSize="36"
<s:Label id="myresult" left="31" right="36" height="146" fontSize="72" fontStyle="normal"
         fontWeight="bold" text="0.0" textAlign="center" verticalAlign="middle"

this is the gui for a BMI calculator. i dont really have the basic of using flash builder. can anyone teach me how to use the data input by user inside the textinput and then use it for calculation and display it? thanks

Aucun commentaire:

Enregistrer un commentaire