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








ComboBox Selected Item Text Label Behind White Background


This is one for components experts.

I'm using the ComboBox component populated with XML data. Everyting works fine. Except sometimes the text Label indicating the selected Item all the way on the top of the comboBox doesn't appear. The label remains white.

With extensive debugging I've discovered that the text label somehow appears behind the white background.

comboBox.focusTextField.border_mc which is the white background is behind the text Label MC.

WHY? What am I doing wrong?

It must be some depth or styles issue...?

Any insight appreciated.

Thank you all.

Cheers

stephank




Adobe > ActionScript 1 and 2
Posted on: 08/27/2007 09:36:14 PM


View Complete Forum Thread with Replies

Sponsored Links:

Combobox Selected Item Text Wont Embed.
I have a combobox component and am embedding the font with AS. It works fine for the items you can see when you hit the down arrow. but the displayed item text isnt embedded. I dont know if it makes a difference, but the combobox and its assets are being pulled from a shared library, as well as the font. what am i doing wrong?

Here is a screenshot

and here is my code:

ActionScript Code:
myStatesCB.textField.setStyle("borderStyle","solid");
myStatesCB.textField.setStyle("borderColor",0x000000);
myStatesCB.setStyle("borderStyle","solid");
myStatesCB.setStyle("borderColor",0x000000);

//~~~~The bit that should be important to this problem~~~~
myStatesCB.textField.fontFamily = "arial";
myStatesCB.textField.embedFonts = true;
myStatesCB.setStyle("fontSize",13);
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

myStatesCB.setStyle("themeColor",0xffffff);
myStatesCB.setStyle("backgroundColor",0xffffff);
myStatesCB.color = 0x000000;
myStatesCB.textSelectedColor = 0xffffff;
myStatesCB.rollOverColor = 0xB3BCB1;
myStatesCB.selectionColor = 0x4D604B;
myStatesCB.textField.setStyle("backgroundColor","none");

View Replies !    View Related
Selected Item In ComboBox
Herro,

I have a question regarding the ComboBox component. To make things simple, I'll give you a quick overview of how I'm trying to use it.

I have text fields on the stage, and I'm trying to make it so when I click those text fields, my ComboBox automatically changes to the type of font I'm using (the ComboBox has a list of fonts to choose from.) I've managed to sort of accomplish this by using the replaceItemAt function, however, all this does is completely wipe out the item for the old font and replaces it with the new one.

I'm not trying to be too picky, but is there a way I can make it so my ComboBox will display the font I'm using while retaining the order it's in, and not deleting or replacing any of the others?

I've done a pretty extensive search on Google and on these forums, but haven't really found an answer. Could someone give me some help, or at least a link to point me to that I may have missed in my searching?

Is this even possible!?! Let me know if you need some code...

Thanks!

View Replies !    View Related
How Can I Remember The Item Selected In Combobox
Hi ... got a app with 5 step to create a personnalise car.

