Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Help Needed With Combobox Component



Trying to change the highlight text color of the combobox component, but can't seem to find it.. I changed teh text color using "color" and the highlight background color using "themeColor" but what's the attribute to get when you select on of the selections with your mouse, the text color changes to some other color and when you mouse down the text it changes to another color. I need those two attributes.. any help is appreciated.

myComboBox.setStyle("fontSize", "12");
myComboBox.setStyle("fontFamily", "Arial");
myComboBox.setStyle("themeColor", "0xC1CFD8");
myComboBox.setStyle("disabledColor", "0x009900");
myComboBox.setStyle("borderColor", "0x999900");
myComboBox.setStyle("color", "0xFF0000");



FlashKit > Flash Help > Flash General Help
Posted on: 04-16-2004, 11:10 AM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Help Needed With Combobox Component
Trying to change the highlight text color of the combobox component, but can't seem to find it.. I changed teh text color using "color" and the highlight background color using "themeColor" but what's the attribute to get when you select on of the selections with your mouse, the text color changes to some other color and when you mouse down the text it changes to another color. I need those two attributes.. any help is appreciated.

myComboBox.setStyle("fontSize", "12");
myComboBox.setStyle("fontFamily", "Arial");
myComboBox.setStyle("themeColor", "0xC1CFD8");
myComboBox.setStyle("disabledColor", "0x009900");
myComboBox.setStyle("borderColor", "0x999900");
myComboBox.setStyle("color", "0xFF0000");

Help Needed With Combobox Component
ying to change the highlight text color of the combobox component, but can't seem to find it.. I changed teh text color using "color" and the highlight background color using "themeColor" but what's the attribute to get when you select on of the selections with your mouse, the text color changes to some other color and when you mouse down the text it changes to another color. I need those two attributes.. any help is appreciated.

myComboBox.setStyle("fontSize", "12");
myComboBox.setStyle("fontFamily", "Arial");
myComboBox.setStyle("themeColor", "0xC1CFD8");
myComboBox.setStyle("disabledColor", "0x009900");
myComboBox.setStyle("borderColor", "0x999900");
myComboBox.setStyle("color", "0xFF0000");

Help Needed With Combobox Component
ying to change the highlight text color of the combobox component, but can't seem to find it.. I changed teh text color using "color" and the highlight background color using "themeColor" but what's the attribute to get when you select on of the selections with your mouse, the text color changes to some other color and when you mouse down the text it changes to another color. I need those two attributes.. any help is appreciated.

myComboBox.setStyle("fontSize", "12");
myComboBox.setStyle("fontFamily", "Arial");
myComboBox.setStyle("themeColor", "0xC1CFD8");
myComboBox.setStyle("disabledColor", "0x009900");
myComboBox.setStyle("borderColor", "0x999900");
myComboBox.setStyle("color", "0xFF0000");

ComboBox Component Help Needed
I'm having trouble with the comboBox component. All I need it to do is load in swfs. I've added labels and data for the labels. The data I've added is simply the name of the swf, eg example.swf This is according to a tutorial on the Macromedia help section. I've added the instance name comboBox.

I've also added actions in a layer on the timeline:

function change(evt){
trace(evt.target.selectedItem.label);
}
comboBox.addEventListener("change", this);

It doest seem to work. Can anyone suggest a reason why it might not?

Many thanks!

Fox

Major Help Needed Using ComboBox Component
Hi there,

Not too sure if this is the right forum to post this in so a big sorry to the admin if it isn't and if you need to post it then please do!

I was wondering if anyone could help me with a major problem I am having using the comboBox component. I am using Flash MX 2004 Pro and have used a comboBox component that has data loaded into it from a database.

This all works fine! The problem arises when I try and load the movie that contains the comboVox into another movie and the comboBox stops working!!

I have tried all the workarounds that everyone has mentioned might work on the internet such as having a copy of the comboBox component in the library of the file loading the comboBox movie but nothing will seem to get it working.

If anyone has had this problem and knows a workaround and could possibly place together a couple of files demonstrating their workaround then I would be excepionally greatful.

Regards,

Mark Bowen

Content To Appear In Textarea Component Based Off Of ComboBox Component Selection?
Hello all:

