Home | Forums | Contacts  
  Flash Wanted Labs  
 
Search:
 
 
Navigation
 Desktop Tools
 FLA Source Files
 Flash Components
 SWF Flash Applets
 Server-side Tools
 Unsorted
 Labs
 free flash 3d Rotation Menu
 Snow effect - xmas snowflakes
 TypeWritter Effect
 Slide flash menu
 Bar flash menu
 Games
 Authors
 Sign-up
 Add your Listing to flashwanted
 Get links to this site
 Project roadmap
 
Sponsored




 
  Labs > Slide flash menu  
     
 

Slide flash menu

You can change almost everything you see in the demos – colors, size, element transparency, fonts, sound effects etc.
 
Download MXP file   |  Screencast   |   Discuss on forum

If you have not Flash authoring tool you can download OBJECT Version - Simple SWF flie with XML configuration.

Demonstration

 
 
 

 

Starting the Component

To use the component, look it up in the components panel of the FLASH development environment,
drag-and-drop it into the view, and set up the necessary parameters.

Parameters Definitions

Horizontal

This parameter defines the position of buttons in your menu – either vertical or horizontal.

Labels

This parameter defines the number of buttons in your menus and their captions – please refer to the
“Creating a Simple Menu” tutorial.

Action type & Action body

1. Action type = 'Open URL' , Action body = 'URL, [window]' , [window] parameter is optional

2. Action type = 'Call function' , Action body = 'functionName'

3. Action type = 'GotoAndStop' , Action body = 'frame'

4. Action type = 'GotoAndPlay' , Action body = 'frame'

5. Action type = 'Load SWF' , Action body = 'URL, target'

Moving duration

This parameter defines the duration of button animation. The duration must be set in msec.

Font Name

This parameter defines the font used in the button caption.

Embedded font name

This parameter allows for the use of embedded fonts. For more detailed information regarding using
this setting, see the “Using Embedded Fonts” tutorial.

Font size

This parameter defines the size of the button caption font.


Font color

This parameter defines the button caption color. The RGB color must be set in 0xNNNNNN format
where N is a hexadecimal number from 0 to F.

Font weight

This parameter defines the weight of the button caption font.

Font active color

This parameter defines the color of the mouse caption when moving the cursor over it. The RGB color
must be set in 0xNNNNNN format where N is a hexadecimal number from 0 to F.

Font alpha

This parameter defines the button caption opacity. The value must be within the range of 1 to 100
where 1 is maximum opacity.

Text vertical alignment

This parameter defines the vertical alignment of the button caption. Three options are available: [top],
[bottom] and [center].

Text horizontal alignment

This parameter defines the horizontal alignment of the button caption. Three options are available:
[left], [right] and [center].

Background color

This parameter defines the menu button background color. The RGB color must be set in 0xNNNNNN
format where N is a hexadecimal number from 0 to F.

Slider Color

This parameter defines the slider color. The RGB color must be set in 0xNNNNNN format where N is
a hexadecimal number from 0 to F.

Slider Frame Color

This parameter defines the slider frame color. The RGB color must be set in 0xNNNNNN format
where N is a hexadecimal number from 0 to F.

Slider Size

This parameter defines the difference between the slider and the button sizes in pixels.

Background alpha

This parameter defines the opacity of the menu button background. The value must be within the
range of 1 to 100 where 1 is maximum opacity.

Background active alpha

This parameter defines the opacity of the menu button background color when moving the cursor over
it. The value must be within the range of 1 to 100 where 1 is maximum opacity.

Show delimiters

This parameter enables the button delimiter. Three options are available:

[none] – no delimiter;

[solid line] – solid-line delimiter;

[dotted line] – dotted-line delimiter.

Delimiter color

This parameter defines the button delimiter color. The RGB color must be set in 0xNNNNNN format
where N is a hexadecimal number from 0 to F.


Delimiter alpha

This parameter defines the button delimiter opacity. The value must be within the range of 1 to 100
where 1 is maximum opacity.

Sound onRollOver

This parameter defines the sound effect when moving the cursor over the button. For more detailed
information, see the “Using Sound Effects” tutorial.

Sound onClick

This parameter defines the sound effect played when the user chooses a menu item – the sound of
clicking a button. For more detailed information, see the “Using Sound Effects” tutorial.

XML file

