Home > Articles > Graphics & Web Design > Dreamweaver & Flash

This chapter is from the book

This chapter is from the book

Customize the Introduction

There are several options and elements that you can customize easily so that the Introduction is truly your own creation.

Sound Control Button

It's important to provide users with a way to silence the soundtrack while they continue to view your movie. It's not always desirable to listen to high-energy music through an entire site visit, and if you don't provide your viewer with a way to turn down the sound, it can become annoying. The speaker graphic is actually a Movie Clip that contains two identical buttons—one that enables the user to turn off the soundtrack and another to turn it back on.

Double-click the speaker button to go to the Music On-Off Movie Clip. In the Actions layer, you see two keyframes. The first has a stop() action. Below that layer is the Sound Loop layer that contains the music loop in the first keyframe. The bottom layer is titled Mute/Play Sound Button and contains a button instance in each keyframe, a speaker for On, and a speaker with a slash for Off.

Use swap symbols in the Instance panel to replace these buttons with something new. If you delete and replace the instance of the buttons in the Movie Clip, you'll lose the code that allows them to function properly. This is especially important because the speaker button contains the code:

on (release) {
 stopAllSounds ();
 nextFrame ();

This code sends the play head to the second keyframe that doesn't contain a sound clip. The script also contains the command stopAllSounds(). This command is essential because the music snippet is set to loop 100 times. Even if the play head is sent to a keyframe where no sounds exist, the snippet will continue to loop until it hits 100, unless Flash mutes it.

Double-click the first frame of the Sound Loop layer to see the properties in the Sound Properties window. This symbol, called Music Loop, is a 44khz, 16-bit snippet of stereo sound. The sync is set to Event and will loop through 100 times before it stops. When you replace this snippet with your own loop, you'll need to set the sync to Event and set the Loops option so that the music snippet will loop at least 100 times. There's a list in the online resource appendix of suggested sources for music loops edited especially for Flash users.

Figure 3.19 Music On/Off button on Stage.

Go to Main Movie Button

One of the first interactive choices that you should offer your users is the option to skip the Introduction section entirely. If this is the 50th time they've come to visit your site, or if they just want to get straight to the content, the Go button enables them to get right to the heart of your movie.

You can swap out the go2 button instance with your own graphic by using the swap symbols option on the Instance panel. If you look in the ActionScripting window, you'll see the code attached to the button:

This is where you tell the "go to main button" where to go.
"Main" is the name of the scene you are going to, and "MainMovie",
is the name of the first frame on the homepage. 

on (release) {
 gotoAndPlay ("Main", "MainMovie");

As you can see from the comments in the code, this refers to the label placed in the keyframe of the beginning of the Main scene. If you change the label in this location, be sure to update this code. You can also see that it will mute all sounds that are playing so you don't get a bleed over into the home page section.

Figure 3.20 Go to Home Page button.

Customizing the Text

The Loaded Text graphic symbol is found in the Loaded Text layer. The text in the graphic symbol is a static text field so you can replace the current font with any font you choose and it will render correctly when it is played, regardless if the user has the font installed on their system or not. You can also change the color of the text, the Tween motion, and the rate of entry of the graphic.

Figure 3.21 Loaded text on the Stage.

3-D Animations

The 3-D animation of steel washers is actually a Movie Clip titled 3-D_Animation. If you double-click the Clip instance on the Stage, you'll see the animation is a series of images similar to an animated .gif. You can replace these animations with your own design. There's software on the market tailored to provide developers with tools to create sophisticated animations quickly and easily. Some of these are listed in the online resource appendix.

Figure 3.22 3-D_animation on the Stage.

Random Quote Generator

One of the unique features of this introductory animation is the random quote generator. You can edit this section to reflect your quotes, company taglines, slogans, products or services features, and so forth.

Notice the Random Quotes layer in the Main Timeline. This layer contains the Random Quote Movie Clip. Double-click this Movie Clip to view its Timeline. The Random Quote MC is currently constructed to run through a list of 10 quotes that reside in the Library, choose one at random, and have it tween across the top of the Stage from the left side to the right side behind a mask. The process repeats with a different quote each time.


Inside the Random Quote Movie Clip is the Border layer. This layer contains the outline of the space where the quotes tween through. The outline isn't a symbol; it's drawn directly on the Stage. You can edit the color by using the Stroke panel.

Replacing Quotes

It is exceedingly simple to replace these quotes with your own copy. Notice that there is a folder in the Library titled Random Quote Materials. Double-click to expand its contents and you will see a list of quote symbols from 1 to 10. Double-click each quote in the Library to edit the font face and content to reflect your material. This is a static text field so you do not need to choose a device font, unless you would like to shave some file space off your movie in exchange for limiting your font choices. In this case, the difference would be miniscule, but in some cases, every byte counts. The script is set up to look for the name of a specific keyframe in the Movie Clip Timeline, not its actual contents or symbol name. In that way, the script will continue to operate correctly if you change the contents.

Figure 3.23 Timeline of Random Quote Movie Clip.

Figure 3.24 Random Quote Movie Clips in the Library.

Adding Quotes

Although it is simple to edit the content inside any of the 10 quotes, it is slightly more difficult to modify the number of quotes that are randomly generated. The object of this book is not to teach you how to create ActionScripts, but rather provide you with a workable template. I will give you a step-by-step run-through of this process without delving too deeply into the aspects of programming. With that said, let's start by adding an eleventh quote to the random quote generator.

  1. After you have customized the look of the other 10 quotes, create the new quote symbol by going to the Library and choosing the Random Quote #10 symbol.

  2. Go to the Options menu and duplicate the graphic symbol. Name it Random Quote #11 and make sure that it is a graphic symbol.

  3. Double-click the symbol to edit it and enter a new quote in the text field. By doing this, the new symbol is consistent in font size, typeface, and color.

  4. Notice in the Scrolling Random layer that each quote is approximately 100 frames long, that they begin on the left side of the Stage on the X coordinate -350 and the Y coordinate 0, and that they end at the right side of the Stage with the X coordinate 500.

  5. If you scroll to the end of the Timeline in the Movie Clip, you will see that the last quote ends on frame 1001. Insert two blank keyframes (F7) into frames 1002 and 1003.

  6. Drag the Random Quote #11 symbol into frame 1003. It doesn't matter where you place it on the Stage; we will position it using the Info panel in a minute.

  7. Scroll down the Timeline and insert a frame (F5) into frame 1102.

  8. Go back to frame 1003 and set the X coordinate to -350 and the Y coordinate to 0 in the Info panel, remembering to press Enter after each number.

  9. With that frame selected, create a Motion Tween.

  10. Go to frame 1102, insert a keyframe (F6), and set the X coordinate of the Movie Clip to 500. Leave the Y coordinate as it is.

  11. To make sure that the mask covers your additional quote in the Timeline, grab the end of the last frame in the Mask layer and drag it to the last frame of your eleventh quote layer, frame 1102.

We now need to add the ActionScripting that will allow the new quote to be integrated into the Random Quote Generator.

  1. Go to the top layer where all the scripts are kept, add a blank keyframe to frame 1002, and label it q11.

  2. In that frame, place the script:

    if (q11 == false) {
    nextFrame ();
    play ();
    } else {
    gotoAndPlay (2);

    It might be easier if you copy and paste the syntax from frame 902 and change the value on line 1 from 10 to 11. This code checks to see whether the quote has already been seen; if it hasn't, it will execute this specific Motion Tween, sending the quote across the Stage. It must appear in the first frame of each quote.

  3. Scroll down to the last frame (frame 1102) and create a blank keyframe. In this frame place the script:

    q11 = true;

    You can copy, paste, and update this script from frame 1001 in the same manner as you did in frame 902. This code sets this specific quote to the value true, which means that the viewer has seen it. It then sends the play head back to frame 2, which contains the code to initialize the random quotes.

  4. Look at the workhorse frame 2. In this frame you will see the following code:

    if ((q1 == true) and (q2 == true) and (q3 == true) and (q4 == true) and 
    (q5 == true) and (q6 == true) and (q7 == true) and (q8 == true) and 
    (q9 == true) and (q10 == true))
    gotoAndPlay ("q" add int(random(10)+1));

    In the first two lines, the code checks to see if all the quotes have been seen. To change this to reflect your additional quote, you must add a condition that corresponds to the name of your new variable—in this case, q11. So you would add and (q11 == true) directly after the (q10 == true) statement. You then need to change the last line of code to change the value upon which the random feature is based. In this example, change the 10 to 11. Your new code should look like this:

    if ((q1 == true) and (q2 == true) and (q3 == true) and (q4 == true) and 
    (q5 == true) and (q6 == true) and (q7 == true) and (q8 == true) and 
    (q9 == true) and (q10 == true) and (q11 == true))
    gotoAndPlay ("q" add int(random(11)+1));
  5. Look at the code in the first frame of the Movie Clip, which reads as follows:

    q1 = false;
    q2 = false;
    q3 = false;
    q4 = false;
    q5 = false;
    q6 = false;
    q7 = false;
    q8 = false;
    q9 = false;
    q10 = false;
    play ();
  6. Add your new variable to this list so that the "randomize" code can check if it is time for your quote to be shown. Your new code should look like this:

    q1 = false;
    q2 = false;
    q3 = false;
    q4 = false;
    q5 = false;
    q6 = false;
    q7 = false;
    q8 = false;
    q9 = false;
    q10 = false;
    q11 = false;
    play ();

Now you're set—test it and enjoy your new quote!

You can remove quotes in a similar manner. Make sure that you remove all the references to that quote so that the code functions properly.

The Customized Introduction

Here's the customized Introduction for my fictitious robot company.

Figure 3.25

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information

To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.


Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.


If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information

Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.


This site is not directed to children under the age of 13.


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information

If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information

Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents

California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure

Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact

Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice

We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020