PDA

View Full Version : Basic Flex questions


Jerry62712
11-12-2008, 04:53 PM
If this appears twice, please delete one if I can't. Our internet connectivity is very poor and I don't know if my first post with this title will appear or not.

I have three basic questions to start with, and a thousand to follow if I can get it working at all.

1) In design view I don't see the bottom of the page I'm working on. How can I get that?

2) When viewing it in FF3 or IE6 I can't scroll down either. At the application level vertical scrolling is on.

3) How do I get css into the text?

My code:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application
xmlns:mx="http://www.adobe.com/2006/mxml"
backgroundColor="#dedacf"
layout="absolute"
borderStyle="inset"
borderThickness="2"
paddingLeft="10"
paddingRight="10"
paddingTop="10"
paddingBottom="10" height="1002" verticalScrollPolicy="auto">
<mx:states>
<mx:State name="Result">
<mx:RemoveChild target="{householdInformationBox}"/>
<mx:RemoveChild target="{householdInformationPanel}"/>
<mx:RemoveChild target="{householdIncomeAndAssetsBox}"/>
<mx:RemoveChild target="{householdIncomeAndAssetsPanel}"/>
<mx:RemoveChild target="{householdExpensesBox}"/>
<mx:RemoveChild target="{householdExpensesPanel}"/>
<mx:RemoveChild target="{calculateButton}"/>
<mx:AddChild relativeTo="{calculateLabel}" position="lastChild">
<mx:Button id="returnToInput"
x="244" y="10"
label="Return"
click="returnToInputState()"
rollOverEffect="{glowButton}"/>
</mx:AddChild>
<mx:SetStyle target="{headerPeopleImage}" name="right" value="-2"/>
<mx:SetStyle target="{noticeTextLI1}" name="paddingLeft" value="25"/>
<mx:SetStyle target="{noticeTextLI1}" name="paddingRight" value="25"/>
<mx:SetStyle target="{noticeTextLI3}" name="paddingLeft" value="25"/>
<mx:SetStyle target="{noticeTextLI3}" name="paddingRight" value="25"/>
<mx:SetProperty target="{noticeTextLI1}" name="height" value="22"/>
<mx:SetProperty target="{noticeTextLI3}" name="height" value="24"/>
<mx:SetProperty target="{noticeTextBottom}" name="height" value="30"/>
<mx:SetProperty target="{noticeTextTop}" name="height" value="40"/>
<mx:SetStyle target="{noticeTextLI2}" name="paddingLeft" value="25"/>
<mx:SetStyle target="{noticeTextLI2}" name="paddingRight" value="25"/>
</mx:State>
</mx:states>

<mx:transitions>
<mx:Transition
id="tranToResult"
fromState="*"
toState="*">
<mx:Parallel>
<mx:WipeLeft duration="2000" />
<mx:Dissolve duration="2000" />
<mx:Glow duration="2000" />
</mx:Parallel>
</mx:Transition>
</mx:transitions>


<mx:Style source="../css/style.css" />

<mx:Glow
id="glowButton"
color="haloOrange"
duration="3000" />

<!-- ************************************************** *************** -->
<!-- ** start of the whole page ************************************** -->
<mx:VBox id="windowWorkspace"
styleName="imageStretch"
verticalGap="8">

<!-- ************************************************** *************** -->
<!-- ** start of the header area ************************************* -->
<mx:Canvas id="headerBlock">
<mx:Image id="headerDHSImage"
source="../images/DHSLogo.gif"
left="5" top="5"/>

<mx:Label id="headerIDHSLinkText"
text="Illinois Department of Human Services"
fontFamily="Arial"
fontSize="12"
fontWeight="bold"
selectable="true"
click="linkIDHS()"
left="80" top="0"/>

<mx:Label id="headerSectLinkText"
text="Carol L. Adams, Ph.D., Secretary"
fontFamily="Arial"
fontSize="11"
selectable="true"
click="linkIDHS()"
left="80" top="14"/>

<mx:Image id="headerColorBar"
source="../images/TabBarBackground.gif"
styleName="imageStretch"
left="0" top="34"
scaleX="8"/>

<!-- blue gradient behind following text and image -->
<mx:Image id="headerBackgroundImage"
source="../images/BannerBackground.jpg"
left="0" top="66" height="100"/>

<mx:Text id="headerIDHSandImageBar"
text="Illinois Department of Human Resources"
color="#ffffff"
fontWeight="bold"
bottom="8" left="6"
fontSize="20" width="60%"
textAlign="left" fontFamily="Arial"/>

<mx:Image id="headerPeopleImage"
source="../images/banner.jpg"
right="0" top="66"/>
</mx:Canvas>

<!-- ************************************************** *************** -->
<!-- ** start of the form area *************************************** -->
<mx:Canvas id="formHolder"
borderColor="#0000ff"
borderStyle="inset"
borderThickness="4"
>