on the first step, the user can choose the color(that's in a combobox). After going on the others step, if the user decide to change color and go previously to the first step, the combobox have to show what color (highlignt the color name) the user has already choose.

How can i hightlight by default a field in a combobox ???

View Replies !    View Related
Getting Selected Data Item From Combobox
OK...

Really simple question but I got a 404 on the Macromedia site when looking this up.

How do I get the associated data value from the selected item of a combobox??

I have tried:
country_id.getValue
country_id.getValue.value
country_id.getSelectedIndex
country_id.getSelectedIndex.value

I have also tried:
country_id.getValue.data
etc etc

Thanks in advance

View Replies !    View Related
Setting Selected Item For Combobox AS1
Hi guys
i am trying to set the selected item in a combobox.
I have tried
code:
//
if (resRace == "1") {
theRace.select(resRace);
}
if (resRace == "2") {
theRace.select(resRace);
}
if (resRace == "3") {
theRace.select(resRace);
}
if (resRace == "4") {
theRace.select(resRace);
}
//
// AND
//
if (resRace == "1") {
theRace.setValue(resRace);
}
if (resRace == "2") {
theRace.setValue(resRace);
}
if (resRace == "3") {
theRace.setValue(resRace);
}
if (resRace == "4") {
theRace.setValue(resRace);
}
//
// AND
//
if (resRace == "1") {
theRace.selectedIndex = resRace;
}
if (resRace == "2") {
theRace.selectedIndex = resRace;
}
if (resRace == "3") {
theRace.selectedIndex = resRace;
}
if (resRace == "4") {
theRace.selectedIndex = resRace;
}


with no luck

Anyone
Cheers
Paul

View Replies !    View Related
Combobox Selected Item Color
I'm having trouble with the combo box, drop down component. I need to color the text in the selected item at the top (the text you see when the box is closed). I can color just about everything else, but I can't seem to find the property for this one. Any help would be much appreciated.

View Replies !    View Related
Combobox Selected Item Disappears
When I select an item from the comboBox-list the selected item stays blank(visually) but the comboBox-list remains populated and change-event keeps firing.

This happens when I embed fonts and modifies or removes items from an existing combobox.

Here's the code that causes the anomoly:
comboBox.textField.setStyle("textFormat", fontFormat);
comboBox.textField.setStyle("embedFonts", true);

Any suggestions?

Thx ahead!

View Replies !    View Related
Combobox Selected Item Disappearing
When I select an item from the comboBox-list the selected item stays blank(visually) but the comboBox-list remains populated and change-event keeps firing.

This happens when I embed fonts and adds or removes items from an existing combobox.

Here's the code that causes the anomoly:
comboBox.textField.setStyle("textFormat", fontFormat);
comboBox.textField.setStyle("embedFonts", true);

Any suggestions?

Thx ahead!

View Replies !    View Related
V1 Combobox Component Selected Item Can It Be Traced?
hi gang


so i know how to trace a v2 combo box
by using a listener

but is there a way to trace the selected state of a v1 component?
i can't spot it anywhere


here is how i do it on v2's
Code:

var cbListener:Object = new Object();
cbListener.change = function(evt_obj:Object) {
var item_obj:Object = myList.selectedItem;
var i:String;
for (i in item_obj) {
  trace(i + ":" + item_obj[i]);
}
trace("");
};
list2.addEventListener("change", cbListener);


any help is most welcome

View Replies !    View Related
[F8] Update Combobox Selected Item On A Button Click
I am working on a pagination module.
In the top of the page there is a list of items where I have to show only ten items and if there are more than ten items then a combo box will display 1 of 2, 1 of 3 etc., depending upon the number of items in the list. I have done it using XML and arrays and it is working fine.

But there is also a next and previous button which is also working but now what I want is suppose if we are in # 2 of 3 page and click on the previous button then the selected item of combo box should also change from 2 of 3 to 1 of 3.

Please let me know how should I do this.

Please let me know if I could not express myself clearly.

View Replies !    View Related
[F8] Combobox - Green Trail After An Item Is Selected: MovieclipLoader Used
Hi, I have a swf that contains Combobox controls, and another swf that has an instance of MovieclipLoader class, and loads in the combo.swf. That way I get a nice preloader for my movie. But the trouble is, the comboboxes don't work anymore (they cannot be opened) through Loader.swf.

After some digging around, I have read that I should add the following line in the combo.swf :

this._lockroot = true;

That solves the problem, partially. Now comboboxes can be opened, but after I select an item, a green trail outline remains until I choose another control to focus in ...

Here is the code so you can see for yourselves

View Replies !    View Related
Combobox Selected Label.
Hi,

Can I set a combobox to initially be set to a particular label? Its a UI Components combobox. For instance I need my combobox to initially be set to the 4th label down from when it starts.

Can this be done?

Thanks for any help.

Steven.

View Replies !    View Related
Tracing ComboBox Selected Label
Hi there!

I want to know if there's a trick which can allow me to trace the displayed item of a ComboBox.
So, when coming back to the frame where the ComboBox instance is located, I retrieve it in the same state it was when I left its frame (i.e. displaying the same label...).

Many thanks in advance for any help!

Best regards,
Gerry

View Replies !    View Related
Select Item Into Combobox, Based On Label Condition
I want to select an item in my comboBox, depend on label condition.
How can be done?

View Replies !    View Related
Capturing Label Selected In ComboBox In A VAR, And POSTing It With A Send Button
I've looked through the help many times and searched for various tutorials all over the net. Support docs I found have led to writing the following code (code was attached to comboBox instance) which was not working. The send button is not sending the label that I am trying to capture in the VAR "subject"

on (change) {
function(){
subject = contactReason.getSelectedItem().label;
}
}

I've been trying to look it up for a week and have had some headway - I didn't know how to use components at all before this. I'd asked for help or a specific tutorial but haven't found anything that will work the way I need it to.

I tried changing my code to the following (code is attached to comboBox instance) after someone suggested something different - but it didn't work with my send button either.

on (change) {
var subject:String = contactReason.selectedLabel;
}

contactReason is the name of my comboBox instance...

my send button POSTs to a CGI page that sends the info to an e-mail - using the VARs as subject etc (there are input boxes in form as well as the combobox) with the following code (code is attached to send button)...

on (release) {
loadMovieNum("formdone.swf", 2);
recipient = "sean@pxlforge.com";
loadVariablesNum("/cgi-bin/cgiemail/contact/contact.cgi", 0, "POST");
}

the input boxes still work fine and pass the other VARs, but I get no subject (I do if I use an input box - but not with comboBox)

View Replies !    View Related
Selected Item's Name Appear In Text Box
Can someone help me out or point me in the right direction? I'm looking for a method that allows me to display an objects name in a dynamic text box after I select it.





























Edited: 09/03/2007 at 01:20:54 AM by jeeepU

View Replies !    View Related
Selected Item's Name Appear In Text Box
Can someone help me out or point me in the right direction? I'm looking for a method that allows me to display an objects name in a dynamic text box after I select it.

View Replies !    View Related
SELECTABLE WHITE TEXT ON BLACK BACKGROUND - WHITE CURSOR - CAN IT BE?
SO i have a dynamic white text on a black background... can select but can't see what.
It is possible to change the selectable cursor's default black color with white?????
THANK YOU!

View Replies !    View Related
Add Item After Selected Item In Tree Component?
I've got a tree component which works great, but I'm trying to add an item at a particular location (immediately after the item they select) into the tree.

The problem is that I'm trying to add an item within a branch. I'm using myTree.getDisplayIndex(myNode) to get the position within the tree, but it gives the location relative to the entire list, but I need to get the position relative to the parent (which is what myNode.parentNode.addTreeNodeAt is trying to write to)...

Anyone know how I can get the position of the item the user selects relative to it's branch???

Thanks!!

View Replies !    View Related
Selected Path Showing Into Label Text
There is a browse button and i am going to browse my fiels in the system. finally i selected a file from different subdirectories. Now I need the selected total path into the lable text for ex.
D:MyFilesFlashFiles est.txt this should be display in lable.text like same D:MyFilesFlashFiles est.txt .

how is it possible anyone please help

View Replies !    View Related
How Do I Set The Selected Text To Be A Variable Using A Combobox?
Code:
stop();

//variables

var pValue;

//functions

pType.setChangeHandler("setType")

function setType() {
_root.pValue = pType.getValue();
}

I'm putting this code in the frame. I want to assign the text to the variable "pValue". I'm using a combobox component in flash 2004 with 5 options.

Thanks

View Replies !    View Related
ComboBox Not Setting Any 'selected' Text
i'm having some trouble with an actionscript-generated ComboBox

here's my script

//create object to pass to ComboBox init
var comboInit:Object = new Object();
//create array to pass to combobox and set initial state
var sizes:Array = [{thisSize: "choose one"}];
//populate array
for (var i:Number = 0; i < productArray[product].sizes.length; i++) {
sizes.push ({thisSize:productArray[product].sizes});
}
comboInit._y = 450;
comboInit._x = 500;
comboInit.dataProvider = sizes;
comboInit.labelField = "thisSize";
createClassObject(ComboBox, "variationCombo", 5004, comboInit);

when the drop down happens, i can see all of the values that were passed to the ComboBox but there's no text on the 'up' state, either before it is used or after a selection is made.

it is above everything else

i have tried several ways of passing the data to the ComboBox
eg
var combo:ComboBox = createClassObject(ComboBox, "variationCombo", 5004);
combo._y = 450;
combo._x = 500;
combo.labelField = "thisSize";
combo.dataProvider = sizes;

but nothing seems to work

really hope you can help
a

View Replies !    View Related
Transparent Background With White Text
I'm new with Swish 2 and i'm trying to create a movie that will allow me to fade in text on an existing html page with a background image.

I've been able to create the text and the timeline with fade-in, however, the background for the scene is solid. I tried changing the Alpha level for the back ground to zero, but that didn't matter.

I created a Rectange object which allows me to create text objects to put inside the rectangle (which IS transparent with the Alpha settings) ... BUT the background is still grey or whatever the color selected...

Question: How do I get a transparent scene?

Thanks,
Mamix0ye

View Replies !    View Related
Setting The Background Color Of The Selection When Text Selected (input TextField)
My input TextField has a black background. The problem is, when some text is enter and then selected, the selection background color remains black and the selected text remains white. Because of this it's imposible to tell that the text has been selected. Is there a way to change the selection background color, or do I really have to write a custom textfield? :(

View Replies !    View Related
Selected Item Cannot Add Actions..
I am having trouble creating new buttons. Whenever I create the button and attempt to add actions to it I get the messege "Current selection cannot have actions applied to it"

I have made several buttons before and all worked fine. Suddenly I keep getting this messege and have no idea why?

Any help would be greatly appreciated.

View Replies !    View Related
How To Display Selected Item
Hi.How can i display every item selected, that once you select an item, it directly goes to the complete list automatically(its ok if it scrolls, im gonna put some scrolling on it anyway). http://www.freewebs.com/kieserr/add.swf ftp://www.freewebs.com/kieserr/add.fla Im planning on putting only 5 items on the partial selected item lists. Also, how can you make 2 decimal places to display? What i have is inconsistent. I want to make it appear i.e. (if its 125, it has to display 125.00) I tried different Math.round scripts but it did not work.

View Replies !    View Related
Dropdown Set Selected Item
Hi,

How can one set the selected state in dropdownmenu programmatically, i.e. let London appear?


HTML Code:
this.createObject("ComboBox","ccbCities",this.getNextHighestDepth());
ccbCities.addItem("Chicago",1);
ccbCities.addItem("London",2);
ccbCities.addItem("Boston",3);

View Replies !    View Related
How To Display Selected Item
Hi.How can i display every item selected, that once you select an item, it directly goes to the complete list automatically(its ok if it scrolls, im gonna put some scrolling on it anyway). http://www.freewebs.com/kieserr/add.swf ftp://www.freewebs.com/kieserr/add.fla Im planning on putting only 5 items on the partial selected item lists. Also, how can you make 2 decimal places to display? What i have is inconsistent. I want to make it appear i.e. (if its 125, it has to display 125.00) I tried different Math.round scripts but it did not work.

View Replies !    View Related
How To Display Selected Item
How can i display every item selected, that once you select an item, it directly goes to the complete list automatically(its ok if it scrolls, im gonna put some scrolling on it anyway). http://www.freewebs.com/kieserr/add.swf ftp://www.freewebs.com/kieserr/add.flaIm planning on putting only 5 items on the partial selected item lists. Also, how can you make 2 decimal places to display? What i have is inconsistent. I want to make it appear i.e. (if its 125, it has to display 125.00) I tried different Math.round scripts but it did not work.

View Replies !    View Related
DataGrid Selected Item
hi guys

there is a dataGrid on root, instance name: dataGridMain
1 column and multiple rows. when i select any item, i need to trace that. i m writing the code:

on(cellPress){
trace(_root.dataGridMain.selectedItem);
}

but its not working. its returning "[object Object]"

plz help. Thanks in advance.

View Replies !    View Related
Trace Last Selected Item
hello guys


i made a menu with a for loop, trying to advance my skills on oop.
so far so good, but i want to implent something extra
just to see if it's possible, maybe it will become usefull to later projects.

so my intention is to remember the last clicked button
just to make sure, not the previous item in the array.

i tried to mess around and figured i need an extra array to store whats been clicked at right? or do it with another function, but how...

so i started but i can't seem to manage my way out of it.

this is how i basicly do it:

Code:

var groupinfo:Array = [{mc:k1, display:"btn1", toload:""}, {mc:k2, display:"btn2", toload:""}, {mc:k3, display:"btn3", toload:""}, {mc:k4, display:"btn4", toload:""}];
function doClick ()
{
   activebtn = this;
   oldmovie = activebtn;
   currentmovie = groupinfo[this.ID].mc;
   _root.testtxt.text = "current movie : " + currentmovie + " old selected : " + oldmovie;
   }
function init ()
{
   for (var element in groupinfo)
   {
      
      var btn:MovieClip = groupinfo[element].mc;
      btn.totalknop.t1.btn_txt.text = groupinfo[element].display;
      btn.pic = groupinfo[element].toload;
      btn.onRollOver = doRollOver;
      btn.onRollOut = doRollOut;
      btn.onRelease = doClick;
      btn.ID = element;
   }
}
init ();


so basicly what am i overlooking to display the previous selected button?
hope someone can shed a light on this, i can't seem to find what i am looking for. tips / pages / everthing is welcome.

thanks , best regards

View Replies !    View Related
[MX] Getting Selected Item In Html-combo Box
I need to know which item is selected in a combo box outside my movie and I have no idea on how to do this.

I also need to know when the value on this combo box is change.

Could someone help on that.

Thanks

View Replies !    View Related
Accessing Selected Item Of A LIst
Hi,

I'm trying to access the selected item idex label of a click list.

I normally havn' t had any trouble with this before. I seem to be having a problem because the list is inside a movie clip.

First of all I attach a movieclip containing a list to a container

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

var player:Object = getDefinitionByName("Player") as Class;
var clipPlayer:MovieClip = new player();
clipPlayer.name="player"
clipPlayer.x=200;
clipPlayer.y=200;
Container.addChild(clipPlayer);

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

Then I add data to the list

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

var temp:Array=arr;
for (var i=0; i<temp.length; i++) {

var obj:Object=temp;
var id:int =obj.ID;
var d:String=obj.Name;
var s:String=obj.SourcePath;
//trace("test"+d+"***")

var c=Container.getChildAt(0);
c.clipListBox.addItem({label:d,data:s});
c.clipListBox.addEventListener(ListEvent.ITEM_CLICK,clipItemClicked);
}

/////////////////////////
In the last line of the above code I have added an event listener named clipItemClicked.

The problem I have is in the handler for this listener.
////////////////////////////////////

public function clipItemClicked(e:ListEvent):void
trace(e.target.selectedItem.label);
}

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

