Publishing
Sound
Extensions, Text Boxes, and Forms


 

Extensions, Text Heavy Pages, and Forms

 

Flash Extensions

Dreamweaver isnt the only Macromedia program that allows you to expand usability using extensions.

Many functions that were previously available to those with action scripting skills are now available to all Flash designers through Flash extensions.

Youll spend a bunch of time in the Macromedia Exchange looking through extensions, but youll need to download the extension manager from Macromedia by clicking (HELP-> FLASH EXCHANGE)

Have fun!

 

Text Heavy Pages

"I love Flash," youre saying, "but what about web pages with lots of text or forms? Can Flash do that stuff, too?"

We probably wouldnt have a section about text and forms in the book if Flash couldnt do it

You can build forms in Flash just like you would in HTML. The process of linking your form to a CGI is the same, you just have to know which buttons to push in Flash.

Because Flash movies do not change size to accommodate text like an HTML page does, Flash designers have grudgingly turned to HTML instead of Flash when there was the need for a lot of text, or when text needed to continually be updated. No more, not with this web design course, anyway.

 

Use Frames to Place Large Amounts of Text

Flash, like any other web page, can be kept in Frames. You can set up a fancy Flash header and navigation bar in Flash. The main frame can be HTML.

 

We havent covered publishing Flash yet, but you should understand the concept behind frames.

 

Targeting Frames From Flash

Remember that when you build a frameset that the frames all have to be named. When you name a frame, you can target it later, instructing a page to open in that specific frame.

To target frames in Flash you set the link like you normally would, with the "Get URL" action:

 

Use a Smart Clip Scroll Box

A Smart Clip is a movie clip that has actions attached to it. You can build smart clips yourself, or you can download them from the Macromedia Exchange.

One of the more useful smart clips allows you to place a window in Flash that can contain text from an outside text file. The window has scroll bars, and you can customize it to look however you like. The text file is not loaded until needed.

You get the Smart Clip Scroll Box, go to the Macromedia Exchange (Open Flash-> HELP-> FLASH EXCHANGE)

 

After you download the Clip, Youll need, to install it:

1.      Open the Macromedia Extension Manager
HELP-> MANAGE EXCHANGE ITEMS

2.      Install the extension by clicking
FILE-> INSTALL EXTENSION

 

Insert the Smart Clip

  1. WINDOW-> COMMON LIBRARIES-> SCROLLER

A new library will open up. This is not your main library. Its a separate library that holds the Smart clip and its assets.

 

  1. Drag the scroller_clip onto the movie stage.

  1. Close the scroller clip library.

 

The scroller_clip and all of its assets (parts) will pop into your library. Sadly, the assets dont stay neatly organized in a folder. Youll have to make a folder and clean things up a bit. You can use the scroller_clip in your library from now on.

 

To Prepare the Text File for Smart Clip Loading:

  1. Save your Movie in your sites root folder.
  2. Youll need a text file saved somewhere in your sites root folder.
    The file must have the ".txt" extension. You can make a text file in Notepad (PC) or Simpletext (Mac)
  3. The first words in the text file must be "Text="
    Many programming languages use .txt files. Starting the body of your text file with "text=" allows Flash to recognize the file as text and not as programming.
  4. You can use some HTML formatting in your text file, such as <b> <i> <u> and <br>.
    For best results, use <br> for line breaks.

Editing the Scroller Clip

You can transform the scroll box to any size that you wish. You may have to edit the box in editing mode to get it looking the way you want. Double click the box to enter editing mode. The scroller_clip is made of many small movie clips and buttons. For example, the down arrow is a button that can be edited in editing mode. Change the way it looks, if you like

You can specify the font used in the scroll box by entering editing mode, clicking in the text area, and choosing a font from the Character Panel. (WINDOW-> PANELS-> CHARACTER). Take note that this font must reside in your users font folder, or your movie will display the default browser font.

 

Linking Your Clip to the Text File

Linking the clip is easy.

  1. Select the clip instance on the Main Movie stage
  2. Open the Clip Parameters Panel
    (WINDOW-> PANELS-> CLIP PARAMETERS)
  3. Type the file path to the text file in the Data URL window

 

The path can be relative to your movie, or it can be a complete URL.

 

Thats it!

 

Flash Forms

Forms are easy in Flash if you know how to work them. Basically, they work just like HTML forms. Youll need to direct the form at a CGI, and youll need to name every form field.

 

Inserting Form Text Fields:

  1. Select the text tool from the Tool Box.
    Your font size, face, and fill color will determine the size, face, and color of the user inputted text
  2. Draw a text field on the screen
  3. Open the Text Options Panel
    (WINDOW-> PANELS-> TEXT OPTIONS)
  4. Make sure that the text field is selected, and choose Input Text



  1. Configure the Form Field

 

Single/Multi Line: Allows users to enter in multi line comments. Useful for "Your Comments Here"

Border/BG: By default, the text box is invisible. You can either draw a vector shape behind the text field, or you can check the Border/BG box, which inserts a black border and a white background for your text field.

Variable: Use this area to identify your form field. The variable is similar to name="whatever" in a normal HTML form

Max Chars: Allows you to set a maximum input. By default, this field is set to "0", which means that there is no limit.

Embed Fonts: Allows you to specify the font that users fill in the form with. The entire font map will be downloaded with your Flash movie, so only use this one if you really need to. Click the to specify a specific font.

 

Inserting Radio Buttons and Check Boxes

  1. Open the Common Libraries
    WINDOW-> COMMON LIBRARIES-> SMART CLIPS



  1. Drag a CheckBox or RadioButton to the stage
  2. Open the Clip Parameters Panel
    (WINDOW-> PANELS-> CLIP PARAMETERS)
  3. Set the buttons name, and label.
    "label" is the same as "value" in HTML. The Label is what the form will return if a user clicks the button/box

Setting a Submit Button

The Submit button can be any button you choose.

  1. Draw or select a button
  2. Click the button and assign a Get URL action
  3. In the URL window type the path or address to your CGI.
  4. In the Variables pull-down, choose Send using Post

 

Note: You can use the free feedback CGI available at: http://www.freedback.com if you want to. Its not secure, but its free!