Master Adobe Flash CC's Basic Actions and Code Snippets

Updated on Jan 02,2024

Master Adobe Flash CC's Basic Actions and Code Snippets

Table of Contents

  1. Introduction
  2. Setting Up the Design
  3. Adding ActionScript and Coding
  4. Creating the Home Page
    • Adding Buttons for Navigation
    • Setting up Instance Names
    • Adding Coding for Navigation
    • Debugging and Testing
  5. Creating the Content Pages
    • Setting up Instance Names for Each Page
    • Adding Coding for Navigation to Each Page
    • Debugging and Testing
  6. Introduction to Gestures
    • Understanding Swipe Gestures
    • Adding Swipe Gestures to the Design
    • Testing and Debugging Gestures
  7. Enhancing the Design
    • Adding More Actions and Keyframes
    • Implementing Stop Functions on Every Page
    • Enabling Swipe Gesture on All Pages
  8. Conclusion

Adding ActionScript and Coding

In order to enhance the navigation of my application, I need to incorporate ActionScript and coding into my design. This will allow users to click on buttons and navigate to specific content pages. I have already set up my design with a home page and various content pages. Now, I need to add coding to make the navigation possible.

To begin, I will navigate to the specific instance that I want to add the coding to. For example, let's focus on the "game design" button on the home page. By left-clicking on the square button, I can access the properties window and assign an instance name, such as "game design".

Next, I will go to the "Window" menu and scroll down to select "Code Snippets". Here, I will find the ActionScript folder and navigate to the "Timeline Navigation" options. By selecting "Click to go to frame and stop" and double-clicking on it, the actions window will open, displaying comments and the actual scripting.

Lines 2 to 8 are comments left by the Adobe programmer to help us understand the coding better. The actual coding starts on line 10 and ends at line 15. This coding ensures that when the user clicks on the "game design" object, the computer listens for a mouse click. Once it detects the click, it carries out the function defined below. This function will make the user go to and stop at a specific frame number.

Since my "game design" page starts on frame 2, I will change the frame number in the coding to 2. Once the changes are made, I can close the actions window.

Now, if I test the application, I will Notice that my portfolio is on an infinite loop. To fix this, I need to add a stop frame action to frame 1. By left-clicking on frame 1 on the actions layer, I can access the actions window again. On line 1, I will hit the return key once, go back to line 1, and Type in the word "stop". This action will ensure that the application stops on frame 1 and does not proceed further.

By following these steps, I can successfully add ActionScript and coding to enable navigation within my application. I will repeat this process for other buttons and content pages to Create a seamless user experience.

Overall, by incorporating coding and ActionScript, I can enhance the functionality of my application and provide users with an intuitive navigation system.

Most people like