When I try the above code (which I think is fairly standard) I get the following error and I dont understand why?

TypeError: Error #1009: Cannot access a property or method of a null object reference.

As far as I can see the property is not null because the list is displaying data. I'm not sure what the whole null object reference thing means.

Any ideas why I'm getting this error?

Thanks
dub







Attach Code

var player:Object = getDefinitionByName("Player") as Class;
var clipPlayer:MovieClip = new player();
clipPlayer.name="player"
clipPlayer.x=200;
clipPlayer.y=200;
Container.addChild(clipPlayer);

View Replies !    View Related
How Do I Get The Value Of The Selected Item In The PeopleList Component?
How do I get the value of the selected item in the peopleList component? Here's what I am trying to do:

I am using Flash Communication Server, and I have a validation screen for username/password. Upon confirmation, I want it to connect to a stream, and load a peopleList component, listing all of the members connected to the stream. The user then has the ability to choose from one of the people in the list, hit a submit button, and the script needs the data of which person was selected.

As of now, I have tried looking into the component's class/prototype functions. It has a function to be invoked when I click on a person, making turning its background into a selected state, but I need to receive the value of that selected item. Can anyone help? Thanks!

View Replies !    View Related
How Do I Get The Value Of The Selected Item In The PeopleList Component?
How do I get the value of the selected item in the peopleList component? Here's what I am trying to do:

