jeudi 19 janvier 2017

Flex4 - Use ButtonBar to navigate from one .mxml file to another

I am creating a Windowed Application in Flex3 with Adobe Flash Builder 4.7

I have two .mxml files (Main.mxml and Home.mxml)

In Main.mxml I have ButtonBar, when the user clicks on the Home ButtonBar, I want the user to be redirected to Home.mxml

I have been googling this for awhile now and there is no clear answer on this.

I have looked into ViewStack and TabNavigator and States, I am not sure if that is what I am looking for.

Here is my Main.mxml File

<?xml version="1.0" encoding="utf-8"?>
<s:WindowedApplication xmlns:fx="" 


        @namespace s "library://";
        s|ButtonBar s|ButtonBarButton:upAndSelected,
        s|ButtonBar s|ButtonBarButton:overAndSelected,
        s|ButtonBar s|ButtonBarButton:downAndSelected,
        s|ButtonBar s|ButtonBarButton:disabledAndSelected {
            chromeColor: #666666;
            color: #FFFFFF;
            fontSize: 32;
        s|ButtonBar { 
            chromeColor: #000000;
            color: #FFFFFF;
            fontSize: 32;
            bottom: 0;
            typographicCase: uppercase;

    <s:ButtonBar width="100%" height="13%">  


and here is my Home.mxml file

<?xml version="1.0" encoding="utf-8"?>
<s:WindowedApplication xmlns:fx="" 
        <!-- Place non-visual elements (e.g., services, value objects) here -->

    <s:Label text="Here"/>


Please Help

Aucun commentaire:

Enregistrer un commentaire