Go Back   Computer Forums > Web Design | Website Development > Web Programming
Click Here to Login
Join Computer forums Today

Thread Tools Search this Thread Display Modes
Old 05-10-2010, 10:13 AM   #1
Daemon Poster
jay8990's Avatar
Join Date: Jun 2004
Posts: 838
Send a message via MSN to jay8990
Default Flash submenu help

Hi guys,

Building a website for myself and I know a bit of flash but not much. Mostly following tutorials and adapting for my own purposes. Anyway I am building a menu bar, which when you hover over certain items drops down a submenu. I can get the submenu to drop down ok but I cant figure out how to get it to link (jump) to a new frame/scene.

Can anyone point me in right direction?

I think problem is in function showSubMenu ?

Flash CS4, AS3

----- Code -----

// Make submenu buttons hidden
btn_Set.btn_Set1.visible = false;
btn_Set.btn_Set2.visible = false;

// Add event listeners for main button
btn_Set.addEventListener(MouseEvent.MOUSE_OVER,sho wMenu);
btn_Set.addEventListener(MouseEvent.MOUSE_OUT,show Menu);

// Main button action - disabled currently
//btn_Set.addEventListener(MouseEvent.CLICK,buttonCl icked);

// Add event listeners for submenu buttons
for(var i=1;i<3;i++){
btn_Set["btn_Set"+i].addEventListener(MouseEvent.MOUSE_OVER,showSubMen u);
btn_Set["btn_Set"+i].addEventListener(MouseEvent.MOUSE_OUT,showSubMenu );
btn_Set["btn_Set"+i].addEventListener(MouseEvent.MOUSE_DOWN,showSubMen u);

// Actions for main button
function showMenu(e:MouseEvent){
if(e.type == "mouseOut"){
// Hide submenu when cursor moves off
e.currentTarget.btn_Set1.visible = false;
e.currentTarget.btn_Set2.visible = false;

if(e.type == "mouseOver"){
// Show submenu when cursor on
e.currentTarget.btn_Set1.visible = true;
e.currentTarget.btn_Set2.visible = true;


function showSubMenu(e:MouseEvent){

if(e.type == "mouseOut"){

if(e.type == "mouseOver"){

if(e.type == "mouseDown"){
if(e.currentTarget == "btn_Set.btn_Set1"){
// If submenu button 1 link
if(e.currentTarget == "btn_Set.btn_Set2"){
// If submenu button 2 link

// Main button action, disabled currently
//function buttonClicked(e:MouseEvent){
// gotoAndStop("106");
jay8990 is offline   Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

All times are GMT -5. The time now is 08:22 AM.

Powered by vBulletin® Version 3.8.8 Beta 4
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO 3.6.0