I am using Flash Communication Server, and I have a validation screen for username/password. Upon confirmation, I want it to connect to a stream, and load a peopleList component, listing all of the members connected to the stream. The user then has the ability to choose from one of the people in the list, hit a submit button, and the script needs the data of which person was selected.

As of now, I have tried looking into the component's class/prototype functions. It has a function to be invoked when I click on a person, making turning its background into a selected state, but I need to receive the value of that selected item. Can anyone help? Thanks!

View Replies !    View Related
Deleting The Selected Item In A Listbox
list.removeItemAt () <-- how can I set this parameter so that it only deletes the selected item? I understand that I can place an integer (say 4) there, but then it only deletes whatever is in place 4. What if the 3rd place were highlighted?

Is there a way that I can modify this script so that the parameter slot will understand that it is supposed to delete place 3 (or 2 or 12)?

I really appreciate you reading this whole thing - thank you -


Sam

View Replies !    View Related
Changing Xml Selected Item In List Box
I have followed Lee's xml video playlist to adapt the xml mp3 player from his other tutorial, but I am having problems with the selectedIndex item. The list populates ok and the track titles are selectable, it's just that the selected (highlighted) item is not changing when I click on to the next track.

Here's my code:

Code:

xml.onLoad = function()
{
   var nodes:Array = this.firstChild.childNodes;
   for(var i=0;i<nodes.length;i++)
   {
      //playlist
      playlist.addItem(nodes[i].attributes.artist + " - " + nodes[i].attributes.track);
      
      sa.push(new Song(nodes[i].attributes.url, nodes[i].attributes.artist, nodes[i].attributes.track));
   }
      playSong(playlist.getItemAt(0).data);
      playlist.selectedIndex = 0;
}
var pList:Object = new Object();