This parameter defines the name of the external XML configuration file. If no specific name is given,
the development environment settings are used. If the name or configuration file format is incorrect,
the component will not function. An example of the configuration file format is given in the XML For-
mat section.


XML Configuration File Format

You can use an external XML file to define menu parameters. This requires setting the configuration
file name in the [XML file] parameter in the FLASH development environment. The configuration XML
file is essentially a common text file of the following format:

<menu horizontal="true" duration="500" width="150" height="40">

<defaultProperties>

<item rollOverSound="media 15" rollOutSound="media 15" clickSound="media 15" actionType="Open URL">

<background color="0xffcccc" alpha="100"/>

<font name="Arial" size="10" fontAlignV="center" fontAlignH="left" weight="bold" color="0x00ffff" activeColor="0xff0000" alpha="100" embed=""/>

<delimiter color="0x00ff00" alpha="100" type="solid line"/>

<slider color="0x0000ff" frameColor="0x00ff00" margin="5" alpha="50"/>

</item>

</defaultProperties>

<items>

<item>

<actionBody>http://www.google.com, _blank</actionBody>

<label>Text1</label>

</item>

<item>

<actionBody>http://www.google.com</actionBody>

<label>Text2</label>

</item>

</items>

</menu>

 

The built-in XML component analyzer is not case- or space-sensitive for easier use. Nevertheless,
please be careful with the setting names and tag structure – these are really critical and are not cor-
rected automatically. You can use a pre-compiled configuration file from the component delivery
package which you can edit as necessary.

The <defaultProperties></defaultProperties> structure contains the values for all configuration pa-
rameters of your menu. The <item></item> structure defines the number of menu buttons.


Tutorials

Creating a Simple Menu

This tutorial is dedicated to helping you create a simple menu for your website using the Slide Flash
Menu component. Just follow the tutorial step-by-step, and everything will be OK!

Step #1

First create a folder to hold all of your project files – for example, [Lesson01].

Step #2

Run the FLASH MX 2004 or 2004 MX Professional development environment with the installed Slide
Flash Menu component. Open the component panel and drag-and-drop the menu component to your
project view.

Step #3

Click the view component to view its parameters in the prop-
erties panel (usually at the bottom of the view). First check
the [labels] parameter defining your menu items. Define the
menu items and their names (as shown on the picture) and
confirm by clicking OK. Then open the [target URLs] parame-
ter and define the links for each menu item as necessary.

Step #4

Set the component size to enable normal display of all
menu items (e.g., height=100 and width=100). Other com-
ponents parameters can be set to your liking.

Step #5

Save your FLA file in the [Lesson01] folder and publish your project. Now you are all set!


Using Sound Effects

This tutorial will explain how to implement sound effects in your menu.

Step #1

Open the project with your menu. Import the intended sound into the library (File -> Import -> Import
to Library…) – for example, [sound.mp3] from the component delivery package.

Step #2

Open your project library by pressing F11 and right-click on the sound file imported in Step #1. Select
[Linkage…] from the pop-up menu, check the [Export for ActionScript] option in the window, and type
MenuRollOverSound in the [Identifier] text field:

Step #3

Look up the [Sound onRollOver] parameter in the component properties panel and insert the
MenuRollOverSound string. This way you can set any other sound effect in the [Sound onClick] pa-
rameter by using any name different from MenuRollOverSound (e.g., MenuClickSound).

Note

If you prefer using external sound files without importing them into the library, all you need to do is to
set the full path to them in [Sound onRollOver] and [Sound onClick] parameter settings. For example,
if the sound file is in the same folder as your menu project you just have to specify its name (e.g.
[Sound onClick]=[YourSound.mp3]).

Using Embedded Fonts

This tutorial explains how to use embedded fonts.

Step #1

Open your menu project. Open your project library by pressing F11. Select [New Font…] from library
menu and select the font you want to use.

Step #2

Right-click on the font you just imported. Select [Linkage…] from the pop-up menu. Check the [Ex-
port for ActionScript] option in the window and fill in the [Identifier] text field - for example, with the
MyMenuFont string.

Step #3

Look up [Embedded font name] in the component properties panel and fill in MyMenuFont. That’s it!

Note

The only downside of using embedded fonts is not being able to see the results of your work with the
font immediately in live preview – you need to publish your project to view all the font changes.

 


 
     
 
 
Flash Wanted Labs   © 2006, 2007 FlashWanted.com All rights reserved