Step 1: Make New Project :
Create a new project in flex from menu File-->New.

Step 2: Create workspace :

Step 3: Create states

Step4: Create base template :

To create Header of website .Select the base state and place the image component and give source as logoimage. In this case we have placed askmeflash.com logo.
Below logo we want to display our flex website page links. So we placed an Hbox below logo and placed link buttons inside it. Change the labels of buttons to page names in our case its Articles,Contact,Questions,Tutorials.
In footer we have placed a Hbox and placed Text inside to display copyright information of our Flex Website.
Step5: Add content to pages or states

To add content to articles page . Select the articles state.
Add canvas container to the empty area below links.
Now we can add any design elements like Label ,Image Text etc to canvas component.
Similarly select each state and add content to it .
Step6: Link buttons to states
Select articles button and Switch to source view by clicking Source button
Now add the click event to link button tag and set click="currentState='articles'"
Here articles is state name . Now do this for all the buttons .

Step5: Add content to pages or states

Step6: Link buttons to states
Here articles is state name . Now do this for all the buttons .
Now you can view Your simple website......
No comments:
Post a Comment