pList.change = function()
{
   playSong(playlist.getItemAt(playlist.selectedIndex).data);
}
playlist.addEventListener("change", pList);

xml.load("songs.xml");

Can someone please help and let me know where I'm going wrong.

View Replies !    View Related
Finding The Index Of The Selected Item In A List Box
I was wonder if it's possible to retrieve the index number of the selected item in a list box. I tried getSelectedItem().index; but that didn't work. If it's possible, please share

View Replies !    View Related
Change Position Of A Movie When An Item Is Selected
I need to create a script that will change to position of a movie when an item is selected. Does anyone know how to do this. I have a vertical menu with 7 items and I want to be able to click on an item and a tab will move on the right side from the actiove menu item to the one that is selected.

View Replies !    View Related
Programatically Highlight A Selected Item In A Tree?
i've been trying to set up a tree that can open and close programatically. i can get the tree nodes to open but what i need to do is figure a way to programatically highlight the page within the selected node (so it looks like the user clicked on it.)...

//the tree will open a node based on a index i give.

theTree.setIsOpen(theTree.getTreeNodeAt(lessoninde x), true);
var lessonnode = theTree.getTreeNodeAt(lessonindex);

//how do i get the selected item inside the node to highlight????

lessonnode.setIsOpen(pageindex);
theTree.refresh();

