473,767 Members | 4,774 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Nested Buttons

2 New Member
HI, I am currently working on a site that has a horizontal scrolling menu, that is made up of a series of movie clips, the last of which contains my buttons. The trouble I am having is that the buttons will not navigate to the frames that i have assigned for each button. I am using flash 9, still trying to get a grasp on as3.0 so any advice would be appreciated. here is the code that I am using on the buttons --

home.addEventLi stener(MouseEve nt.CLICK, homeonMouseClic k);

function homeonMouseClic k(event:MouseEv ent):void {
trace("Button has been clicked.");
gotoAndPlay("fr ame 1");
}

members.addEven tListener(Mouse Event.CLICK, membersonMouseC lick);

function membersonMouseC lick(event:Mous eEvent):void {
trace("Button has been clicked.");
gotoAndPlay("me mbers");
}

events.addEvent Listener(MouseE vent.CLICK, eventsonMouseCl ick);

function eventsonMouseCl ick(event:Mouse Event):void {
trace("Button has been clicked.");
gotoAndStop(31) ;
}

resources.addEv entListener(Mou seEvent.CLICK, resourcesonMous eClick);

function resourcesonMous eClick(event:Mo useEvent):void {
trace("Button has been clicked.");
gotoAndStop("Re sources");
}

aboutus.addEven tListener(Mouse Event.CLICK, aboutusonMouseC lick);

function aboutusonMouseC lick(event:Mous eEvent):void {
trace("Button has been clicked.");
gotoAndStop("Ab out");
}

contactus.addEv entListener(Mou seEvent.CLICK, contactusonMous eClick);

function contactusonMous eClick(event:Mo useEvent):void {
trace("Button has been clicked.");
gotoAndStop("Co ntact");
}


again for the life of my i can't get the button to lead to the assigned frame on the maintime line. any suggestion?
Dec 12 '07 #1
2 3431
nomad
664 Recognized Expert Contributor
HI, I am currently working on a site that has a horizontal scrolling menu, that is made up of a series of movie clips, the last of which contains my buttons. The trouble I am having is that the buttons will not navigate to the frames that i have assigned for each button. I am using flash 9, still trying to get a grasp on as3.0 so any advice would be appreciated. here is the code that I am using on the buttons --

home.addEventLi stener(MouseEve nt.CLICK, homeonMouseClic k);

function homeonMouseClic k(event:MouseEv ent):void {
trace("Button has been clicked.");
gotoAndPlay("fr ame 1");
}

members.addEven tListener(Mouse Event.CLICK, membersonMouseC lick);

function membersonMouseC lick(event:Mous eEvent):void {
trace("Button has been clicked.");
gotoAndPlay("me mbers");
}

events.addEvent Listener(MouseE vent.CLICK, eventsonMouseCl ick);

function eventsonMouseCl ick(event:Mouse Event):void {
trace("Button has been clicked.");
gotoAndStop(31) ;
}

resources.addEv entListener(Mou seEvent.CLICK, resourcesonMous eClick);

function resourcesonMous eClick(event:Mo useEvent):void {
trace("Button has been clicked.");
gotoAndStop("Re sources");
}

aboutus.addEven tListener(Mouse Event.CLICK, aboutusonMouseC lick);

function aboutusonMouseC lick(event:Mous eEvent):void {
trace("Button has been clicked.");
gotoAndStop("Ab out");
}

contactus.addEv entListener(Mou seEvent.CLICK, contactusonMous eClick);

function contactusonMous eClick(event:Mo useEvent):void {
trace("Button has been clicked.");
gotoAndStop("Co ntact");
}


again for the life of my i can't get the button to lead to the assigned frame on the maintime line. any suggestion?
Question when you made the buttons did you assign a keyframe for the timeline?

nomad
Dec 14 '07 #2
tmarch001
2 New Member
Sorry for the confusion, i did assign lables to the keyframes, if that is what you mean?
Dec 18 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
2657
by: Rich Wahl | last post by:
I am writing a personal application that uses windowListeners, ActionListeners and possible ItemListeners (combo boxes). I have one of the Buttons (ActionListeners) set to have a popup frame/panel to display a Choice. But I would like the Program to not continue on until the user makes their selection from the dropdown/Combo box in the new popup window. Right now, I have it setup so that the Listeners for the main frame are looking...
1
8328
by: Stanimir Stamenkov | last post by:
Here's an example: <form action="bogus" method="post"> <p> <a href="prev.cgi"><input type="submit" name="prev" value="< Back"></a> <a href="next.cgi"><input type="submit" name="next" value="Next >"></a> </p> </form>
0
1663
by: R Reyes | last post by:
Hi. I'm trying to make some event handlers for buttons that are nested within datalists, however I keep getting errors trying to access them and a blank page shows w/o any real error message. How can I access these nested controls correctly? For some reason I always have to use a foreach loop to search for a control within a control. Using FindControl() from the top level does not work and returns a "reference not set to an instance...
1
3757
by: Dino Novak | last post by:
I have one datalist with another datalist in item template section. I can sucessfuly use link buttons with defined commandnames from first datalist. What do you have to do to enable link buttons from nested datalist ?
20
10828
by: Robert | last post by:
Need some help to stop me going around in circles on this one.... Have a nested subform (subform2) which simulates a continuous form for the record on the parent subform. Subform2 has rows of either an option button plus two text fields or a checkbox plus two text fields Am wanting to save the user entries into an underlying table. Tag property for each option button, check box or text field has the value of the key
2
2413
by: brad | last post by:
Group, I'm using Visual Studio 2003 to create an ASP.NET 1.1 project which contains nested server user controls in order to create a tree-like hierarchy. The tree is a sort of question and answer dialog. The user answers a question, and the next subquestion appears (using dynamic html display:none|block) depending on his answer.
2
7236
by: pradeep.thekkottil | last post by:
I'm setting up an auction website using PHP and MySQL. There in the section where logged in members can put up new auction in a form, I want to run a form validation where I used if else statements to check the fileds filled. In the form page there are two radio buttons - fixed and auction - (only one can be chosen) and depend upon which one is chosen some text should be inserted in the text fields. For that I'm using a validation where...
1
2670
by: Didje | last post by:
Hi, I am trying to create a grid which contains three rows, within each row there will be various buttons also in gridlayout. There are 20 buttons in the middle row, 3 in the top and 4 at the bottom. I want the top and bottom buttons to be of comparable size to the buttons in the centre row. However, each row of the gridlayout is the same size so, as a result, the top and bottom buttons are huge and the central ones are squeezed. I don't know...
2
2577
by: John Doe | last post by:
Hi, I am trying to port some C class routines into C++. THe original functions are use to set/get properties of buttons inside a toolbar : // This function is used to set btton text // Parameters : dwIndexOrId : index or cmd id // EGetMode : select button by ID or by cmd index
0
9575
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10170
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10014
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8840
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7384
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5280
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3931
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3534
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2808
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.