I have a comboBox component with different values like so:

1-10
11-19
ETC.

Depending on what value is chosen from the comboBox, a certain value needs to appear in the text area. Do I need to use a listener for this? If not, any input would be appreciated. Thanks!

JPearson311

Checkbox Component To Toggle ComboBox Component
I've got a script that dynamically generates a grid of checkboxes and combo boxes. I'm trying write a handler to toggle the Combo boxes on or off when a user clicks on the corresponding checkbox. To do this, I add a property called "bound_to" when duplicating the checkboxes. The "bound_to" property contains the instance name of the combo box that I want the checkbox to control. So here's my onChange handler:


Code:
function toggleComboBox(component) {
trace(component._name+" has been selected ");
trace("bound to "+ eval(component.bound_to));

if (eval(component.bound_to).getEnabled == true) {
trace("enabled must be true for the target");
eval(component.bound_to).setEnabled(false);
} else {
trace("enabled is false for the target");
eval(component.bound_to).setEnabled(true);
}

}
My trace actions show that the correct instance names are saved correctly and this function works to enable the combo boxes, but it won't disable them. The problem is with the IF statement I think. It always returns false so I can only toggle the combo boxes on, but not off again. Is my syntax wrong or am I doing this the wrong way?

ComboBox Help Needed
Hi Everyone,

I'm a total newbie, but I need to get the following comboBox tutorial working for Flash 8. I'm learning, but I need this working asap.

http://www.flash-mx.com/flash/combobox.cfm

Looks easy enough, except this paragraph is totally throughing me:

"The changeHandler parameter determines what function is called when the selected value of the "main_cb" comboBox has changed. We'll set this to "setSubCombo"."

Please Help!

Help Needed On My Combobox Thingy
help needed on my combobox thingyhttp://www.gearedtraffic.co.uk/stef/combobox.fla

i was working on file file above and got a bit stuck.
The problem is I cant work out how to add links to the menu.
hope there is an expert out there that can help me out.
Im thinking it could use the trace function after a click, but i cant get it to work!

please some one sort me out.. i know im almost there..

Stef / Mux

Help Needed On My Combobox Thingy
help needed on my combobox thingyhttp://www.gearedtraffic.co.uk/stef/combobox.fla

i was working on file file above and got a bit stuck.
The problem is I cant work out how to add links to the menu.
hope there is an expert out there that can help me out.
Im thinking it could use the trace function after a click, but i cant get it to work!

please some one sort me out.. i know im almost there..

Stef / Mux

Help Needed On My Combobox Thingy
http://www.gearedtraffic.co.uk/stef/combobox.fla

i was working on file file above and got a bit stuck.
The problem is I cant work out how to add links to the menu.
hope there is an expert out there that can help me out.
Im thinking it could use the trace function after a click, but i cant get it to work!

please some one sort me out.. i know im almost there..

Stef / Mux

Combobox With Formatted Text Needed
Hi,

