Select to view content in your preferred language

Welocme Disclaimer Contact Us combo window

505
3
06-03-2010 12:56 PM
DanielMunoz
Regular Contributor
Hello All,

I was wondering if some can offer ideas or code to implement a combo help/disclaimer/welcome window like:

https://mapping.ssc.nsw.gov.au/Sutherland/

Thank you
Tags (2)
0 Kudos
3 Replies
AlexJones
Emerging Contributor
Start with a Title window and use this as the "Shell" for everything you want to have.(Help,disclaimer,etc) Each portion can be split out into a new mxml component. So, you will have:
Shell.mxml (root)
help.mxml
disclaimer.mxml
welcome.mxml.

I would base each of the sub-components on a canvas to make the sizing and layout a bit easier.


The shell.mxml simply needs to have two main parts.
1. A link bar
2. View stack

The ViewStack will use each of your components that you have created. In order to do this you will need to make sure your title window(shell) imports the correct namespace. Change this accordingly.

xmlns:yourStuff="com.esri.solutions.flexviewer.widgets.yourStuff*"


<mx:LinkBar dataProvider="{ViewStack}"/>
<mx:ViewStack id="ViewStack" borderStyle="solid" width="100%" height="100%" color="0x323232" top="31">
        <yourStuff:disclaimer id="disclaimer" label="Disclaimer"/>
        <yourStuff:help id="help" label="Help"/>
        <yourStuff:welcome id="help" label="Welcome"/>
</mx:ViewStack>

After you have the title window set up and your code for each component. You can use the PopUpManager to open the title window.

Unfortunately I don't have any complete code for you, but I hope this is enough to get you started. Please let me/the forum people know if you need any help.

Alex
0 Kudos
DanielMunoz
Regular Contributor
Alex. Thanks for the help this is definitely enough to get me going. Daniel
0 Kudos
AlexJones
Emerging Contributor
http://www.switchonthecode.com/tutorials/flex-snippet-tutorial-view-stack-component


Essentially the same thing in a very simple panel.

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
   width="397" height="365">
  <mx:Panel x="0" y="0" width="397" height="365"
     layout="absolute" title="ViewStack LinkBar Example">
    <mx:LinkBar dataProvider="{vsMain}" fontWeight="Bold" x="51" y="3"/>
    <mx:ViewStack horizontalCenter="0" y="30" id="vsMain"
       width="95%" height="87%" borderStyle="solid">
      <mx:Canvas label="Search Items" width="100%" height="100%"
         backgroundColor="#12AE63">
        <mx:Label horizontalCenter="0" verticalCenter="0" text="Search Items"
           fontSize="17"/>
      </mx:Canvas>
      <mx:Canvas label="Browse Items" width="100%" height="100%"
         backgroundColor="#F22131">
        <mx:Label horizontalCenter="0" verticalCenter="0" text="Browse Items"
           fontSize="17"/>
      </mx:Canvas>
      <mx:Canvas label="Add Items" width="100%" height="100%"
         backgroundColor="#1231FF">
        <mx:Label horizontalCenter="0" verticalCenter="0" text="Add Items"
           fontSize="17"/>
      </mx:Canvas>
    </mx:ViewStack>
  </mx:Panel>
</mx:Application>
0 Kudos