[F8] Center On Button Using Dropdown
Hello, I'm currently working on creating a world map using Flash 8. I have every country set up as an individual button and named using a three character country identifier. I'm trying to create a drop-down menu where the user can select a particular country from it and the map will then zoom in and center on that selected country. At this point even if I can just get it to center on the country they select (without zooming in on it) that would be fine.
Any ideas on the easiest way to accomplish this?
FlashKit > Flash Help > Flash ActionScript
Posted on: 08-14-2007, 01:24 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Dropdown Button
This may seem a little dumb, but Ive been trying and it doesn't seem to work for me. I want to have a regular button where when u put your mouse over it, a dropdown of buttons appears under it so pick the specific category...its for a website. For example. A button with the label Interests. When you place your mouse on top of it, 2 dropdown buttons appear: Games and Drawing. Im not that experienced in actionscript so im not sure if it has anything to do with actionscript. Can someone please help me. Id really appreciate it.
Thanks
Dropdown Button?
Hi all
Electrongeek has once made a button (I've added the one)
Now I would like to know why it is not possible to add this code on a button?
on (rollOver) {
_root.box1.nextFrame();
}
A Simpel Dropdown Button ?
I need to make a simple dropdown button, so when i have the mouse over it there comes 2 underbuttons, hope i understand me
The first button is called "Country info"(when u have the mouse over it) it show 2 buttons under the "Country info" thats called "Denmark" and "Bulgaria" that will get u to the info about DK or BG.
i need help NOW !!!
XML, A Dropdown And Button Problem
Hi - I have some code that pulls in some xml of company details into text boxes. All works fine. A button was added so that you could go through each company childnode and that worked fine. The button was removed and replaced with a dropdown componant that contained two country names. A button was added that had the following code:
Code:
on (release) {
selected = _root.country_select.getSelectedItem().data;
trace("this is after the button has been pressed: " + selected);
getXML;
}
The trace command works and shows the currently selected dropdown item, but the getXML; command fails to execute
function getXML()
in the _root. I've tried putting _root.getXML; but it made no difference.
There is a trace command right at the top of the getXML() function to see if it is being executed, but it doesn't appear. This is a really basic and embarrising problem but it's daft I can't get it to work!! If only the Insert Target Path button allowed you to insert a path to functions as well as objects!!
Any help or suggestions would be great!
thanks
frank
Dropdown Button Navigation
Need A Pro! Teach me a trick or two...
Using the Flash MX template for dropdown navigation structure.
And need to add the button image only to the main button object.
The sub button objects should be below and slightly smaller text size, with no button image. See attached zip file includes the following:
Fla, XML, html, txt (code.txt is just the functions in flash in a notepad txt file for the ease of looking at it outside of flash editor)
cindy
Dropdown Button Help Needed
Hi I am v.new to flash so bear with me.
I have created some dropdown style buttons using the invisable button method. Basicly when you rollover teh firts button I ahve an invisable button appear with the action to close when you rollover that (to rollover you must roll off the buttons)
This workls great, very happy. But when i bunch them together they start overalpping or something and it doesn't work 100& of the time.
I have them on different layers but that doesn't do the trick.
Any ideas? I guess I need to seperate them somehow but i can't alter the design - clients are strict on that.
Movie here: http://www.fuci.co.uk/clientarea/testarea/button.swf
Source Here:
http://www.fuci.co.uk/clientarea/testarea/buttons.fla
Cool Dropdown Button
heres the challenge...
i want to make a dropdown button...with three levels...
heres what i want it to do:
if i mouseover button A, it plays and shifts down a movie below it (button B)...which itself holds a movie clip ( button c)....
if i mouseover button C, and only button C... i want it to glow or somethin...and when its clicked on... i want it to load a new webpage...
heres my prob.... the mouseover event seems to stick with button b and its specified hitarea....so button c...never glows...however...when i click... it loads the webpage (when i click over the hitarea of button a....somethin thats not even supposed to have a geturl action attached to it) ...an action i thought was associated with the clickeven on button c.
confusion:
if button c...never seems to evoke the mouseover event when the focus is on button b.... how does it evoke the geturl method....when i do a click.... i just dont get it
instinct:
im guessing the prob lies within the fact that i have specified hitareas within specified hitareas....so the rollover event never leaves button b....but i dont know how to get around this.
my goal is to design a navbar that drops down a menu...with a list of maybe six different options...and when you mouse over any of those options...they slide another set of options that the user can ultimately choose from... the prob is...each of the first set of six options...seem to share the same hitarea.... button a's hit area...so i dunno... i just dunno... maybe one of you guys can help a brotha out
thanks in advance
-ron
DropDown Button To New Scene
Sorry about this one, a real newbie question, I'm pretty sure it must have been covered before but I've been searching for ages and nothing's fixed it. Baisically, I've got a drop-down menu and I want a button on the menu to gotoandplay a different scene. When I click the button however, my gotoandplay just dosn't work. I can get a trace to work, so I know it recognises it, but for some reason it dosen't go to a scene. I have tried:
on (release) {
gotoAndPlay("Argument1.1", "one_one");
}
and
on (release) {
_root.gotoAndPlay("Argument1.1", "one_one");
}
with "Argument1.1" being the name of the scene and "one_one" being a frame label in that scene. I know it must be pretty simple so thanks for humoring me. Cheers,
-Keyper
[MX04] What The Hell With This Dropdown Button?
I've been all this afternoon (I live in Europe) trying to understand why this dropdown button doesn't work. Could you take a look to this file I have a headache now.
I'm using flash mx 2004, is it easier to do a drop down menu with flash 8?
Panchoskywalker
her's the fla
p.d: do u see the text a little "out of focus", is there a way to made it appear more clear.
[F8] Dropdown Menu With Submit Button
Hey guys, I've searched tirelessly and come up empty handed on this one...
What I am looking to do is have a dropdown menu with a handful of links on it, each one points to a URL... however, I would like to set up the links so the user only gets forwarded to the link they chose after they click the 'submit' button.
Any ideas or links to a solution?
(as always, thanks in advance!)
Button Flicker In A Dropdown Menu?
I am working on a dropdown menu and when someone rolls over the winners button, I want categories to appear underneath. When they appear and you rollover the categories, there is a flicker that happens. I assume this is caused by the hit states of the different buttons? Any tips on avoiding this? I currently am using a large hit state with cutouts for the winners button and in the cutout area is the category button.
Thanks in advance for any help.
EW
*The example online is at:
http://www.erikwallace.com/testing/dropdown_menu.html
Form Dropdown Help, One Dropdown Works How Do I Code The Other ?
I have a form with 2 comboboxes. One mc is comboselect the other comboselect2. My php code is:
<?php
$sendTo = "myemail@email.com";
$subject = "Contact Flash Form";
$headers = "From: $name<$email>
Reply-To:$email";
$message = "1.Name:$name
4.Email:$email
5.Contact Address:$address
6.Inquiry:$temp
7.Comments:$com ments";
mail($sendTo, $subject, $message, $headers, $category);
?>
the flash AS on submit button is:
on (release) {
trace(name+'
'+email+'
'+address+'
'+temp+'
'+ comments);
}
on (release) {
loadVariablesNum("contacts.php", 0, "POST");
_root.nextFrame();
}
the flash AS on one of the comboboxes is:
this.stop();
myData = new Array('New York', 'Beverly Hills', 'Miami', 'other');
for (i=0; i<myData.length; i++) {
comboselect.addItem(myData[i], i);
}
function comboDisplay(component) {
temp = component.getSelectedItem().label;
}
comboselect.setChangeHandler("comboDisplay");
2nd combobox AS:
this.stop();
myData = new Array('10mil', '50mil', '100mil');
for (i=0; i<myData.length; i++) {
comboselect2.addItem(myData[i], i);
}
function comboDisplay(component) {
temp = component.getSelectedItem().label;
}
comboselect2.setChangeHandler("comboDisplay");
only info comes through is for the 2nd combobox - 10mil, 50mil, or 100mil
what do I need to add to the PHP and AS to have the other combobox info be emailed ?
AttachMovie Action To Button Within Dropdown Menu
ok now im having a problem when ever I put the action on my button (which is call royalblood) the attachMovie action doesnt work but when I put it on <this> the action works but I need it to work on my button and I dont know the action to do it. Can someone help me out again on this one.
this one doesnt work.
ActionScript Code:
this._parent.bloodnavi.royalblood.onRelease = function() {
var mc:MovieClip = _root.attachMovie("rpmc","newrpmc", 200, {_x:499, _y:335});
}
this one works
ActionScript Code:
this.onRelease = function() {
var mc:MovieClip = _root.attachMovie("rpmc","newrpmc", 200, {_x:499, _y:335});
}
Making A Dropdown Box Or A Menu On LeftClick Of A Button
How do I make a dropdown box, so I can view a whole list of options I have preset...
(Or a menu I can view on the leftclick of a button (As long as it only had my items in it))
it needs to be able to be very long...
Thanks in advance
Controlling A Dropdown/combobox From A Seperate Button
I have a contact page setup with text fields and a dropdown to select the type of contact. I have a submit button and a clear button. I have the clear button set to clear the text fields and I also want it to set the drop down back to the label/value "Please Select." Is this possible?
Here's what I have as of now :
//Set "Clear Form" Button to clear text fields
btnClear.onRelease = function(){
ccbType.selectedItem.label = "Please Select"
}
BUTTON In MC DropDown-MENU Wont Work With OnRollOut Function
Please see the attached file to see the problem I am having with the button inside of the Movie Clip. The button bContactUs wont work if I have...
mcButtons.onRollOut = function() {
mcButtons.onEnterFrame = function() {
this.slideClip( 1, 10, 3);
this.signal = 0;
};
}
And if I comment this block, then the button works fine, but then the the DropDown Menu wont retrieve itself back.
Any Help is appreciated.
Renatopia
Button Pivot Marker Not Center
When I make button I get the Plus Sign(or pivot) at top right. How do make the plus sign(or pivot come to middle. I hope I am making sense.
Center A Popup Window On Screen From A Button
I'm trying to create a flash button for a website and I want it to open a popup window which is 800 x 600. Ive attached the following script to the button in the URL field:
javascript:window.open('http://www.cstreiter.com/cs/main.html','newWin','width=800,height=600,left=0,t op=0,toolbar=No,location=No,scrollbars=No,status=N o,resizable=No,fullscreen=No');newWin.focus();void (0);
How do I go about getting the window to automatically center in the screen (reflecting users Resolution settings) of their pc?
Thanks in advance.
Skeets
Center A Popup Window On Screen From A Button
I'm trying to create a flash button for a website and I want it to open a popup window which is 800 x 600. Ive attached the following script to the button in the URL field:
javascript:window.open('http://www.cstreiter.com/cs/main.html','newWin','width=800,height=600,left=0,t op=0,toolbar=No,location=No,scrollbars=No,status=N o,resizable=No,fullscreen=No');newWin.focus();void (0);
How do I go about getting the window to automatically center in the screen (reflecting users Resolution settings) of their pc?
Thanks in advance.
Skeets
Dynamically Center Text In Movieclip Button?
I'm finishing up a project that has a grid of 60 buttons -- two different button movieclips on which I've done some scripting for links, alpha tweens, etc. Each instance of the movieclip button is uniquely named.
In side each of the two different style of movieclip buttons is a dynamic text field that, unfortunately, is sized to the dimensions of the movieclip background. Thus, when dynamic text is pulled in (from XML-based arrays) to populate the movieclip buttons, it is top aligned if only 1 line long.
Given this current setup, how can I dynamically center (vertically and horiztonally) the dynamic text field within each of the two movieclip buttons?
Any help is greatly appreciated.
IronChefMorimoto
Button Actions For Center Pop Up Window In External Swfs.
Hello everyone,
I'm trying to launch a centered pop up window and i've been using the following tutorial for help.
http://www.kirupa.com/developer/mx/centered_popup.htm
I'm running into problems now because I have these buttons to activate the pop ups in external swfs. I've been trying to remedy it, but to no avail. If any one has any ideas your help would be greatly appreciated.
Thank you kindly
Jennifer
Keeping The Center Of The Stage In The Center Of A Web Browser
Hey,
I have a really wide flash page, but the main portion of it is in the center
of the .swf. My question is how do I make the center of my .swf in the center
of a web browser so that when the user resizes the browser, the center of the stage stays in the center of the browser? Right now it has the left side of the .swf aligned with the
left edge of the browser so the center of my .swf is usually being cut off by
the right edge of the browser and users have to scroll to the right to see the
main portion of the site...I'm sorry if that's somewhat confusing, but any help
at all would be appreciated. Thanks!
Dave
How Do I Center An External File In The Center On The Stage
I followed the tutorial for preloading external swf files, now that I have done so and it works, I notice that the swf file does not center after I preview it after it loads the external file.
I have centered the holder on the stage but after I preview the file or test movie, the loaded file is not centered and I have to play around with it for it to be centered. Is there a way to set the x and Y in the actions so this won't happen or do I have to know the size of the file that I am preloading off my server?
One Dropdown Affects A Second Dropdown, HOW?
i have an HTML form where one dropdown (DEPARTMENT) causes another dropdown (AUTHORIZE) to to have it's contents changed.
For example, if the user selects 'Accounting' from DEPARTMENT, then in the AUTHORIZE dropdown, only Accounting department names appear. The user then has to select one of the names.
I want to do the same thing in a flash form, can I just copy and paste my scripts? I am using arrays.
ANY help is greatly appreciated!!!!!
THANKS!
How Do I Scale From Center Of Stage, Not Center Of MC?
I'm building a Flash map that I'd like to be able to scale in and out of. I've added a + and - button and linked them to a 5% + or - of the main MC's x and y scale. But, on press I'd like it to scale from the center of the stage, not the center of the movie clip, so that when I zoom further into LA the whole image doesn't go shooting off to the left, since LA is on the far left of my enlarging MC. How do I do this? Am I on the right track here?:
//onPress increase x and y scale 5%. no prob.
//move the map by combining an understanding of the center point of the MC, the centerpoint of the Stage (half the width, maybe), and then maybe multiplying it by some factor of my current %scale, since a 5% increase is a varying number, depending on my current scale.
Seems like this would work, but I'm not sure what that math would be.
...or is there a better way like a built in method that deals with MC centerpoints?
Thanks,
Greg
Dropdown
My drop down menu is at the start of the timeline.
All the pages the menu refers to are later in the timeline.
I am trying to have the dropdown menu so that it does not return to the start of the timeline on rollover,
I.E the dropdown menu is shown over the current page.
Any suggestions?
Dropdown
i need help, i'll put the file up on here, could someone sort out my dropdown menu and get a photo to appear depending on what day of the week it is, download it and you'll get what i mean.
this is very urgent, thanks.
Dropdown
We have our project in MAcromedia Flash,it will be our personal portfolio..how can I add dropdown to the stage?how will it work?tnx...
or better yet,is there anyone who had developed his/her personal resume in flash that is willing to share his/her project to me,so that I can study it..thank you for your affirmative response...
Xml Dropdown
This a tutorial on how to make an XML Dropdown Menu
http://www.kirupa.com/developer/acti...pdown_menu.htm
Is it possible to make the submenus load within the initial menuitem? I ask this question because my menuitem has a button in it that plays a shapetween. I want the submenus to be shown on top of the shapetween at frame 30 inside menuitem.
here is a link to show what the dropdown menu is supposed to look like.
http://www.coimagen.com.pe/designgallery/gallery.swf
the xml would look somthing like this:
Code:
<?xml version="1.0"?>
<menu name="Menu">
<menu name="Menu1">
<item name="item1" action="message" variables="image path"/>
<item name="item2" action="message" variables="image path"/>
</menu>
<menu name="Menu2">
<item name="item3" action="message" variables="image path"/>
<item name="item4" action="message" variables="image path"/>
</menu>
</menu>
MX: Set Dropdown
Hi, I think I'm being really stupid - so I thought I'd show everyone.
I have two dropdowns. I would like them to change - depending on what the other one does.
This code is not production quality or particularly efficient - it just for demo.
Code:
function setstate1(){
selectedState1 = stateinput1.getValue();
trace("selectedState1= "+selectedState1);
this.stateinput2.selectedIndex = 0;
}
function setstate2(){
selectedState2 = stateinput2.getValue();
trace("selectedState2= "+selectedState2);
this.stateinput1.selectedIndex = 0;
}
I dont see why it doesn't work. I'm tired - but I've had no beer tonight...
The fla is at:
www.3ainteractive.com/dropdown.zip (mx compatible) - if you wana see for yourself...
M@)
Dropdown Menu
I want to emulate an HTML dropdown menu.
I know how to script out a scroller, but
I'm having troubles getting the menu to
disappear if nothing's selected (on rollout). Meaning:
I need a simple mouseout piece of scripting
or something. Any ideas?
Using a mousevent doesn't work because I can't put
a button on top of my scroller.
thanks,
fred
Dropdown Navigation Help Please
Does anyone know of the most efficient way to make a drop down navigation system using actionscript? I want to be able to click on a top level navigation item, and have it open to sublevel navigation items. I also need when the user clicks on another top level navigation item, the sublevels that are open will close.
Does anyone know of any GOOD tutorials or other actionscripts that could help me out with this? the tutorials that I tried to use so far aren't exactly what I am looking for.
Any information would be greatly appreciated!
Dropdown Menu?
how can I finish my dropdown menu so that the menu which "drops", stays on it`s position when I move my cursor on it and leave the sourcebutton which drops it?
it just pulls back where it came from, quite annoying
Dropdown Nav Smartclip 4 MX
Hey, i just tried to use the Mickey Live smart clip on the macromedia site, and i dont thinik the clip parametres box work for MX.. but it looks like what i need..
Is there another smartclip/component created for MX?!
or is there a better one
because basically what i want to do is create a dropdown menu in flash mx, but without a tonne of hassle..
thnx in advance..
Coz
[Edited by CozmiX on 08-06-2002 at 04:04 PM]
XML Dropdown Menu
where can i find a XML dropdown menu similar to the one in the FLASH MX's builtin Templetes . i cant use that one cos it can only go to different url links but i want to traverse thru the frames and scenes. n e idea? urgent
thnx
aLi
Dynamic DropDown
Hi everyone,
I am trying to develop a small menu system with flash. I was wondering if anyone knows of a way to do a dynamic drop down in flash. Basically, by dynamic - I need to have the swf file load a .txt file which would have the contents of the menu.
Does anyone know if this is possible? Im pushing a deadline, and could use any help available!
thanks!
Dropdown Component
hi,
i have a dropdown component with some values in it. when i click a buttons i want to set the value in the dropdown to the first label
can anybody help me with this please?
Help With Dropdown Menu's
Ok, I tryed doing this on my own, however failed so I think, lets try finding a tutorial that does what I want. I found one that was very close to what I wanted (placement really was only thing different, working ability was the same). For reference please visit this link.
I have followed this through and it does not seem to be working. I have checked and dbl checked and still can't get it to work. I have sent an email to the creater of this for assistance, but havn't recieved any word back. Maybe I'm not waiting long enough, however this is of high importance to me and I would like to get it working as quickly as possible. Thus I have come to you great people for help. Here is the situation.
I am making a menu (drop down) in the same form as the one provided by the link above. I followed the instructions. Although it was designed for flash 5 I didn't think I would have a problem with it. I am using Flash MX. I created my mc with my first button. In a different frame, I have my first button and all other buttons (on different layers) I have the text for the buttons on thier own layers (not that this should matter). I have the first frame (where main button is) labeled Hidden. At frame 20 I have the frame labeled Shown (this is where all my other buttons are (the dropdowns)). In the the actionscript for the first button on frame one I have...
on (rollOver) {
gotoAndStop("Shown");
}
however when I hover my mouse over, it doesn't go to shown. Nothing changes. I have set the properties to both track as button and track as menu item, however neither work. I have attached the .fla file to this for more info if needed. I would like to know what needs to be done rather than have you do it and send it back. Thanks in advance for your help!!
Sparkyfire
Dropdown Menus
Can someone help me with the script of the dropdown menus??
Dropdown Menu
I am a new user to flash stuff, and have been experimenting with creating menus in a MC, using Flash 5. My problem is that I cannot get the buttons to link to different scenes and or frames within the main timeline, I have tried the goto command which just keeps taking me back to the start of the MC no matter what scene and frame number I put in. Anybody got anything that will help.
Dropdown Menu
Hi,
I 'm trying to make a dropdown-menu...
I've attached a test file that I'm using to experiment.
When I press Sub1, it drops down and some new buttons(in this file the subbuttons don't work... you'll see) should appear.
When I press Sub2, first it should return to the normal state and then Sub 2 with some other buttons need to drop down.
How can I do this? I' ve tried with tweening, but that doesn 't seems to work.
Can anyone help me on my way?
thx already,
ilClandestino.
Help With Dropdown Menu
I have been following this tutorial here:http://www.flashkit.com/tutorials/Ac...-121/index.php. I did everything it asked and got the menu working fine, accept it doesnt go anywhere when I click on the sub buttons! I have spent at least 3 hours trying to find out why and have failed. I am quite positive I have the action script correct for linking it to another scene but it just won't work. Please help me out with this as it is kind of important. I attached the file. Please help me!
Help With Dropdown Menu
I have been following this tutorial here:http://www.flashkit.com/tutorials/A...a-121/index.php . I did everything it asked and got the menu working fine, accept it doesnt go anywhere when I click on the sub buttons! I have spent at least 3 hours trying to find out why I have failed. I am quite positive I have the action script correct for linking it to another scene but it just won't work. Please help me out with this as it is kind of important. I attached the file. Please help me!
Dropdown Problem ?
Does anyone know how to get the value out of a dropdown box ??
I want to get the value so that I can compare that variable to others.
Please
Dropdown Menu
i want to make a dropdown menu so that when u move the mouse over another dropdown section in the menu or if u move the mouse of the menu the dropdown section that was down gose up.
how should i go about this and what action scripts would i need to use?
thanks
Advance Dropdown
Hi
I have created a simple dropdown menu in flash and i need to use it in a map of countries also created in flash.
The map holds 51 countries. If the user is scrolling on a country, the menu for that country would appear directly next to the mouse pointer position. The menu is the same for all countries.
For example, a user needs to search Canada. user would scroll on Canada, the menu appears and he selects the "search" menu item.
I have attached a smaller version of the map and the menu i need to use. I dont know whats the most effective way to make this work and secondly also if the menu needs to be dynamic because I have alot of countries to work with. really stuck
Any help would be truly appriciated..
Thanks
Dropdown Info For 5
im trying to make a movie about a mechanic shop with 5 people in which i need a dropdown window to show info on each person. what is the best way to do this? i was thinking that i should make a movieclip to dropdown the window when the picture of the person is clicked on and have the info for the person on the same movieclip. but if i do it that way ill need to have the persons button play the animation of the dropdown then goto the info for that person. is it possable to make a button goto and play one part then when its done goto another part of the movieclip? or is there a better way that i dont know about? anybody?
thanks for your time,
j-son
Dropdown Menu Help
I'm having serious difficulties trying to make my dropdown menu work. I've gotten the whole movie clip so that when I mouse over it, it shows the other three subcategories, but when I click in either one of them they don't connect to the other scenes of my project...
I've make such sub-buttons to be tracked as menu items, and tracked as buttons and none of these options work. Each one of these sub-buttons have a "on release" action script "to go to and stop" on frame 1 of x,y, or z scenes...
Basically my sub-buttons are dead as a tired donkey!
I need help, I've been dealing with this for weeks.
Thanks community!
|