View Replies !    View Related
Listbox-multiple Selection, Last Selected Item
I have a listbox with that has the multiple selection working.
I can change the color of the selection using

sf = new FStyleFormat();
sf.selection = 0x87CEEB

but I want to be able to highlight(or show something besides the selection color) on the Last selected item.
Is there anyway this can be done?

View Replies !    View Related
Setting Selected Item Of Listbox To Be Visible At The Top
I have a listBox of items (t-shirt designs) that has a scroll bar due to the number of items in the list.

I can pass in an ID to the flash file which will cause it to display the correct design (example here: http://www.futurefreak.co.uk/catalog...roducts_id=153 ) and I then set the listBox's selectedIndex to be the current design.

code: _root.listBox.setSelectedIndex( _root.currentdesign );
This hi-lights the design in the listBox - but if the selected item in the list isn't on screen due to the amount of items in the list - then you need to scroll down to see the selected item.

Is there any way that I can force the selected index in the listBox to "jump" to the top of the list so that it's visible each time I call setSelectedIndex?

View Replies !    View Related
Menu Item Resets From Selected State?
Hi,
posted 24 hours ago, updating in hopes of getting some help.
Flash version is MX

when an item is selected on my menu it slides into position on the far right (first position). When selected it goes to a highlighted state.
It should stay in this state on the far right until a new item is selected and starts to slide right.
For some reason the item is reseting out of the highlighted selected state as it slides to the right.
Not always and not always in the same spot.
It is a bit hard to explain, so I have attached the .fla file. I have commented it as much possible. It is stripped down to just contain the menu
Please take a look. Just click menu items to th eleft a few times and you will see the bug happen, items will jump back to frame one.
Mark
P.S. I have been doing a little reading, should I be using "Button.trackAsMenu" in some way to do this?

View Replies !    View Related
How To Add An Element On A Tree Componentīs Selected Item?
Greetings!

Iīm using the tree component mx2004. I upload an XML perfectly. Iīm willing to add a button that adds an item inside the node that has been selected by the user.

Iīve been exploring the addTreeNodeAt function, but I can only get to work on the root of the tree, i canīt add items on the branches.

Iīll apreciate any help!

View Replies !    View Related
Play Animation Then Open Selected Item
Hi all... Am wondering the best way to do this... I have 4 menu items, each time one of them is pressed an animation plays BEFORE it goes to the selected frame label. But I only want to have one animation on the timeline... IS there a way to do it so Flash knows what button is pressed and after the animation plays the correct frame label? Otherwise I guess I could have 4 of the same animation before each frame label just seems wrong to do it that way... I'm sure I can do it with As somehow...

View Replies !    View Related
Play Animation Then Open Selected Item
Hi all... Am wondering the best way to do this... I have 4 menu items, each time one of them is pressed an animation plays BEFORE it goes to the selected frame label. But I only want to have one animation on the timeline... IS there a way to do it so Flash knows what button is pressed and after the animation plays the correct frame label? Otherwise I guess I could have 4 of the same animation before each frame label just seems wrong to do it that way... I'm sure I can do it with As somehow...

View Replies !    View Related
Set An Initial Selected Item In Tree Component?
I know this is supposed to be simple but I can't get it to work. I have a Tree component on the stage named treeMenu. Whenever the user clicks on an item in the tree component, an empty mc on the stage is issued a loadMovie command based on the "clip" attribute in the xml for each node. It works great.

However there is one finishing touch that is bugging me. I want, by default, to load the first node's movie and play it right from the start. This works via a loadMovie command. However, since the movie is loaded and playing I'd like it's corresponding item in the tree menu to be highlighted/selected so the user knows what he/she is watching.

Here is the code I have on frame 1 of my fla so far. I've tried the stuff from the docs but it doesn't work for me, I'm guessing because in the examples they always have a tree dataProvider of an array in the script. I'm using an XML file.

Code:

/**
* XML Tree Menu
**/
// Load XML
var menuXML:XML = new XML();
menuXML.ignoreWhite=true;
menuXML.onLoad = function() {
treeMenu.dataProvider = menuXML.firstChild;
}
menuXML.load("treeMenu.xml");

//Skin

treeMenu.setStyle("backgroundColor", "0xFFFFFF");
treeMenu.setStyle("rollOverColor", "0xB5AA9F");
treeMenu.setStyle("selectionColor", "0xA50021");
treeMenu.setStyle("fontWeight", "normal");
treeMenu.setStyle("fontSize", "12");
treeMenu.setStyle("fontFamily", "Tahoma");
treeMenu.setStyle("textSelectedColor", "0xFFFFFF");
treeMenu.setStyle("textRollOverColor", "0xFFFFFF");
treeMenu.setStyle("borderStyle", "solid");
treeMenu.setStyle("borderColor", "0x#796E59");
//treeMenu.setStyle("borderCapColor", "0x000000");
treeMenu.setStyle("shadowColor", "transparent");
treeMenu.setStyle("shadowCapColor", "transparent");

treeMenu.setStyle("indentation", "4"); //indentation not working

//set tree icons
treeMenu.setStyle("defaultLeafIcon", "imageIcon");
treeMenu.setStyle("folderClosedIcon", "imageIcon");
treeMenu.setStyle("folderOpenIcon", "imageIcon");

//tree menu event listener
var treeListener:Object = new Object();
treeListener.change = function() {
var topic = treeMenu.selectedItem;
var clip = topic.attributes.clip;
if (clip) {
content_mc.loadMovie(clip);
}
}
treeMenu.addEventListener("change", treeListener);

//load Message From the President at start and highlight that node
content_mc.loadMovie("content/messagePresident.swf");
treeMenu.selectedItem = treeMenu.dataProvider(1); //highlight not working - have tried numerous different ways, this was the last straw : )

stop();

View Replies !    View Related
Selected Item Come To Front And Unload Movie Over Hot Area
Drag and drop is easy, just want to add some bells and whistles to it.
Q: how to get the movie to unload when it is draged over to the trashcan/ selected area?

Q: is it possible to have the selected item come to the front?

View Replies !    View Related
Selected Item Come To Front And Unload Movie Over Hot Area
Drag and drop is easy, just want to add some bells and whistles to it.
Q: how to get the movie to unload when it is draged over to the trashcan/ selected area?

Q: is it possible to have the selected item come to the front?

View Replies !    View Related
Selected Item Come To Front And Unload Movie Over Hot Area
Drag and drop is easy, just want to add some bells and whistles to it.
Q: how to get the movie to unload when it is draged over to the trashcan/ selected area?

Q: is it possible to have the selected item come to the front?

View Replies !    View Related
TREE Component: How Do I Get The Node Data Of Selected Item?
Dear board,

I have been following this tutorial to figure out how the tree component works:

http://www.sephiroth.it/tutorials/fl...tree/index.php

My tree is populated nicely with my own xml file and everything looks OK.

How do I get the value of the node the user selected in the tree component.
Here is an extract of my own XML file:


Code:
<node label="SOCKELGIPSE">
<node label="plaster1" value="1" />
<node label="plaster2" value="2" />
</node>


Here is the actionscript but it doesn't work:
What is wrong with the code?


Code:
xml_conn.trigger();

// customize tree styles
this.tree.setStyle("fontFamily", "Verdana");
this.tree.setStyle("fontSize", 10)
this.tree.setStyle("embedFonts", false)
this.tree.setStyle("fontWeight", "normal")
this.tree.setStyle("depthColors", [0xffffff,0xffffff,0xffffff,0xffffff,0xffffff,0xffffff])
this.tree.setStyle("backgroundColor",0xffffff)
this.tree.setStyle("borderStyle", "none");
this.tree.setStyle("color",0x000000);
this.tree.setStyle("textIndent",0);
this.tree.setStyle("indentation",5);
this.tree.setStyle("rollOverColor",0xffffff);
this.tree.setStyle("selectionColor", 0xffffff);
this.tree.setStyle("selectionDuration",0);
this.tree.setStyle("textRollOverColor", 0x000000);
this.tree.setStyle("textSelectedColor",0x000000);
//this.tree.setStyle("defaultLeafIcon", "nullicon");
//this.tree.setStyle("folderOpenIcon", "nullicon");
//this.tree.setStyle("folderClosedIcon", "nullicon");
//this.tree.setStyle("disclosureClosedIcon", "nullicon");
//this.tree.setStyle("disclosureOpenIcon", "nullicon");
this.tree.vScrollPolicy = 'on';

var treeListener:Object = new Object ();
treeListener.target = tree;
treeListener.change = function (evt:Object) {
_root.main.mc_product.info.text = evt.node.attributes.value;
};
tree.addEventListener ('change', treeListener);



It is outputting "undefined" in that textbox.

View Replies !    View Related
Copyright Đ 2005-08 www.BigResource.com, All rights reserved