IT tutorials
 
Graphics
 

Adobe Flash Catalyst CS5 : Trigger View State Changes with Buttons

5/24/2013 7:42:00 PM
- How To Install Windows Server 2012 On VirtualBox
- How To Bypass Torrent Connection Blocking By Your ISP
- How To Install Actual Facebook App On Kindle Fire

In order to allow your user to move from one state to the next, you need to add an interaction to an element in the application. Almost any component can be used for this interaction, but the most commonly used one will be a button.

1. Create the interaction

Creating the interaction on a button is very straight-forward, as buttons are designed for interaction. In the following steps, you will add the ability for the user to click the Place Order button in the Home State to be taken to the Subscription State.

  1. In the main application's HomeState, double click the component on the page and then click the Place Order button (see Figure 1).

    Figure 1. Selecting the Place Order button
  2. If necessary, expand the Interactions panel by double-clicking its tab (see Figure 2).

    Figure 2. The Interactions panel
  3. Click Add Interaction.

  4. Ensure that the first drop-down list is set to On Click, and the second to Play Transition to State.

  5. From the Choose State menu, select SubscriptionState (see Figure 3).

  6. Click OK. The interaction has now been added to the button (see Figure 4). When run through Flash Player, the application will allow users to click the button and trigger the state change.

Figure 4. Creating an interaction to transition to another state

Figure 5. The completed interaction

2. Test the interaction

After you create an interaction to trigger a state change, you can test it by running the project. Follow these steps:

  1. Choose File => Save. It is not required that you save the project before running it, but it is highly recommended.

  2. Click File => Run Project (see Figure 6). Catalyst will build the project — which may take a minute or so, depending on the speed of your computer — and then open it in Flash Player.

  3. Click the Purchase Now button. The project will change to show the Subscription state. The transition to the state will be instantaneous.

Later in this chapter, I will discuss adding animation to the state change. Also, keep in mind that there is nothing in this application to validate that the form on the home page be filled out before moving to the subscription state.

In a real application, you would want to add the necessary code to implement validation. You would need to add this code in Flash Builder; however, that is not something currently supported by Catalyst.

Figure 6. Running the project from the File menu
 
Others
 
- Adobe Flash Catalyst CS5 : Components with Built-in View States
- Adobe Flash Catalyst CS5 : Create New States within a Component
- Adobe After Effects CS5 : Animating Text - Adding motion blur, Exporting to Adobe Flash Professional CS5
- Adobe After Effects CS5 : Animating Text - Animating a nontext layer along a motion path
- Adobe After Effects CS5 : Animating Text - Cleaning up the path animation
- Adobe Fireworks CS5 : Working with Vector Graphics - Drawing the shape
- Adobe Fireworks CS5 : Working with Vector Graphics - Editing paths
- Adobe Flash Professional CS5 : Working Within the Flash Environment - Docking and Undocking Panels, Grouping and Ungrouping Panels
- Adobe Flash Professional CS5 : Working Within the Flash Environment - Working with Panels
- Adobe Flash Professional CS5 : Working Within the Flash Environment - Using the Tools Panel
 
 
Top 10
 
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
programming4us programming4us
 
Popular tags
 
Video Tutorail Microsoft Access Microsoft Excel Microsoft OneNote Microsoft PowerPoint Microsoft Project Microsoft Visio Microsoft Word Active Directory Biztalk Exchange Server Microsoft LynC Server Microsoft Dynamic Sharepoint Sql Server Windows Server 2008 Windows Server 2012 Windows 7 Windows 8 Adobe Indesign Adobe Flash Professional Dreamweaver Adobe Illustrator Adobe After Effects Adobe Photoshop Adobe Fireworks Adobe Flash Catalyst Corel Painter X CorelDRAW X5 CorelDraw 10 QuarkXPress 8 windows Phone 7 windows Phone 8 BlackBerry Android Ipad Iphone iOS
Celebrity Style, Fashion Trends, Beauty and Makeup Tips.