<mx:Text id="bodyFormTopText"
text="Food Stamp Calculator"
width="100%"
textAlign="center"
fontSize="20"/>

<mx:Form id="bodyFormHolder">

<mx:Canvas id="languageSwitchCanvas"
width="100%">
<mx:LinkButton id="languageSwitch"
label="Espanol"
click="swapLanguage()"
right="0" top="0"
fontSize="13"/>
</mx:Canvas>

<!-- ************************************************** *** -->
<!-- ** Household Information Block ********************** -->
<mx:Panel id="householdInformationPanel"
title = "Household Information"
cornerRadius="10"
backgroundColor="#d5d5d5"
width="100%" height="115"
borderColor="black"
layout="vertical"
roundedBottomCorners="true"
headerHeight="18">

<mx:Canvas id="householdInformationBox"
cornerRadius="4"
backgroundColor="#D5D3D3"
toolTip="Enter Household Information"
borderStyle="none" borderColor="black"
width="100%" height="100%"
horizontalCenter="0" top="0">

<mx:FormItem id="householdSizeLabel"
label="Household Size"
horizontalAlign="right"
required="true"
top="5" right="53">
<mx:TextInput
id="householdSizeData"
width="25" />
</mx:FormItem>

<mx:FormItem id="householdExceptionsLabel"
label="Household Exceptions"
top="32" right="5"
horizontalAlign="right">
<mx:ComboBox id="householdExceptionsData"
width="75"
dataProvider="{englishYesNo}" />
</mx:FormItem>

<mx:FormItem id="householdTANFLabel"
label="Household TANF"
top="59" right="5"
horizontalAlign="right">
<mx:ComboBox id="householdTANFData"
width="75"
dataProvider="{englishYesNo}" />
</mx:FormItem>
</mx:Canvas>
</mx:Panel>

<!-- ************************************************** *** -->

<!-- ** Household Income and Assets Block **************** removed to fit size limit here -->

<!-- ************************************************** *** -->
<!-- ** Household Expenses Block ************************* removed to fit size limit here -->

<!-- ************************************************** *** -->
<!-- ** Standard Utility Allowence Block ***************** -->
<mx:Panel id="householdStandardUtilityAllowancePanel"
title = "Standard Utility Allowance"
cornerRadius="10"
backgroundColor="#d5d5d5"
width="100%" height="65"
borderColor="black"
roundedBottomCorners="true"
headerHeight="18">

<mx:Canvas id="householdStandardUtilityAllowanceBox"
bottom="2"
cornerRadius="4"
backgroundColor="#D5D3D3"
toolTip="Select Standard Utility Allowance"
borderStyle="none" borderColor="black"
width="100%" height="100%">
<mx:FormItem id="householdStandardUtilityAllowanceLabel"
top="5" right="5"
horizontalAlign="right">
<mx:ComboBox id="householdStandardUtilityAllowanceData"
width="600"
dataProvider="{englishDropDownUtility}" />
</mx:FormItem>
</mx:Canvas>
</mx:Panel>

<!-- ************************************************** *** -->
<!-- ** calculation button ******************************* -->
<mx:Canvas id="calculateLabel"
width="100%"
height="100%">
<mx:Button id="calculateButton"
label="Calculate Now"
click="swapToResultsState()"
rollOverEffect="{glowButton}"
fontSize="13" horizontalCenter="0"/>
</mx:Canvas>
</mx:Form>
</mx:Canvas>

<mx:Canvas id="noticeCanvas">
<mx:Panel id="noticePanel"
title="Notice"
cornerRadius="20"
backgroundColor="#d5d5d5"
borderColor="#000000"
x="0" y="0"
roundedBottomCorners="true"
headerHeight="16">
<mx:Text id="noticeTextTop"
text="Notice\n\n
In accordance with Federal Law, U. S. Department of \n
Agriculture (USDA ), and U.S. Department of Health and \n
Human Services (HHS) policy, the Department of Human \n
Services is prohibited from discriminating on the basis of\n
race, color, national origin, sex, age, disability, \n
religion, or political belief. To file a complaint of\n
discrimination, contact either the Department of Human \n
Services, USDA, or HHS. Contact information is listed below:"
textAlign="center"/>
<mx:Text id="noticeTextLI1"

text="li1"
styleName="liStyle" />
<mx:Text id="noticeTextLI2"
text="li2"
styleName="liStyle" />
<mx:Text id="noticeTextLI3"
text="li3"
styleName="liStyle" />
<mx:Text id="noticeTextBottom"
text="English Initially"/>
</mx:Panel>
</mx:Canvas>
</mx:VBox>
</mx:Application>

Thanks in advance for this basic stuff. We had it in class, but I can't seem to get it to work in the real world. (Script removed for size limit here)