I need to be able to show formatted text (html or other, it doesn't matter how) within the item labels in a combobox or dropdown that looks and works like a combobox. Has anybody got some ideas or even a component that can help me?

This is for a project that needs finishing ASAP so any help would be appreciated - thanks!

Regards
Robert

ComboBox Component
Anybody know how to use this thing? (comboBox)
i've been messin around with is and have gotten nowhere, all i want to do is have 4 or 5 labels in it that simply do a getUrl, if anyone could show me a sample script to do this, or maybe some tutorials or something, i'd really apreciate it.

Help Me With ComboBOX Component PLEASE
WTF man I dont get it HOW THE **** do I add items to this drop down menu!? where, how WHAT THE HELL DO I DO PLEASE HELLLLLLLLLLLLLLLLLP!

PLEASE HELP ComboBox Component Is Beyond Me
OK! To start with, I'm an animator, not a coder. So, for whatever reason, I'm an idiot and can't figure this out.

I've used the Flash MX Tutorials and AS Dictionary, but still need a more simplified explanation.

All I need is a few different ComboBoxes that work with an existing Dynamic Text Field. One ComboBox changes the text's size, another changes the font, another change's the font color, another changes it to bold/italic, and another changes the background of the font.

I know how to set up the ComboBoxes so the labels, data, and handler are OK. But I know I'm messing up with the AS for the first frame of the movie. How do I write (the function?) so if someone selects different labels of any ComboBox, it automatically changes the Dynamic Test field appropriately?

Thank you!

--Darcie

ComboBox Component Help
I want to use the combo box component as a jump menu. I made a function and assigned that function to the event handler. How do I determine what data is used in that function? My function looks like this:

function jumpSwitch (newPalette) {
for (j=0; j < 1024; j++) {
var movieName = "sampleMovie" + j;
var miniPixel = "miniMovie" + j;
var frameNumber = getProperty (_root[movieName], _currentframe) + (15 * (currentPaletteNumber - lastPaletteNumber));
var miniFrameNumber = getProperty (_root[miniPixel], _currentframe) + (15 * (currentPaletteNumber - lastPaletteNumber));
_root[movieName].gotoAndStop(frameNumber);
_root[miniPixel].gotoAndStop(miniFrameNumber);
getProperty(_root[movieName], _currentframe);
lastPaletteNumber = getProperty(this, _currentframe);
currentPaletteNumber = newPalette;
}
}

I want the data that is to be place in there to replace newPalette in the function parameters. How do I do this? Thanks for the help.

ComboBox Component
I want to use a comboBox like a group of buttons each seletion in the box will tell the movie to goto or move selection in a bounding box to a new section. I have never used the components before and I have tried to enter in all sorts of stuff in the property inspector for the component but no go. So all I want is the different selections in the comboBox to tell an object to do something with AS.

Combobox Component
hi,
i am trying to send the values selected from a combobox to a php file, how can I do that?

thank you

ComboBox Component
Where can I change the color of the text in the combobox components?
I tried searching in the components skin library but without succes.

Can someone tell me specificly where I can change the boring black characters into some nice catchy colored ones?

Thanx in advance.

Combobox Component
i have a combobox and have a bunch of things listed in it, but I need to make it so when they click one of the options, it acts like a button and goes to somewhere. How do I do this?!?!

Regarding Combobox Component
I add the labels in the Combobox but don't now how to open the websites on selecting of labels. Please tell me how to do it in flashMX.

ComboBox (Component)
How can you dynamically add things to the combo box and add their data? I tried doing
code:
usernameselect_cb.labelField = [];

and in the [] there are variables. But that didn't work.
(Also, the vars are called username and a number (such as username1). There are diff amounts of these. How can I make it only show the number of usernames there are without it saying undefined when one doesn't exist? (They go up in order, there will never be a missing one)

Combobox Component
Hi,
I have a combobox component with two labels,.. correct and incorrect. my data is 0,1

meaning 0= incorrect and 1 = correct. I am trying to get my main movie(level1) to look at the data in the combobox, to see what the value is, and from their depending on the value, it either sends it to a frame label in the main movie for "correct" or incorrect" does anyone know what the code would be for this? the name of the combo box instance is "answer1".

thanks in advance.

Mike

ComboBox Component
Hi. I want to make a combobox with a rounded button. OK, I got it. But now I want to change the color of the stripe over the itnes. It's green by default. I looked for on the documentation and did not find: how to change it? Does it has to do with themes or skinning?
tnx

ComboBox Component?
any good tutorials on using the ComboBox component to create a drop down list, where your selection becomes text with an instance name and can then be sent on as a variable?

any help appreciated...thanks!

Please Help, ComboBox Component?
i need help badly!!! i am pulling my hair out from this. i am using the new flash 8 and am trying to put a "comboBox" component in. i want to make it so when they click on the item in the list it opens a browser window to the deminsions i specify and load a URL.

please help.
thanks,
mike

ComboBox Component
I'm playing around with the comboBox Component and getting a list of items in it with success.

How do i use a ahref link to load a new browser window and website from the dropdown list i'm creating?

sure this is not too hard but i'm still unfamiliar to the way it all works.

Rat

Combobox Component Help
I need for the combobox to default its selection to a variable that I pass in. Currently each time the user opens up the window with the combobox it goes back to the first position and the person has to redo his selection.

Does anybody know how to do this?

Thanks!

Colby

ComboBox Component
Hi,
I am trying to get my CombBox component to display values opening from the bottom up versus top down. Is there a way to configure that? Is it a skin element. Any help would be greatly appreciated.

Thanks in advance,
Mike

A Bug In AS3 Combobox Component
Hi,
i'm working in flash 9/AS 3, and added to one of my swf (which loads into
the main one) a combo-box component. when its data provider property is
empty, and i play the main swf - the combo box is there, empty of-course,
and nothing happens when i click it. however, when i add data manually to
the data provider property of the component (single item), and then play the
main swf - the combo-box is still empty, and when clicked (doesn't matter
where on the component), i get the following error:
TypeError: Error #1009: Cannot access a property or method of a null object
reference.
at
fl.containers::BaseScrollPane/fl.containers:BaseScrollPane::drawBackground()
at fl.controls::List/fl.controls:List::draw()
at fl.core::UIComponent/drawNow()
at fl.controls::List/scrollToIndex()
at fl.controls::SelectableList/scrollToSelected()
at fl.controls::ComboBox/open()
at fl.controls::ComboBox/fl.controls:ComboBox::onToggleListVisibility()

and when clicked again, this error pops:
ArgumentError: Error #2025: The supplied DisplayObject must be a child of
the caller.
at flash.display::DisplayObjectContainer/removeChild()
at fl.controls::ComboBox/close()
at fl.controls::ComboBox/fl.controls:ComboBox::onToggleListVisibility()

when i tested the inner swf, there was no problem, and when i made another
test, with an empty movie, containing only the following code:

var ur:URLRequest = new
URLRequest("C:\Users\eRez\Documents\AllOfMe\Timeline019\swf\balloon.swf");
var loader:Loader = new Loader();
loader.load(ur);
this.addChild(loader);

there were no problems at all.

does anybody have any idea where all of this comes from?
thanks in advacne,
eRez
www.AllofMe.com

Help With Combobox Component...please
I cannot figure this one out, I have two comboboxes, type_cb and loc_cb. Whenever I click them, they steal focus from all the other movieclips.

How do I remove focus from them???
I tried doing this:

type_cb.drawFocus = null;
type_cb.dropdown.drawFocus = null;
loc_cb.drawFocus = null;
loc_cb.dropdown.drawFocus = null;

and also tried setting the focus to the movieclips. The first one did nothing, and the second put an ugly yellow box around my movieclips....any ideas as to whats causing this??? Thanks alot

ComboBox Component
Where can I change the color of the text in the combobox components? I tried searching in the components skin library but without succes.

Can someone tell me specificly where I can change the boring black characters into some nice catchy colored ones?

Thanx in advance.

ComboBox Component
Hi, there!

I have a question about a problem I just got into!

//
I am using a combobox and some list components; when you select an item from the combobox the list component will change according to that selection (that was easy)... but now when I use this script: (hotels.selectedIndex = hotels.length-anynumber the list component does not change until I "personaly" select an item from the combo!... Why when I select an item using that line-scrip my list-components does not change?
//


THANKS A LOT!!!

ComboBox Component
I am trying to use the combobox component for the first time and having a bit of trouble. All I want to do is have two choices in the drop menu. user picks one of the two choices, clicks next (component button) and goes to scene "xyz" based on the selection.

example would be... input text field and button with script like...
on (release) {
set(processname, "XSTS01");
if (processname == "XSTS01") {
gotoAndPlay("Scene 2", 1);
}
}

any help appreciated...

Combobox Component Help
HEy all,

I was wondering how many columns of data a flash combobox can have.

Explanation:

I want to associate a "name", "date1", and "date 2" into a combobox.
Where the dates would be data, and name would be a label.
I know how to call tha label and data like so.


Code:
combobox.getSelectedItem().label
combobox.getSelectedItem().data
Is there any way to have more than one "data field" for each label?


Is something like this possible:

Code:
combobox.addItem(ComboSites,ComboURLs[i], [i]ComboEnds[i]) ;
Any help or input is really appreciated.

Thanks,
Limitlis

ComboBox Component And PHP Help
hey all,

i have a combo box component and i want when you click on the option my php will load a html file which i will edit through flash but yeh...i'm just having the problem with how to click and have an action do something (i.e. load php file) from the component.

any ideas???

Cheers in advance Peeps

AS 2 Help With Combobox Ui Component
I'm working on some changes to a recently purchased flash template. One of the changes that needs to be made is to modify the dates on a year selection drop down box.



it starts at 2005 and only gives the option to select through 2007. I need to modify this to make years through 2010 selectable options. My biggest problem is that I don't know what to look for in the code.

You can take a look at the .fla here: http://projectnemeth.com/other/mvoy.fla

I would appreciate any help.

ComboBox Component
Where can I change the color of the text in the combobox components? I tried searching in the components skin library but without succes.

Can someone tell me specificly where I can change the boring black characters into some nice catchy colored ones?

Thanx in advance.

ComboBox Component
Hi, there!

I have a question about a problem I just got into!

//
I am using a combobox and some list components; when you select an item from the combobox the list component will change according to that selection (that was easy)... but now when I use this script: (hotels.selectedIndex = hotels.length-anynumber the list component does not change until I "personaly" select an item from the combo!... Why when I select an item using that line-scrip my list-components does not change?
//


THANKS A LOT!!!

Using The Combobox Component
hello all,

ok, i have a combobox component with some values: val1, val2

when user clicks a value i want to move the playhead to a frame where the contect will be shown

this would be the pseudo code for it:

===
if val1 gotoAndStop(1);
set the combobox to show val1;
===

i've set up the changeHandler and i've added my function to the first keyframe of the movie - it's just the syntax i'm struggling with

can anybody help me with the actionscript please?

cheers

ComboBox Component
I am trying to use the combobox component for the first time and having a bit of trouble. All I want to do is have two choices in the drop menu. user picks one of the two choices, clicks next (component button) and goes to scene "xyz" based on the selection.

example would be... input text field and button with script like...
on (release) {
set(processname, "XSTS01");
if (processname == "XSTS01") {
gotoAndPlay("Scene 2", 1);
}
}

any help appreciated...

Combobox Component Help
HEy all,

I was wondering how many columns of data a flash combobox can have.

Explanation:

I want to associate a "name", "date1", and "date 2" into a combobox.
Where the dates would be data, and name would be a label.
I know how to call tha label and data like so.


Code:
combobox.getSelectedItem().label
combobox.getSelectedItem().data
Is there any way to have more than one "data field" for each label?


Is something like this possible:

Code:
combobox.addItem(ComboSites,ComboURLs[i], [i]ComboEnds[i]) ;
Any help or input is really appreciated.

Thanks,
Limitlis

Using The ComboBox Component
I am working on a project where the user can click on a country (from a world map) and see if it has a missle defense system and other information about the it.

Some of the countries are so small, that I think the end user might have a problem clicking the right country, so I thought it would be cool to also include a ComboBox so that they can easily select the country they want to see.

I have all of the country names in the combobox as "labels" but how do I tell the combobox to load cuba.swf when they select cuba in the menu?

Bug With ComboBox Component?
I have included two comboBox components in my file.  After clicking on either of them then my other buttons do not work properly.

For example,
1) I have a view_cb that lists different viewing ratios such as 200, 150, 100, and 50.  (The movie then scales by the number selected).
2) I also have two buttons (dec_btn and inc_btn) that also control the scaling of the movie.  Each time one of these buttons is pushed then the movie's x/y scale decrements/increments by 10.

These two functions work fine seperately, but if I manipulate the combobox first, and then try the buttons --> After I press the buttons, I must move the mouse to another location on the buttons before I press them again.

This has to be a bug...does anyone know how to work around this?  What should I do to solve this?  Any suggestions are greatly appreciated as this has stumped me for some time now.  Thank you -
  Frank

Help With Combobox Component Pls
Hi, I need help with a comboBox on my flash to php form, everything works good on the form, except for the comoboBox. it is not sending de values.

this is what I get in the mail for the comboboxes:

Producto: [object Object]
Presentación: [object Object]

my comboBox components on stage are:

prods_cb
size_cb

so here my "firstFrameCode"

please ignore the long style code =(

///////////////////////////////////////////////////////////////////////////////////////////

fscommand ("allowscale", "false");

//------------------------------------ style code

import mx.styles.CSSStyleDeclaration;

var new_style:Object = new CSSStyleDeclaration();
_global.styles.myStyle = new_style;

new_style.setStyle("themeColor", "0xd7c57e");
new_style.setStyle("backgroundColor", "0xF0E8CA");
new_style.setStyle("fontFamily ","verdana");
new_style.setStyle("fontSize","11");
new_style.setStyle("color","0x775422");
new_style.setStyle("textAlign", "left");
new_style.setStyle("textSelectedColor", "0x775422");
new_style.setStyle("textRollOverColor", "0x775422");
new_style.setStyle("useRollOver",true);
new_style.setStyle("borderStyle", "solid");
new_style.setStyle("alternatingRowColors", [0xe6d9ad, 0xe9ddb5]);

prods_cb.setStyle("styleName", "myStyle");
size_cb.setStyle("styleName", "myStyle");

//------------------------------------ end of comboBox styles

cname1.borderColor = 0xC1A744;
cname1.backgroundColor = 0xECD78E;
bname1.borderColor = 0xC1A744;
bname1.backgroundColor = 0xECD78E;
email1.borderColor = 0xC1A744;
email1.backgroundColor = 0xECD78E;
telno1.borderColor = 0xC1A744;
telno1.backgroundColor = 0xECD78E;
canti1.borderColor = 0xC1A744;
canti1.backgroundColor = 0xECD78E;

cname1.onSetFocus = function() {
cname1.backgroundColor = 0xF0E8CA;
cname1.borderColor = 0xC1A744;
};
cname1.onKillFocus = function() {
cname1.backgroundColor = 0xEAE0B3;
cname1.borderColor = 0x775422;
};
bname1.onSetFocus = function() {
bname1.backgroundColor = 0xF0E8CA;
bname1.borderColor = 0xC1A744;
};
bname1.onKillFocus = function() {
bname1.backgroundColor = 0xEAE0B3;
bname1.borderColor = 0x775422;
};
email1.onSetFocus = function() {
email1.backgroundColor = 0xF0E8CA;
email1.borderColor = 0xC1A744;
};
email1.onKillFocus = function() {
email1.backgroundColor = 0xEAE0B3;
email1.borderColor = 0x775422;
};
telno1.onSetFocus = function() {
telno1.backgroundColor = 0xF0E8CA;
telno1.borderColor = 0xC1A744;
};
telno1.onKillFocus = function() {
telno1.backgroundColor = 0xEAE0B3;
telno1.borderColor = 0x775422;
};
canti1.onSetFocus = function() {
canti1.backgroundColor = 0xF0E8CA;
canti1.borderColor = 0xC1A744;
};
canti1.onKillFocus = function() {
canti1.backgroundColor = 0xEAE0B3;
canti1.borderColor = 0x775422;
};

//------------------------------------ end of inputText styles

//------------------------------------ tabIndex and data

cname1.tabIndex = 1;
bname1.tabIndex = 2;
email1.tabIndex = 3;
telno1.tabIndex = 4;
prods_cb.tabIndex = 5;
size_cb.tabIndex = 6;
canti1.tabIndex = 7
send_btn.tabIndex = 8;

size_cb.addItem({data:0, label:""});
size_cb.addItem({data:1, label:"1Lt"});
size_cb.addItem({data:2, label:"5Lt"});
size_cb.addItem({data:3, label:"20Lt"});
size_cb.addItem({data:4, label:"1000Lt"});

prods_cb.addItem({data:0, label:""});
prods_cb.addItem({data:1, label:"Aminolom Algas Complex"});
prods_cb.addItem({data:2, label:"Aminolom Calcio"});
prods_cb.addItem({data:3, label:"Aminolom Calcio Boro"});
prods_cb.addItem({data:4, label:"Aminolom Cebo"});
prods_cb.addItem({data:5, label:"Aminolom Cuaje"});
prods_cb.addItem({data:6, label:"Aminolom Enzimatico Foliar 12%"});
prods_cb.addItem({data:7, label:"Aminolom Enzimatico Radicular 6%"});
prods_cb.addItem({data:8, label:"Aminolom Floraci&oacute;n"});
prods_cb.addItem({data:9, label:"Aminolom Liquido 5-15-5"});
prods_cb.addItem({data:10, label:"Aminolom Liquido 12-4-6"});
prods_cb.addItem({data:11, label:"Aminolom Liquido 4-8-10"});
prods_cb.addItem({data:12, label:"Aminolom Liquido 8-4-8"});
prods_cb.addItem({data:13, label:"Aminolom Maduraci&oacute;n"});
prods_cb.addItem({data:14, label:"Aminolom Magnesio"});
prods_cb.addItem({data:15, label:"Aminolom Manganeso"});
prods_cb.addItem({data:16, label:"Aminolom Molibdeno"});
prods_cb.addItem({data:17, label:"Aminolom Multimineral"});
prods_cb.addItem({data:18, label:"Aminolom Oleico"});
prods_cb.addItem({data:19, label:"Aminolom Olivo"});
prods_cb.addItem({data:20, label:"Aminolom P H"});
prods_cb.addItem({data:21, label:"Aminolom Raiz"});
prods_cb.addItem({data:22, label:"Aminolom Super 40"});
prods_cb.addItem({data:23, label:"Aminolom TGV"});

//////////////////////////////// THIS IS WHERE I NEED HELP ////////////////////////////////

//------------------------------------ for Products comboBox


product = new Object();
product.change = function(eventObj)
{
var eventSource = eventObj.target;

var theSelectedItem = eventSource.selectedItem;
var theSelectedItemLabel = theSelectedItem.label;

trace ( "You selected "+theSelectedItemLabel+".");
}
prods_cb.addEventListener ("change", product);


//------------------------------------ for size comboBox


var cb2Listener:Object = new Object();
cb2Listener.change = function (evt_obj:Object) {
trace("Currently selected item is: " + evt_obj.target.selectedItem.label);
}

size_cb.addEventListener("change", cb2Listener);
size = cb2Listener;


// non of them work

//------------------------------------ functions

String.prototype.isNumbers = function() {
if (this.length<1) {
return false;
}
for (i=0; i<this.length; i++) {
code = this.charCodeAt(i);
if (this.charAt(i) != " " && code<48 || code>57) {
return false;
}
}
return true;
};

//------------------------------------

mailform = "mailform_cotizacion.php";
confirm = "Esperando confirmación ..."
action = "send";
Selection.setFocus("cname");
function validate (address) {
if (address.length>=7) {
if (address.indexOf("@")>0) {
if ((address.indexOf("@")+2)<address.lastIndexOf(".")) {
if (address.lastIndexOf(".")<(address.length-2)) {
return (true);
}
}
}
}
return (false);
}
function formcheck () {
if ((((email == null)) || (email.length<1)) || (email == "ERROR! Address not valid")) {
email = "ERROR! Address not valid";
action = "";
}
if (!validate(email)) {
email = "Dato requerido";
action = "";
}
if ((((cname == null)) || (cname.length<1)) || (cname == "ERROR! Address not valid")) {
cname = "Dato requerido";
action = "";
}
if ((((bname == null)) || (bname.length<1)) || (bname == "ERROR! Address not valid")) {
bname = "Dato requerido";
action = "";
}
if ((((size_cb.text == null)) || (size_cb.text.length<1)) || (size_cb.text == "ERROR! Address not valid")) {
error2 = "seleccione una presentación";
action = "";
}
if ((((prods_cb.text == null)) || (prods_cb.text.length<1)) || (prods_cb.text == "ERROR! Address not valid")) {
error = "seleccione un producto";
action = "";
}
if ((((telno == null)) || (telno.length<1 or telno.isNumbers() == false)) || (telno == "ERROR! Address not valid")) {
telno = "Ingrese teléfono";
action = "";
}
if ((((canti == null)) || (canti.length<1 or canti.isNumbers() == false)) || (canti == "ERROR! Address not valid")) {
canti = "ingrese un número";
action = "";
}
if ((validate(email)) && (email != "ERROR!") && (cname != "") && (bname != "") && (culti != "") && (product != "") && (canti.isNumbers() == true) && (size != "") && (telno.isNumbers() == true)) {
action = "send";
loadVariablesNum (mailform, 0, "POST");
gotoAndPlay ("wait");
}
}
stop ();


//------------------------------------ THE PHP

<?

$adminaddress = "fabrizio.piazze@gmail.com";
$siteaddress ="http://www.gcgloblacrops.com.pe";
$sitename = "GC Globalcrops";

$date = date("m/d/Y H:i:s");

if ($REMOTE_ADDR == "") $ip = "no ip";
else $ip = getHostByAddr($REMOTE_ADDR);


if ($action != ""):
mail("$adminaddress","Solicito cotización",
"Un visitante de $sitename ha solicitado la siguiente cotización:

Nombre de contacto: $cname
Empresa: $bname
Email: $email
Teléfono: $telno

Producto: $product

Presentación: $size

Cantidad: $canti

The visitor commented:
------------------------------
$comments

Logged Info :
------------------------------
Using: $HTTP_USER_AGENT
Hostname: $ip
IP address: $REMOTE_ADDR
Date/Time: $date","FROM:$adminaddress");

mail("$email","Thank You for visiting $sitename",
"Hi $cname,

Thank you for your interest in $sitename!

Cheers,
$sitename
$siteaddress","FROM:$adminaddress");

$sendresult = "Thank you for visiting <a href = "$siteaddress" target = "_blank"><u>$sitename</u></a>. You will receive a confirmation email shortly. ";
$send_answer = "answer=";
$send_answer .= rawurlencode($sendresult);
echo "$send_answer";

endif;

?>

//------------------------------------ THE FILES !
Here the form http://www.gcglobalcrops.com/NwSite/cotizacion1.html

to donwload the fla, swf, html, and php clic here


Thank You so much in advance!

ComboBox Component / XML
I have a ComboBox that is populated via XML from this code:

Code:

(I left the brackets off becuse for some reason everything was getting deleted when I submit it to the forum)


menu

   item label="Select >>" data="0"

   item label="Credit cards" data="1" url="https://www.mycardstatement.com" target="_blank"

   item label="eStatement Enrollment" data="2" url="https://estatements.ffbla.com" target="_blank"

   item label="Investments" data="3" url="http://www.eprimevest.com" target="_blank"

   item label="Insurance" data="4" url="http://www.digop.com" target="_self"

/menu




Everything is working fine except the first "item" is not displayed in combo box by default... instead some funky error is there.

Error says: [type Function], [type Function],

I've tried everything I can think of and am to the point where I want to give up and make my own from scratch... sometimes I hate components!

Here is the Actionscript:
("combo" is the variable of the combo box component)

Code:

var xml:XML = new XML();
xml.ignoreWhite = true;


xml.onLoad = function() {
   combo.dataProvider = this.firstChild.childNodes;
   combo.selectedIndex = 0;
}

xml.load("menu.xml");

var comboL:Object = new Object();
comboL.change = function() {
   var item = combo.selectedItem;
   var link = item.attributes.url;
   var win = item.attributes.target;
   if(link) {
      getURL(link,win);
   }
}

combo.addEventListener("change",comboL);


Any help or insight is GREATLY appreciated! :)

ComboBox Component - Configuration
Hi there... I don't know how to do this...
I need to put the link in my combobox component and this link must open a new window (_blank), but I don't konw how. Can somebody tell me how... please...

ComboBox Component Issue
I have a movie loaded at level 30. It has a ComboBox in it. When the ComboBox is clicked, however, the drop-down list is obscured by movies loaded at levels 19 and 18.

I put a button on the movie loaded at level 30 to drag it, as a test. Sure enough, when I drag the movie, it always remains above the movies loaded at lower levels, as you would expect. However, when I click the combo box, it consistently appears below the other movies.

Can anyone help me with this one?

ComboBox Component Problems
hi
i'm looking for a way to make my ComboBox component in Flash MX to have actions assigned to it... i need to assign the loadVariables action and the gotoAndPlay. I need to have A LOT of items in this combobox, about 80 or so. When you click a choice in the combobox i want it to loadVariables and then gotoAndPlay a different frame. This is very urgent and I need a response ASAP.
Thank you
Peter

Copyright © 2005-08 www.BigResource.com, All rights reserved