Re: [Flashcoders] ComboBox label issue
If you want to display both the fontName and fontStyle, define a labelFunction for the combobox. function setLabel(item:Object):String { var fnt:Font = item as Font; return fnt.fontName + ( + fnt.fontStyle + ); } font_cb.labelFunction = setLabel; - Original Message - From: Creighton, Gerry gcreigh...@discmakers.com To: flashcoders@chattyfig.figleaf.com Sent: Monday, January 24, 2011 4:11 PM Subject: [Flashcoders] ComboBox label issue I�m having a problem properly displaying the font name and variant in a combobox. I have fonts embedded in my swf and am exporting for AS. I have a ComboBox that I�m populating from an enumerated font array like so... code fontArray = Font.enumerateFonts(false);//using false only enumerates embedded fonts fontArray.sortOn(fontName,Array.CASEINSENSITIVE); _fontDP = new DataProvider(fontArray); FontCB.dataProvider = _fontDP; //when I set up the FontCB I set the labelField like so... FontCB.labelField = fontName; /code When the ComboBox is opened the display names for the fonts only show the main name of the font and not each variant (shown below). When I publish and select to �Generate Size Report� I get all of the proper font names variants. How can I get the proper font names to display properly. Ie Arial Arial Arial Arial Book Antiqua Book Antiqua Book Antiqua Book Antiqua Helvetica Helvetica Helvetica Helvetica ___ ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [SPAM?] Re: [Flashcoders] ComboBox label issue SOLVED
Sweet! Thanks a lot. On 1/24/11 10:49 AM, Peter Ginneberge p.ginnebe...@telenet.be wrote: If you want to display both the fontName and fontStyle, define a labelFunction for the combobox. function setLabel(item:Object):String { var fnt:Font = item as Font; return fnt.fontName + ( + fnt.fontStyle + ); } font_cb.labelFunction = setLabel; - Original Message - From: Creighton, Gerry gcreigh...@discmakers.com To: flashcoders@chattyfig.figleaf.com Sent: Monday, January 24, 2011 4:11 PM Subject: [Flashcoders] ComboBox label issue I�m having a problem properly displaying the font name and variant in a combobox. I have fonts embedded in my swf and am exporting for AS. I have a ComboBox that I�m populating from an enumerated font array like so... code fontArray = Font.enumerateFonts(false);//using false only enumerates embedded fonts fontArray.sortOn(fontName,Array.CASEINSENSITIVE); _fontDP = new DataProvider(fontArray); FontCB.dataProvider = _fontDP; //when I set up the FontCB I set the labelField like so... FontCB.labelField = fontName; /code When the ComboBox is opened the display names for the fonts only show the main name of the font and not each variant (shown below). When I publish and select to �Generate Size Report� I get all of the proper font names variants. How can I get the proper font names to display properly. Ie Arial Arial Arial Arial Book Antiqua Book Antiqua Book Antiqua Book Antiqua Helvetica Helvetica Helvetica Helvetica ___ ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] ComboBox troubles
Hey Glen, Thanks for that, but I am not using a class in this case to get the items, just a function. Maybe I should be, but I could never figure out how to use classes and there may lie-in the problem. Think Flash 8. :) Sorry if that hurts a little.. Here is what I have //shortened AS2 Code::: import mx.controls.ComboBox; import mx.utils.Delegate; var thumbHolder:Object = new Object(); var picBox:MovieClip = new MovieClip(); var colorBox:ComboBox = new ComboBox(); var picturesArry = []; var colorHolder = []; //Code for loading above arrays not included, but they load fine. var pr:Number = -1; function loadItems() { if (pr (numimages - 1)) { pr++; thumbHolder = attachMovie(Affiliate_MC, Affiliate_MC + pr, pr); thumbHolder.ID = pr; var parentID = thumbHolder.ID; thumbHolder.LoadVars(parentID); thumbHolder._x = 0; thumbHolder._y = pr * spacing; picBox = thumbHolder.attachMovie(picture_box, picture_box, thumbHolder.getNextHighestDepth()); picBox._width = 192; picBox._height = 152; picBox._x = 14; picBox._y = 11; colorBox = thumbHolder.attachMovie(FComboBoxSymbol, os1_ + pr, thumbHolder.getNextHighestDepth()); colorBox._width = 100; colorBox._height = 17; colorBox._x = 264; colorBox._y = 110; colorBox.enabled = true; thumbHolder.pic = picturesArry[thumbHolder.ID][0]; thumbHolder[picture_box].loadMovie(thumbHolder.pic,0); var Colors:Array = new Array({label:Choose Color, data:}); colorBox.rowCount = colorHolder[pr].length; // populate dataProvider var colorBoxLength:Number = Colors.length; for (n = 0; n colorHolder[pr].length; n++) { Colors.push({label:colorHolder[pr][n], data:colorHolder[pr][n]}); colorBoxLength++; } // set dropdown list colorBox.setDataProvider(Colors); if (colorBoxLength 3) { colorBox.selectedItem = 1; } else { colorBox.selectedItem = 0; } var changeObj:Object = new Object(); changeObj = function(evt_obj:Object) { var num:Number = thumbHolder.ID; var selectNum:Number = colorBox.selectedIndex; if (selectNum = 1) { var pic = picturesArry[num][0]; thumbHolder[picture_box].loadMovie(pic,0); thumbHolder.LoadVars(pic); } else if (selectNum 1) { var pic = picturesArry[num][selectNum]; thumbHolder[picture_box].loadMovie(pic,0); thumbHolder.LoadVars(pic); } else { _root.itemSelection_mc.satusTXT.htmlText = ComboBox did not change; } }; colorBox.addEventListener(changeObj,this); } } I am thinking that I need every colorBox to have its own changeObj or I need to be able to reference the picBox that is inside with that colorBox thats being changed. Structure of a single item is as follows: Main Stage - - thumbHolder (Main item MC) - picBox (preview MC) - colorBox (comboBox selection for this item) Karl On Nov 19, 2009, at 7:08 PM, Glen Pike wrote: Hi, Are you doing something like the following - you need to use the Delegate.create function to attach scope to your event handlers. I can't remember if you can pass in the event object or not - try it? HTH Glen import mx.utils.Delegate; class MyMovieClip extends MovieClip { private var colorBox:ComboBox; //... function stuffHasLoaded():Void { colorBox.addEventListener(change, Delegate.create(this, change)); } function change():Void { trace(Hello from + this + .change); var selected:Number = colorBox.selectedIndex; //... } } ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Karl DeSaulniers Design Drumm http://designdrumm.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] ComboBox troubles
Have you tried: colorBox.addEventListener(change, changeObj); or colorBox.addEventListener(change Delegate.create(this, changeObj); I think you got your listener the wrong way around, but might be wrong? Karl DeSaulniers wrote: Hey Glen, Thanks for that, but I am not using a class in this case to get the items, just a function. Maybe I should be, but I could never figure out how to use classes and there may lie-in the problem. Think Flash 8. :) Sorry if that hurts a little.. Here is what I have //shortened AS2 Code::: import mx.controls.ComboBox; import mx.utils.Delegate; var thumbHolder:Object = new Object(); var picBox:MovieClip = new MovieClip(); var colorBox:ComboBox = new ComboBox(); var picturesArry = []; var colorHolder = []; //Code for loading above arrays not included, but they load fine. var pr:Number = -1; function loadItems() { if (pr (numimages - 1)) { pr++; thumbHolder = attachMovie(Affiliate_MC, Affiliate_MC + pr, pr); thumbHolder.ID = pr; var parentID = thumbHolder.ID; thumbHolder.LoadVars(parentID); thumbHolder._x = 0; thumbHolder._y = pr * spacing; picBox = thumbHolder.attachMovie(picture_box, picture_box, thumbHolder.getNextHighestDepth()); picBox._width = 192; picBox._height = 152; picBox._x = 14; picBox._y = 11; colorBox = thumbHolder.attachMovie(FComboBoxSymbol, os1_ + pr, thumbHolder.getNextHighestDepth()); colorBox._width = 100; colorBox._height = 17; colorBox._x = 264; colorBox._y = 110; colorBox.enabled = true; thumbHolder.pic = picturesArry[thumbHolder.ID][0]; thumbHolder[picture_box].loadMovie(thumbHolder.pic,0); var Colors:Array = new Array({label:Choose Color, data:}); colorBox.rowCount = colorHolder[pr].length; // populate dataProvider var colorBoxLength:Number = Colors.length; for (n = 0; n colorHolder[pr].length; n++) { Colors.push({label:colorHolder[pr][n], data:colorHolder[pr][n]}); colorBoxLength++; } // set dropdown list colorBox.setDataProvider(Colors); if (colorBoxLength 3) { colorBox.selectedItem = 1; } else { colorBox.selectedItem = 0; } var changeObj:Object = new Object(); changeObj = function(evt_obj:Object) { var num:Number = thumbHolder.ID; var selectNum:Number = colorBox.selectedIndex; if (selectNum = 1) { var pic = picturesArry[num][0]; thumbHolder[picture_box].loadMovie(pic,0); thumbHolder.LoadVars(pic); } else if (selectNum 1) { var pic = picturesArry[num][selectNum]; thumbHolder[picture_box].loadMovie(pic,0); thumbHolder.LoadVars(pic); } else { _root.itemSelection_mc.satusTXT.htmlText = ComboBox did not change; } }; colorBox.addEventListener(changeObj,this); } } I am thinking that I need every colorBox to have its own changeObj or I need to be able to reference the picBox that is inside with that colorBox thats being changed. Structure of a single item is as follows: Main Stage - - thumbHolder (Main item MC) - picBox (preview MC) - colorBox (comboBox selection for this item) Karl On Nov 19, 2009, at 7:08 PM, Glen Pike wrote: Hi, Are you doing something like the following - you need to use the Delegate.create function to attach scope to your event handlers. I can't remember if you can pass in the event object or not - try it? HTH Glen import mx.utils.Delegate; class MyMovieClip extends MovieClip { private var colorBox:ComboBox; //... function stuffHasLoaded():Void { colorBox.addEventListener(change, Delegate.create(this, change)); } function change():Void { trace(Hello from + this + .change); var selected:Number = colorBox.selectedIndex; //... } } ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Karl DeSaulniers Design Drumm http://designdrumm.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] ComboBox troubles
Could it be because I am using the class below? Not sure if I need it or not. On Nov 20, 2009, at 4:03 AM, Glen Pike wrote: import mx.controls.ComboBox; Karl DeSaulniers Design Drumm http://designdrumm.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] ComboBox troubles
Yes. I tried both of those and nothing.. actually the one below gets an error Error: type mismatch colorBox.addEventListener(change, Delegate.create(this, changeObj); Karl On Nov 20, 2009, at 4:03 AM, Glen Pike wrote: colorBox.addEventListener(change, Delegate.create(this, changeObj); Karl DeSaulniers Design Drumm http://designdrumm.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] ComboBox troubles
I think the scope is lost in the colorBox not knowing which picBox to associate itself with. :-/ Karl On Nov 20, 2009, at 4:16 AM, Karl DeSaulniers wrote: it is actually colorBox.addEventListener(change, Delegate.create (this, changeObj)); just forgot the ), but still does not work On Nov 20, 2009, at 4:12 AM, Karl DeSaulniers wrote: Yes. I tried both of those and nothing.. actually the one below gets an error Error: type mismatch colorBox.addEventListener(change, Delegate.create(this, changeObj); Karl On Nov 20, 2009, at 4:03 AM, Glen Pike wrote: colorBox.addEventListener(change, Delegate.create(this, changeObj); Karl DeSaulniers Design Drumm http://designdrumm.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Karl DeSaulniers Design Drumm http://designdrumm.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Karl DeSaulniers Design Drumm http://designdrumm.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] ComboBox troubles
If I put this code in, I dont get the type mismatch error but it still doesn't work. On Nov 20, 2009, at 4:03 AM, Glen Pike wrote: colorBox.addEventListener(changeObj, Delegate.create(this,change)); Karl DeSaulniers Design Drumm http://designdrumm.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] ComboBox troubles
it is actually colorBox.addEventListener(change, Delegate.create (this, changeObj)); just forgot the ), but still does not work On Nov 20, 2009, at 4:12 AM, Karl DeSaulniers wrote: Yes. I tried both of those and nothing.. actually the one below gets an error Error: type mismatch colorBox.addEventListener(change, Delegate.create(this, changeObj); Karl On Nov 20, 2009, at 4:03 AM, Glen Pike wrote: colorBox.addEventListener(change, Delegate.create(this, changeObj); Karl DeSaulniers Design Drumm http://designdrumm.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Karl DeSaulniers Design Drumm http://designdrumm.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] ComboBox troubles
Karl DeSaulniers wrote: If I put this code in, I dont get the type mismatch error but it still doesn't work. On Nov 20, 2009, at 4:03 AM, Glen Pike wrote: colorBox.addEventListener(changeObj, Delegate.create(this,change)); Karl DeSaulniers Design Drumm http://designdrumm.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Hi, I think part of the problem is scope, but also your first argument to addEventListener should be the event type, not the function that is called. Did you try the call without Delegate - colorBox.addEventListener(change, changeObj); ? Glen ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] ComboBox troubles
Hey Glen, Yes I agree with you on how it should be, but for some reason flash allows it the other way. Yes I did try it the way you suggested when I first started working on it. That is the text book way. that is why I am puzzled. I went to the source and the source isn't working. plus the whole allowance of the malformed event listener. weird. still doesn't work though.. **Sigh** Karl On Nov 20, 2009, at 4:31 AM, Glen Pike wrote: Karl DeSaulniers wrote: If I put this code in, I dont get the type mismatch error but it still doesn't work. On Nov 20, 2009, at 4:03 AM, Glen Pike wrote: colorBox.addEventListener(changeObj, Delegate.create (this,change)); Karl DeSaulniers Design Drumm http://designdrumm.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Hi, I think part of the problem is scope, but also your first argument to addEventListener should be the event type, not the function that is called. Did you try the call without Delegate - colorBox.addEventListener (change, changeObj); ? Glen ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Karl DeSaulniers Design Drumm http://designdrumm.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] ComboBox troubles
If you are doing multiple anonymous functions, you might have to use the naming convention for the combo boxes and picture boxes - if you have multiple instances of these - so when you get a change event on combo1, that's associated with picture_box_1, etc? Karl DeSaulniers wrote: I think the scope is lost in the colorBox not knowing which picBox to associate itself with. :-/ Karl On Nov 20, 2009, at 4:16 AM, Karl DeSaulniers wrote: it is actually colorBox.addEventListener(change, Delegate.create(this, changeObj)); just forgot the ), but still does not work On Nov 20, 2009, at 4:12 AM, Karl DeSaulniers wrote: Yes. I tried both of those and nothing.. actually the one below gets an error Error: type mismatch colorBox.addEventListener(change, Delegate.create(this, changeObj); Karl On Nov 20, 2009, at 4:03 AM, Glen Pike wrote: colorBox.addEventListener(change, Delegate.create(this, changeObj); Karl DeSaulniers Design Drumm http://designdrumm.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Karl DeSaulniers Design Drumm http://designdrumm.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Karl DeSaulniers Design Drumm http://designdrumm.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] ComboBox troubles
Right! How to do that though I guess is my main issue. I cant assign pr to picBox or colorBox. Karl On Nov 20, 2009, at 4:43 AM, Glen Pike wrote: If you are doing multiple anonymous functions, you might have to use the naming convention for the combo boxes and picture boxes - if you have multiple instances of these - so when you get a change event on combo1, that's associated with picture_box_1, etc? Karl DeSaulniers wrote: I think the scope is lost in the colorBox not knowing which picBox to associate itself with. :-/ Karl On Nov 20, 2009, at 4:16 AM, Karl DeSaulniers wrote: it is actually colorBox.addEventListener(change, Delegate.create (this, changeObj)); just forgot the ), but still does not work On Nov 20, 2009, at 4:12 AM, Karl DeSaulniers wrote: Yes. I tried both of those and nothing.. actually the one below gets an error Error: type mismatch colorBox.addEventListener(change, Delegate.create(this, changeObj); Karl On Nov 20, 2009, at 4:03 AM, Glen Pike wrote: colorBox.addEventListener(change, Delegate.create(this, changeObj); Karl DeSaulniers Design Drumm http://designdrumm.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Karl DeSaulniers Design Drumm http://designdrumm.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Karl DeSaulniers Design Drumm http://designdrumm.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Karl DeSaulniers Design Drumm http://designdrumm.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] ComboBox troubles
Do I need to be using colorBox.handleEvent(); ? Karl On Nov 20, 2009, at 4:39 AM, Karl DeSaulniers wrote: Hey Glen, Yes I agree with you on how it should be, but for some reason flash allows it the other way. Yes I did try it the way you suggested when I first started working on it. That is the text book way. that is why I am puzzled. I went to the source and the source isn't working. plus the whole allowance of the malformed event listener. weird. still doesn't work though.. **Sigh** Karl On Nov 20, 2009, at 4:31 AM, Glen Pike wrote: Karl DeSaulniers wrote: If I put this code in, I dont get the type mismatch error but it still doesn't work. On Nov 20, 2009, at 4:03 AM, Glen Pike wrote: colorBox.addEventListener(changeObj, Delegate.create (this,change)); Karl DeSaulniers Design Drumm http://designdrumm.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Hi, I think part of the problem is scope, but also your first argument to addEventListener should be the event type, not the function that is called. Did you try the call without Delegate - colorBox.addEventListener(change, changeObj); ? Glen ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Karl DeSaulniers Design Drumm http://designdrumm.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Karl DeSaulniers Design Drumm http://designdrumm.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] ComboBox troubles
I think you can use the _name of the clip to assign pr: You might even be able to set this as a property on MovieClip as it's not a closed class... I am not sure about ComboBox though - try setting a property ID on it like you do with thumbHolder. From your code though, I can't work out how you are attaching the combobox as a valid clip... Here is what I managed to do by hacking your code to get the combo box to trace out the message onChange... import mx.controls.ComboBox; var thumbHolder:Object = new Object(); var picBox:MovieClip = new MovieClip(); var colorBox:ComboBox = new ComboBox(); var picturesArry = []; var colorHolder = []; var spacing:Number = 50; var numimages:Number = 2; for(var i = 0;i numimages;i++) { picturesArry[i] = i + .jpg; colorHolder[i] = []; for(var j = 0;j 10;j++) { colorHolder[i][j] = Colour + j; } } //Code for loading above arrays not included, but they load fine. var pr:Number = -1; function loadItems() { if (pr (numimages - 1)) { pr++; trace(loadItems + pr); thumbHolder = attachMovie(Affiliate_MC, Affiliate_MC + pr, pr); thumbHolder.ID = pr; var parentID = thumbHolder.ID; //thumbHolder.LoadVars(parentID); thumbHolder._x = 0; thumbHolder._y = pr * spacing; picBox = thumbHolder.attachMovie(picture_box, picture_box, thumbHolder.getNextHighestDepth()); picBox._width = 192; picBox._height = 152; picBox._x = 14; picBox._y = 11; //colorBox = thumbHolder.attachMovie(FComboBoxSymbol, os1_ + pr, thumbHolder.getNextHighestDepth()); colorBox = this.createClassObject(mx.controls.ComboBox, os1_ + pr, thumbHolder.getNextHighestDepth()); colorBox._width = 100; colorBox._height = 17; colorBox._x = 264; colorBox._y = 110; colorBox.enabled = true; thumbHolder.pic = picturesArry[thumbHolder.ID][0]; //thumbHolder[picture_box].loadMovie(thumbHolder.pic,0); var Colors:Array = new Array({label:Choose Color, data:}); colorBox.rowCount = colorHolder[pr].length; // populate dataProvider var colorBoxLength:Number = Colors.length; for (n = 0; n colorHolder[pr].length; n++) { Colors.push({label:colorHolder[pr][n], data:colorHolder[pr][n]}); colorBoxLength++; trace(item + pr + Adding color + colorHolder[pr][n]); } // set dropdown list colorBox.setDataProvider(Colors); if (colorBoxLength 3) { colorBox.selectedItem = 1; } else { colorBox.selectedItem = 0; } var changeObj:Object = new Object(); changeObj = function(evt_obj:Object) { trace(changeObj + this); var num:Number = thumbHolder.ID; var selectNum:Number = colorBox.selectedIndex; if (selectNum = 1) { var pic = picturesArry[num][0]; //thumbHolder[picture_box].loadMovie(pic,0); //thumbHolder.LoadVars(pic); } else if (selectNum 1) { var pic = picturesArry[num][selectNum]; thumbHolder[picture_box].loadMovie(pic,0); //thumbHolder.LoadVars(pic); } else { _root.itemSelection_mc.satusTXT.htmlText = ComboBox did not change; } }; colorBox.addEventListener(change,changeObj); } } for(var i = 0;i numimages;i++) { loadItems(); } Karl DeSaulniers wrote: Right! How to do that though I guess is my main issue. I cant assign pr to picBox or colorBox. Karl On Nov 20, 2009, at 4:43 AM, Glen Pike wrote: If you are doing multiple anonymous functions, you might have to use the naming convention for the combo boxes and picture boxes - if you have multiple instances of these - so when you get a change event on combo1, that's associated with picture_box_1, etc? Karl DeSaulniers wrote: I think the scope is lost in the colorBox not knowing which picBox to associate itself with. :-/ Karl On Nov 20, 2009, at 4:16 AM, Karl DeSaulniers wrote: it is actually colorBox.addEventListener(change, Delegate.create(this, changeObj)); just forgot the ), but still does not work On Nov 20, 2009, at 4:12 AM, Karl DeSaulniers wrote: Yes. I tried both of those and nothing.. actually the one below gets an error Error: type mismatch colorBox.addEventListener(change, Delegate.create(this, changeObj); Karl On Nov 20, 2009, at 4:03 AM, Glen Pike wrote: colorBox.addEventListener(change, Delegate.create(this, changeObj); Karl DeSaulniers Design Drumm http://designdrumm.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Karl DeSaulniers Design Drumm http://designdrumm.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com
Re: [Flashcoders] ComboBox troubles
Hey Glen, If it wouldn't be a trouble and I know this may sound odd, but could you send me a FLA with a combo box in it? no code, just the component on a blank stage? I am wondering if its just the combo box component that I have that isn't working. Karl ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] ComboBox troubles
Hi, Done that... Glen Karl DeSaulniers wrote: Hey Glen, If it wouldn't be a trouble and I know this may sound odd, but could you send me a FLA with a combo box in it? no code, just the component on a blank stage? I am wondering if its just the combo box component that I have that isn't working. Karl ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] ComboBox troubles
Glad to help. Karl DeSaulniers wrote: HAHA Looks like that may be it. It doesn't load the data or label text, but it tries to call the picture change. Whoo hoo... well looks like you got me a little closer. Now I have to set my styles i guess? Thanks a lot for your input and time. Karl ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] ComboBox troubles
HAHA Looks like that may be it. It doesn't load the data or label text, but it tries to call the picture change. Whoo hoo... well looks like you got me a little closer. Now I have to set my styles i guess? Thanks a lot for your input and time. Karl On Nov 20, 2009, at 6:04 AM, Glen Pike wrote: Hi, Done that... Glen Karl DeSaulniers wrote: Hey Glen, If it wouldn't be a trouble and I know this may sound odd, but could you send me a FLA with a combo box in it? no code, just the component on a blank stage? I am wondering if its just the combo box component that I have that isn't working. Karl ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Karl DeSaulniers Design Drumm http://designdrumm.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] ComboBox troubles
One last thing. How do I get the first item in the combo box to show up? I got the text in the dropdown to show, but nothing in the main. Yours tested fine from your fla. so did the text?? Karl On Nov 20, 2009, at 6:23 AM, Glen Pike wrote: Glad to help. Karl DeSaulniers wrote: HAHA Looks like that may be it. It doesn't load the data or label text, but it tries to call the picture change. Whoo hoo... well looks like you got me a little closer. Now I have to set my styles i guess? Thanks a lot for your input and time. Karl ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Karl DeSaulniers Design Drumm http://designdrumm.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] ComboBox troubles
...but also, I think you created your data provider Colors object with an empty / dummy row so make sure you are wanting to do that. Karl DeSaulniers wrote: One last thing. How do I get the first item in the combo box to show up? I got the text in the dropdown to show, but nothing in the main. Yours tested fine from your fla. so did the text?? Karl On Nov 20, 2009, at 6:23 AM, Glen Pike wrote: Glad to help. Karl DeSaulniers wrote: HAHA Looks like that may be it. It doesn't load the data or label text, but it tries to call the picture change. Whoo hoo... well looks like you got me a little closer. Now I have to set my styles i guess? Thanks a lot for your input and time. Karl ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Karl DeSaulniers Design Drumm http://designdrumm.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] ComboBox troubles
I think you can set the selected index or something like that. Karl DeSaulniers wrote: One last thing. How do I get the first item in the combo box to show up? I got the text in the dropdown to show, but nothing in the main. Yours tested fine from your fla. so did the text?? Karl On Nov 20, 2009, at 6:23 AM, Glen Pike wrote: Glad to help. Karl DeSaulniers wrote: HAHA Looks like that may be it. It doesn't load the data or label text, but it tries to call the picture change. Whoo hoo... well looks like you got me a little closer. Now I have to set my styles i guess? Thanks a lot for your input and time. Karl ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Karl DeSaulniers Design Drumm http://designdrumm.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] ComboBox troubles
Empty data, but not label. not sure why it doesn't populate in my fla. it works fine when I publish the fla you sent (test1) and that has the same code. Karl On Nov 20, 2009, at 6:55 AM, Glen Pike wrote: ...but also, I think you created your data provider Colors object with an empty / dummy row so make sure you are wanting to do that. Karl DeSaulniers wrote: One last thing. How do I get the first item in the combo box to show up? I got the text in the dropdown to show, but nothing in the main. Yours tested fine from your fla. so did the text?? Karl On Nov 20, 2009, at 6:23 AM, Glen Pike wrote: Glad to help. Karl DeSaulniers wrote: HAHA Looks like that may be it. It doesn't load the data or label text, but it tries to call the picture change. Whoo hoo... well looks like you got me a little closer. Now I have to set my styles i guess? Thanks a lot for your input and time. Karl ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Karl DeSaulniers Design Drumm http://designdrumm.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Karl DeSaulniers Design Drumm http://designdrumm.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] ComboBox troubles
Make sure you are using createClassObject rather than attaching the FComboBox movie? Karl DeSaulniers wrote: Empty data, but not label. not sure why it doesn't populate in my fla. it works fine when I publish the fla you sent (test1) and that has the same code. Karl On Nov 20, 2009, at 6:55 AM, Glen Pike wrote: ...but also, I think you created your data provider Colors object with an empty / dummy row so make sure you are wanting to do that. Karl DeSaulniers wrote: One last thing. How do I get the first item in the combo box to show up? I got the text in the dropdown to show, but nothing in the main. Yours tested fine from your fla. so did the text?? Karl On Nov 20, 2009, at 6:23 AM, Glen Pike wrote: Glad to help. Karl DeSaulniers wrote: HAHA Looks like that may be it. It doesn't load the data or label text, but it tries to call the picture change. Whoo hoo... well looks like you got me a little closer. Now I have to set my styles i guess? Thanks a lot for your input and time. Karl ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Karl DeSaulniers Design Drumm http://designdrumm.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Karl DeSaulniers Design Drumm http://designdrumm.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] ComboBox troubles
yes, that I stole from your code. :) that was part of it. my component was not working with mx.control.ComboBox. It is a UI component and not a compiled clip. When I copied your comboBox to my fla and used the createClassObject(mx.control.ComboBox it worked except the first item does not show and my dropdown box is very small... if its not one thing its another.. lol Karl On Nov 20, 2009, at 7:29 AM, Glen Pike wrote: Make sure you are using createClassObject rather than attaching the FComboBox movie? Karl DeSaulniers wrote: Empty data, but not label. not sure why it doesn't populate in my fla. it works fine when I publish the fla you sent (test1) and that has the same code. Karl On Nov 20, 2009, at 6:55 AM, Glen Pike wrote: ...but also, I think you created your data provider Colors object with an empty / dummy row so make sure you are wanting to do that. Karl DeSaulniers wrote: One last thing. How do I get the first item in the combo box to show up? I got the text in the dropdown to show, but nothing in the main. Yours tested fine from your fla. so did the text?? Karl On Nov 20, 2009, at 6:23 AM, Glen Pike wrote: Glad to help. Karl DeSaulniers wrote: HAHA Looks like that may be it. It doesn't load the data or label text, but it tries to call the picture change. Whoo hoo... well looks like you got me a little closer. Now I have to set my styles i guess? Thanks a lot for your input and time. Karl ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Karl DeSaulniers Design Drumm http://designdrumm.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Karl DeSaulniers Design Drumm http://designdrumm.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Karl DeSaulniers Design Drumm http://designdrumm.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] ComboBox troubles
Are you targeting FP6 - if I set my Publish Settings to that, it does not select the first item... Karl DeSaulniers wrote: yes, that I stole from your code. :) that was part of it. my component was not working with mx.control.ComboBox. It is a UI component and not a compiled clip. When I copied your comboBox to my fla and used the createClassObject(mx.control.ComboBox it worked except the first item does not show and my dropdown box is very small... if its not one thing its another.. lol ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] ComboBox troubles
no flash 8 and I got it to work with .setFocus(); and setting the styles. :) going to go see if it will work online. I finally figured out how to get the ID of the parent MC (thumbHolder) LYK Karl On Nov 20, 2009, at 8:07 AM, Glen Pike wrote: Are you targeting FP6 - if I set my Publish Settings to that, it does not select the first item... Karl DeSaulniers wrote: yes, that I stole from your code. :) that was part of it. my component was not working with mx.control.ComboBox. It is a UI component and not a compiled clip. When I copied your comboBox to my fla and used the createClassObject(mx.control.ComboBox it worked except the first item does not show and my dropdown box is very small... if its not one thing its another.. lol ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Karl DeSaulniers Design Drumm http://designdrumm.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] ComboBox troubles
Well finally got it. Thank you for your help Glen, you put me in the right direction. Here's what got it to work finally... var selectNum:Number; var num:Number; var pict:String; var changeObj:Object = new Object(); changeObj.change = function(evt_obj:Object) { trace(parent ID = + evt_obj.target._parent.ID); trace(selectedIndex = + evt_obj.target.selectedIndex); num = evt_obj.target._parent.ID; selectNum = evt_obj.target.selectedIndex; if (selectNum 1) { pict = picturesArry[num][evt_obj.target.selectedIndex - 1]; evt_obj.target._parent[picture_box].loadMovie(pict,0); evt_obj.target._parent.LoadVars(pict); trace(New picture url is: + pict + newline + Picture Array: + picturesArry[num]); } else if (selectNum = 1) { pict = picturesArry[num][0]; evt_obj.target._parent[picture_box].loadMovie(pict,0); evt_obj.target._parent.LoadVars(pict); trace(New picture url is: + pict + newline + Picture Array: + picturesArry[num]); } else { _root.itemSelection_mc.satusTXT.htmlText = CobmoBox did not change; } }; colorBox.addEventListener(change, changeObj); **Whew** Best, Karl DeSaulniers Design Drumm http://designdrumm.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] ComboBox troubles
Actually this is better. It checks to see if there are multiple pictures before trying to load one even if the combobox has more than one selection. Thanks Barry, thanks Glen. I'm done. Good night... var selectNum:Number; var num:Number; var pict:String; var changeObj:Object = new Object(); changeObj.change = function(evt_obj:Object) { trace(parent ID = + evt_obj.target._parent.ID); trace(selectedIndex = + evt_obj.target.selectedIndex); num = evt_obj.target._parent.ID; selectNum = evt_obj.target.selectedIndex; var checkPics:Number = picturesArry[num].length; if (checkPics 1) { if (selectNum 1) { pict = picturesArry[num][evt_obj.target.selectedIndex - 1]; evt_obj.target._parent[picture_box].loadMovie(pict,0); evt_obj.target._parent.LoadVars(pict); trace(New picture url is: + pict + newline + Picture Array: + picturesArry[num]); } else if (selectNum = 1) { pict = picturesArry[num][0]; evt_obj.target._parent[picture_box].loadMovie(pict,0); evt_obj.target._parent.LoadVars(pict); trace(New picture url is: + pict + newline + Picture Array: + picturesArry[num]); } else { _root.itemSelection_mc.satusTXT.htmlText = CobmoBox did not change; } } }; colorBox.addEventListener(change, changeObj); **Whew** Best, Karl DeSaulniers Design Drumm http://designdrumm.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Karl DeSaulniers Design Drumm http://designdrumm.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] ComboBox troubles
Nice one - hometime for me too :) Karl DeSaulniers wrote: ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] ComboBox troubles
LOL its 11:45 am here. been up all night.. :P Karl On Nov 20, 2009, at 11:37 AM, Glen Pike wrote: Nice one - hometime for me too :) Karl DeSaulniers wrote: ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Karl DeSaulniers Design Drumm http://designdrumm.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] ComboBox troubles
I think the problem is that it is nested inside a function loadItem (). But not entirely sure. I am aware that this is not the best practice, so I tried moving it out of the function, but to no avail. I have created the code by the book but it still does not work. What am I doing wrong here??? Karl On Nov 18, 2009, at 10:40 PM, Karl DeSaulniers wrote: Nope. Those didn't work either. Its just not registering the change ?? Karl On Nov 18, 2009, at 9:32 PM, Barry Hannah wrote: Hey Karl. The issue you are facing is that the function on the comboListen object (comboListen.change) steals your scope - so you don't have any access to all the things you need: picturesArry, thumbHolder etc. So, you can either, forget creating an object to handle events and just put your change function right there: function change(evt_obj:Object) { var selectNum:Number = colorBox.selectedIndex; if (selectNum = 1) { var pic = picturesArry[thumbHolder.ID][0]; thumbHolder[picture_box].loadMovie(pic, 0); thumbHolder.LoadVars(pic); } else { var pic = picturesArry[thumbHolder.ID][selectNum]; thumbHolder[picture_box].loadMovie(pic, 0); thumbHolder.LoadVars(pic); } } colorBox.addEventListener(change, this); Or, use the Delegate class to set the correct scope: import mx.utils.Delegate; var comboListen = new Object(); comboListen.change = Delegate.create(this, onChange); function onChange() { var selectNum:Number = colorBox.selectedIndex; if (selectNum = 1) { var pic = picturesArry[thumbHolder.ID][0]; thumbHolder[picture_box].loadMovie(pic,0); thumbHolder.LoadVars(pic); } else { var pic = picturesArry[thumbHolder.ID][selectNum]; thumbHolder[picture_box].loadMovie(pic,0); thumbHolder.LoadVars(pic); } } colorBox.addEventListener(change, comboListen); Barry. -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Karl DeSaulniers Sent: Thursday, 19 November 2009 2:28 p.m. To: Flash Coders List Subject: Re: [Flashcoders] ComboBox troubles Oh and this is an AS2 project too. Karl Sent from losPhone On Nov 18, 2009, at 7:22 PM, Karl DeSaulniers k...@designdrumm.com wrote: Hello List, Have a little snag on my hands. I am trying to get the value of a selected comboBox to change the picture of another MC. My code: var comboListen = new Object(); comboListen.change = function(evt_obj:Object) { trace(evt_obj.selectedIndex); var selectNum:Number = evt_obj.selectedIndex; if (selectNum = 1) { var pic = picturesArry[thumbHolder.ID][0]; thumbHolder[picture_box].loadMovie(pic,0); thumbHolder.LoadVars(pic); } else { var pic = picturesArry[thumbHolder.ID][selectNum]; thumbHolder[picture_box].loadMovie(pic,0); thumbHolder.LoadVars(pic); } }; colorBox.addEventListener(change,comboListen); thumbHolder = main MC that holds the picture and the comboBox [picture_box] = the picture MC inside thumbHolder that I want to load into. colorBox = the comboBox inside thumbHolder that I want to change the picture MCs contents with. FYI, by the time I get to using the listener, [picture_box] has already been loaded with the first image in the array of pictures. thumbHolder, colorBox and [picture_box] are dynamically loaded onto the stage at run time. How do I get colorBox's selection to change the picture in thumbHolder[picture_box]? Any help would be greatly appreciated at this point. this is my third day with this and I'm going crazy. Is there something I need to import to control the comboBox? I have import mx.control.ComboBox; already imported, do I need it? Karl DeSaulniers Design Drumm http://designdrumm.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Karl DeSaulniers Design Drumm http://designdrumm.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Karl DeSaulniers Design Drumm http://designdrumm.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo
Re: [Flashcoders] ComboBox troubles
Hi, Are you doing something like the following - you need to use the Delegate.create function to attach scope to your event handlers. I can't remember if you can pass in the event object or not - try it? HTH Glen import mx.utils.Delegate; class MyMovieClip extends MovieClip { private var colorBox:ComboBox; //... function stuffHasLoaded():Void { colorBox.addEventListener(change, Delegate.create(this, change)); } function change():Void { trace(Hello from + this + .change); var selected:Number = colorBox.selectedIndex; //... } } ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] ComboBox troubles
Oh and this is an AS2 project too. Karl Sent from losPhone On Nov 18, 2009, at 7:22 PM, Karl DeSaulniers k...@designdrumm.com wrote: Hello List, Have a little snag on my hands. I am trying to get the value of a selected comboBox to change the picture of another MC. My code: var comboListen = new Object(); comboListen.change = function(evt_obj:Object) { trace(evt_obj.selectedIndex); var selectNum:Number = evt_obj.selectedIndex; if (selectNum = 1) { var pic = picturesArry[thumbHolder.ID][0]; thumbHolder[picture_box].loadMovie(pic,0); thumbHolder.LoadVars(pic); } else { var pic = picturesArry[thumbHolder.ID][selectNum]; thumbHolder[picture_box].loadMovie(pic,0); thumbHolder.LoadVars(pic); } }; colorBox.addEventListener(change,comboListen); thumbHolder = main MC that holds the picture and the comboBox [picture_box] = the picture MC inside thumbHolder that I want to load into. colorBox = the comboBox inside thumbHolder that I want to change the picture MCs contents with. FYI, by the time I get to using the listener, [picture_box] has already been loaded with the first image in the array of pictures. thumbHolder, colorBox and [picture_box] are dynamically loaded onto the stage at run time. How do I get colorBox's selection to change the picture in thumbHolder[picture_box]? Any help would be greatly appreciated at this point. this is my third day with this and I'm going crazy. Is there something I need to import to control the comboBox? I have import mx.control.ComboBox; already imported, do I need it? Karl DeSaulniers Design Drumm http://designdrumm.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] ComboBox troubles
Hey Karl. The issue you are facing is that the function on the comboListen object (comboListen.change) steals your scope - so you don't have any access to all the things you need: picturesArry, thumbHolder etc. So, you can either, forget creating an object to handle events and just put your change function right there: function change(evt_obj:Object) { var selectNum:Number = colorBox.selectedIndex; if (selectNum = 1) { var pic = picturesArry[thumbHolder.ID][0]; thumbHolder[picture_box].loadMovie(pic, 0); thumbHolder.LoadVars(pic); } else { var pic = picturesArry[thumbHolder.ID][selectNum]; thumbHolder[picture_box].loadMovie(pic, 0); thumbHolder.LoadVars(pic); } } colorBox.addEventListener(change, this); Or, use the Delegate class to set the correct scope: import mx.utils.Delegate; var comboListen = new Object(); comboListen.change = Delegate.create(this, onChange); function onChange() { var selectNum:Number = colorBox.selectedIndex; if (selectNum = 1) { var pic = picturesArry[thumbHolder.ID][0]; thumbHolder[picture_box].loadMovie(pic,0); thumbHolder.LoadVars(pic); } else { var pic = picturesArry[thumbHolder.ID][selectNum]; thumbHolder[picture_box].loadMovie(pic,0); thumbHolder.LoadVars(pic); } } colorBox.addEventListener(change, comboListen); Barry. -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Karl DeSaulniers Sent: Thursday, 19 November 2009 2:28 p.m. To: Flash Coders List Subject: Re: [Flashcoders] ComboBox troubles Oh and this is an AS2 project too. Karl Sent from losPhone On Nov 18, 2009, at 7:22 PM, Karl DeSaulniers k...@designdrumm.com wrote: Hello List, Have a little snag on my hands. I am trying to get the value of a selected comboBox to change the picture of another MC. My code: var comboListen = new Object(); comboListen.change = function(evt_obj:Object) { trace(evt_obj.selectedIndex); var selectNum:Number = evt_obj.selectedIndex; if (selectNum = 1) { var pic = picturesArry[thumbHolder.ID][0]; thumbHolder[picture_box].loadMovie(pic,0); thumbHolder.LoadVars(pic); } else { var pic = picturesArry[thumbHolder.ID][selectNum]; thumbHolder[picture_box].loadMovie(pic,0); thumbHolder.LoadVars(pic); } }; colorBox.addEventListener(change,comboListen); thumbHolder = main MC that holds the picture and the comboBox [picture_box] = the picture MC inside thumbHolder that I want to load into. colorBox = the comboBox inside thumbHolder that I want to change the picture MCs contents with. FYI, by the time I get to using the listener, [picture_box] has already been loaded with the first image in the array of pictures. thumbHolder, colorBox and [picture_box] are dynamically loaded onto the stage at run time. How do I get colorBox's selection to change the picture in thumbHolder[picture_box]? Any help would be greatly appreciated at this point. this is my third day with this and I'm going crazy. Is there something I need to import to control the comboBox? I have import mx.control.ComboBox; already imported, do I need it? Karl DeSaulniers Design Drumm http://designdrumm.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] ComboBox troubles
Thanks for that Barry. I will test and see. Thats funny, it seems I was so close at one point. I had function comboListen(evt_obj:Object) { var selectNum:Number = colorBox.selectedIndex; if (selectNum = 1) { var pic = picturesArry[thumbHolder.ID][0]; thumbHolder[picture_box].loadMovie(pic, 0); thumbHolder.LoadVars(pic); } else { var pic = picturesArry[thumbHolder.ID][selectNum]; thumbHolder[picture_box].loadMovie(pic, 0); thumbHolder.LoadVars(pic); } } colorBox.addEventListener(comboListen); Guess I forgot the this also.. Will let you know if one of these work. Thanks again, Karl On Nov 18, 2009, at 9:32 PM, Barry Hannah wrote: Hey Karl. The issue you are facing is that the function on the comboListen object (comboListen.change) steals your scope - so you don't have any access to all the things you need: picturesArry, thumbHolder etc. So, you can either, forget creating an object to handle events and just put your change function right there: function change(evt_obj:Object) { var selectNum:Number = colorBox.selectedIndex; if (selectNum = 1) { var pic = picturesArry[thumbHolder.ID][0]; thumbHolder[picture_box].loadMovie(pic, 0); thumbHolder.LoadVars(pic); } else { var pic = picturesArry[thumbHolder.ID][selectNum]; thumbHolder[picture_box].loadMovie(pic, 0); thumbHolder.LoadVars(pic); } } colorBox.addEventListener(change, this); Or, use the Delegate class to set the correct scope: import mx.utils.Delegate; var comboListen = new Object(); comboListen.change = Delegate.create(this, onChange); function onChange() { var selectNum:Number = colorBox.selectedIndex; if (selectNum = 1) { var pic = picturesArry[thumbHolder.ID][0]; thumbHolder[picture_box].loadMovie(pic,0); thumbHolder.LoadVars(pic); } else { var pic = picturesArry[thumbHolder.ID][selectNum]; thumbHolder[picture_box].loadMovie(pic,0); thumbHolder.LoadVars(pic); } } colorBox.addEventListener(change, comboListen); Barry. -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Karl DeSaulniers Sent: Thursday, 19 November 2009 2:28 p.m. To: Flash Coders List Subject: Re: [Flashcoders] ComboBox troubles Oh and this is an AS2 project too. Karl Sent from losPhone On Nov 18, 2009, at 7:22 PM, Karl DeSaulniers k...@designdrumm.com wrote: Hello List, Have a little snag on my hands. I am trying to get the value of a selected comboBox to change the picture of another MC. My code: var comboListen = new Object(); comboListen.change = function(evt_obj:Object) { trace(evt_obj.selectedIndex); var selectNum:Number = evt_obj.selectedIndex; if (selectNum = 1) { var pic = picturesArry[thumbHolder.ID][0]; thumbHolder[picture_box].loadMovie(pic,0); thumbHolder.LoadVars(pic); } else { var pic = picturesArry[thumbHolder.ID][selectNum]; thumbHolder[picture_box].loadMovie(pic,0); thumbHolder.LoadVars(pic); } }; colorBox.addEventListener(change,comboListen); thumbHolder = main MC that holds the picture and the comboBox [picture_box] = the picture MC inside thumbHolder that I want to load into. colorBox = the comboBox inside thumbHolder that I want to change the picture MCs contents with. FYI, by the time I get to using the listener, [picture_box] has already been loaded with the first image in the array of pictures. thumbHolder, colorBox and [picture_box] are dynamically loaded onto the stage at run time. How do I get colorBox's selection to change the picture in thumbHolder[picture_box]? Any help would be greatly appreciated at this point. this is my third day with this and I'm going crazy. Is there something I need to import to control the comboBox? I have import mx.control.ComboBox; already imported, do I need it? Karl DeSaulniers Design Drumm http://designdrumm.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Karl DeSaulniers Design Drumm http://designdrumm.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com
Re: [Flashcoders] ComboBox troubles
Nope. Those didn't work either. Its just not registering the change ?? Karl On Nov 18, 2009, at 9:32 PM, Barry Hannah wrote: Hey Karl. The issue you are facing is that the function on the comboListen object (comboListen.change) steals your scope - so you don't have any access to all the things you need: picturesArry, thumbHolder etc. So, you can either, forget creating an object to handle events and just put your change function right there: function change(evt_obj:Object) { var selectNum:Number = colorBox.selectedIndex; if (selectNum = 1) { var pic = picturesArry[thumbHolder.ID][0]; thumbHolder[picture_box].loadMovie(pic, 0); thumbHolder.LoadVars(pic); } else { var pic = picturesArry[thumbHolder.ID][selectNum]; thumbHolder[picture_box].loadMovie(pic, 0); thumbHolder.LoadVars(pic); } } colorBox.addEventListener(change, this); Or, use the Delegate class to set the correct scope: import mx.utils.Delegate; var comboListen = new Object(); comboListen.change = Delegate.create(this, onChange); function onChange() { var selectNum:Number = colorBox.selectedIndex; if (selectNum = 1) { var pic = picturesArry[thumbHolder.ID][0]; thumbHolder[picture_box].loadMovie(pic,0); thumbHolder.LoadVars(pic); } else { var pic = picturesArry[thumbHolder.ID][selectNum]; thumbHolder[picture_box].loadMovie(pic,0); thumbHolder.LoadVars(pic); } } colorBox.addEventListener(change, comboListen); Barry. -Original Message- From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Karl DeSaulniers Sent: Thursday, 19 November 2009 2:28 p.m. To: Flash Coders List Subject: Re: [Flashcoders] ComboBox troubles Oh and this is an AS2 project too. Karl Sent from losPhone On Nov 18, 2009, at 7:22 PM, Karl DeSaulniers k...@designdrumm.com wrote: Hello List, Have a little snag on my hands. I am trying to get the value of a selected comboBox to change the picture of another MC. My code: var comboListen = new Object(); comboListen.change = function(evt_obj:Object) { trace(evt_obj.selectedIndex); var selectNum:Number = evt_obj.selectedIndex; if (selectNum = 1) { var pic = picturesArry[thumbHolder.ID][0]; thumbHolder[picture_box].loadMovie(pic,0); thumbHolder.LoadVars(pic); } else { var pic = picturesArry[thumbHolder.ID][selectNum]; thumbHolder[picture_box].loadMovie(pic,0); thumbHolder.LoadVars(pic); } }; colorBox.addEventListener(change,comboListen); thumbHolder = main MC that holds the picture and the comboBox [picture_box] = the picture MC inside thumbHolder that I want to load into. colorBox = the comboBox inside thumbHolder that I want to change the picture MCs contents with. FYI, by the time I get to using the listener, [picture_box] has already been loaded with the first image in the array of pictures. thumbHolder, colorBox and [picture_box] are dynamically loaded onto the stage at run time. How do I get colorBox's selection to change the picture in thumbHolder[picture_box]? Any help would be greatly appreciated at this point. this is my third day with this and I'm going crazy. Is there something I need to import to control the comboBox? I have import mx.control.ComboBox; already imported, do I need it? Karl DeSaulniers Design Drumm http://designdrumm.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Karl DeSaulniers Design Drumm http://designdrumm.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] ComboBox + Custom Cursor , AS3
Hi Keith, I am a fine, thank you. I am also just trying to help, and hopefully together we find the answer. About addChildAt: My bad... I made a mistake and did not get the error. I think that's a BUG. Hahaha. I rebuild a little test and you are right, it throws the error. But generally spoken, I think a thrown error is not a bug because it tells you, you are trying to do something impossible with your program. So thrown errors are your friend! Kind regards Cor -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Keith Reinfeld Sent: vrijdag 14 november 2008 20:50 To: 'Flash Coders List' Subject: RE: [Flashcoders] ComboBox + Custom Cursor , AS3 Cor, addChildAt() -- Tested: Any index 0 thru numChildren (inclusive) = No RangeError. Any index greater than numChildren = RangeError. That's why I thought 'bug'. Just an observation. Just trying to help. So, Cor, howyabin? Regards, -Keith http://keithreinfeld.home.comcast.net -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of Cor Sent: Friday, November 14, 2008 1:18 PM To: 'Flash Coders List' Subject: RE: [Flashcoders] ComboBox + Custom Cursor , AS3 I guess because you set the customCursor in the array position. And array positions can be set to any index, and for that matter it can't be out of range. stage.addChildAt(customCursor, 100); will try to put the child at index hundred. Eventually the displayList notices a empty index and will shuffle everything in place so there is never an empty indexed location. The same as when you remove a child for the displayList. I am not completely sure if this is the correct technical description, but from what I have read about the displayList, it figures. Kind regards Cor -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Keith Reinfeld Sent: vrijdag 14 november 2008 20:11 To: 'Flash Coders List' Subject: RE: [Flashcoders] ComboBox + Custom Cursor , AS3 Hi Cor, Right. I know all that. The question is why doesn't stage.addChildAt(customCursor, stage.numChildren); trigger a RangeError? Regards, -Keith http://keithreinfeld.home.comcast.net -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of Cor Sent: Friday, November 14, 2008 12:38 PM To: 'Flash Coders List' Subject: RE: [Flashcoders] ComboBox + Custom Cursor , AS3 It is not a bug. The displayList stores it objects in a Array, wich starts at 0. So Array[obj1,obj2,obj3,obj4] has 4 children wich are located at position 0, 1, 2, 3. If you remove a child every other moves up 1 place. So stage.numChildren is accordingly out of range. HTH C -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Keith Reinfeld Sent: vrijdag 14 november 2008 18:57 To: 'Flash Coders List' Subject: RE: [Flashcoders] ComboBox + Custom Cursor , AS3 Joel, Another good optimization point, Joel. If we assume that Karim's custom cursor is already a child of the stage, then setChildIndex() should be more efficient. So I guess it depends on the implementation. Interestingly, I get a RangeError with this: stage.setChildIndex(customCursor, stage.numChildren); but this works: stage.setChildIndex(customCursor, stage.numChildren - 1); However, stage.addChildAt(customCursor, stage.numChildren); does not trigger the RangeError, and stage.addChildAt(customCursor, stage.numChildren - 1); still produces the desired result. If this is a bug then 'stage.numChildren - 1' would be the safe way to go. Regards, -Keith http://keithreinfeld.home.comcast.net -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of Joel Stransky Sent: Friday, November 14, 2008 10:25 AM To: Flash Coders List Subject: Re: [Flashcoders] ComboBox + Custom Cursor , AS3 Very nice Keith. Wouldn't setChildIndex() work as well? Or is addChildAt() better for ensuring that the cursor is added to the display list? On Fri, Nov 14, 2008 at 11:08 AM, Keith Reinfeld [EMAIL PROTECTED]wrote: ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders No virus found in this incoming message. Checked by AVG - http://www.avg.com Version: 8.0.175 / Virus Database: 270.9.3/1788 - Release Date: 14-11- 2008 13:36 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http
RE: [Flashcoders] ComboBox + Custom Cursor , AS3
Karim, In light of Joel's comments I'd like to suggest a refinement: import flash.events.* function updateCursor(){ stage.addChildAt(customCursor, stage.numChildren); } comboBox.dropdown.addEventListener(Event.ADDED_TO_STAGE, onDropdown); function onDropdown(event:Event){ updateCursor(); } Give it a try! I think it works quite well. Regards, -Keith http://keithreinfeld.home.comcast.net -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of Karim Beyrouti Sent: Thursday, November 13, 2008 6:24 AM To: 'Flash Coders List' Subject: RE: [Flashcoders] ComboBox + Custom Cursor , AS3 Yeh - this might not work - I already have a similar structure, and as the ComboBox adds the List to the stage. I tried to find a 'lockRoot' type of solution for AS3 - but no joy there. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Joel Stransky Sent: 12 November 2008 23:03 To: Flash Coders List Subject: Re: [Flashcoders] ComboBox + Custom Cursor , AS3 This might be a bit cumbersome but less processor intensive. Instead of using MOUSE_MOVE, create two Sprites on the stage. One as a content pane and other as a custom cursor pane. Then add all content including the combo box to the content pane and the cursor to the cursor pane. I can't say for sure if the combo box will still display on top but may be worth a shot if you're big on freeing up resources. On Wed, Nov 12, 2008 at 5:47 PM, karim beyrouti [EMAIL PROTECTED] wrote: Perfect - thank you ! it seems a little odd that the ComboBox adds the List to the stage and not one of its own children. Maybe memory/resource managment. h. On 12 Nov 2008, at 16:26, Keith Reinfeld wrote: Karim, Try adding the following line of code to your MOUSE_MOVE event listener function: stage.addChildAt(customCursor, stage.numChildren); Of course, you must substitute your custom cursor's instance name for 'customCursor'. HTH Regards, -Keith http://keithreinfeld.home.comcast.net ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- --Joel ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] ComboBox + Custom Cursor , AS3
Very nice Keith. Wouldn't setChildIndex() work as well? Or is addChildAt() better for ensuring that the cursor is added to the display list? On Fri, Nov 14, 2008 at 11:08 AM, Keith Reinfeld [EMAIL PROTECTED]wrote: Karim, In light of Joel's comments I'd like to suggest a refinement: import flash.events.* function updateCursor(){ stage.addChildAt(customCursor, stage.numChildren); } comboBox.dropdown.addEventListener(Event.ADDED_TO_STAGE, onDropdown); function onDropdown(event:Event){ updateCursor(); } Give it a try! I think it works quite well. Regards, -Keith http://keithreinfeld.home.comcast.net -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of Karim Beyrouti Sent: Thursday, November 13, 2008 6:24 AM To: 'Flash Coders List' Subject: RE: [Flashcoders] ComboBox + Custom Cursor , AS3 Yeh - this might not work - I already have a similar structure, and as the ComboBox adds the List to the stage. I tried to find a 'lockRoot' type of solution for AS3 - but no joy there. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Joel Stransky Sent: 12 November 2008 23:03 To: Flash Coders List Subject: Re: [Flashcoders] ComboBox + Custom Cursor , AS3 This might be a bit cumbersome but less processor intensive. Instead of using MOUSE_MOVE, create two Sprites on the stage. One as a content pane and other as a custom cursor pane. Then add all content including the combo box to the content pane and the cursor to the cursor pane. I can't say for sure if the combo box will still display on top but may be worth a shot if you're big on freeing up resources. On Wed, Nov 12, 2008 at 5:47 PM, karim beyrouti [EMAIL PROTECTED] wrote: Perfect - thank you ! it seems a little odd that the ComboBox adds the List to the stage and not one of its own children. Maybe memory/resource managment. h. On 12 Nov 2008, at 16:26, Keith Reinfeld wrote: Karim, Try adding the following line of code to your MOUSE_MOVE event listener function: stage.addChildAt(customCursor, stage.numChildren); Of course, you must substitute your custom cursor's instance name for 'customCursor'. HTH Regards, -Keith http://keithreinfeld.home.comcast.net ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- --Joel ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- --Joel Stransky stranskydesign.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] ComboBox + Custom Cursor , AS3
Joel, Another good optimization point, Joel. If we assume that Karim's custom cursor is already a child of the stage, then setChildIndex() should be more efficient. So I guess it depends on the implementation. Interestingly, I get a RangeError with this: stage.setChildIndex(customCursor, stage.numChildren); but this works: stage.setChildIndex(customCursor, stage.numChildren - 1); However, stage.addChildAt(customCursor, stage.numChildren); does not trigger the RangeError, and stage.addChildAt(customCursor, stage.numChildren - 1); still produces the desired result. If this is a bug then 'stage.numChildren - 1' would be the safe way to go. Regards, -Keith http://keithreinfeld.home.comcast.net -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of Joel Stransky Sent: Friday, November 14, 2008 10:25 AM To: Flash Coders List Subject: Re: [Flashcoders] ComboBox + Custom Cursor , AS3 Very nice Keith. Wouldn't setChildIndex() work as well? Or is addChildAt() better for ensuring that the cursor is added to the display list? On Fri, Nov 14, 2008 at 11:08 AM, Keith Reinfeld [EMAIL PROTECTED]wrote: ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] ComboBox + Custom Cursor , AS3
It is not a bug. The displayList stores it objects in a Array, wich starts at 0. So Array[obj1,obj2,obj3,obj4] has 4 children wich are located at position 0, 1, 2, 3. If you remove a child every other moves up 1 place. So stage.numChildren is accordingly out of range. HTH C -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Keith Reinfeld Sent: vrijdag 14 november 2008 18:57 To: 'Flash Coders List' Subject: RE: [Flashcoders] ComboBox + Custom Cursor , AS3 Joel, Another good optimization point, Joel. If we assume that Karim's custom cursor is already a child of the stage, then setChildIndex() should be more efficient. So I guess it depends on the implementation. Interestingly, I get a RangeError with this: stage.setChildIndex(customCursor, stage.numChildren); but this works: stage.setChildIndex(customCursor, stage.numChildren - 1); However, stage.addChildAt(customCursor, stage.numChildren); does not trigger the RangeError, and stage.addChildAt(customCursor, stage.numChildren - 1); still produces the desired result. If this is a bug then 'stage.numChildren - 1' would be the safe way to go. Regards, -Keith http://keithreinfeld.home.comcast.net -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of Joel Stransky Sent: Friday, November 14, 2008 10:25 AM To: Flash Coders List Subject: Re: [Flashcoders] ComboBox + Custom Cursor , AS3 Very nice Keith. Wouldn't setChildIndex() work as well? Or is addChildAt() better for ensuring that the cursor is added to the display list? On Fri, Nov 14, 2008 at 11:08 AM, Keith Reinfeld [EMAIL PROTECTED]wrote: ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders No virus found in this incoming message. Checked by AVG - http://www.avg.com Version: 8.0.175 / Virus Database: 270.9.3/1788 - Release Date: 14-11-2008 13:36 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] ComboBox + Custom Cursor , AS3
Hi Cor, Right. I know all that. The question is why doesn't stage.addChildAt(customCursor, stage.numChildren); trigger a RangeError? Regards, -Keith http://keithreinfeld.home.comcast.net -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of Cor Sent: Friday, November 14, 2008 12:38 PM To: 'Flash Coders List' Subject: RE: [Flashcoders] ComboBox + Custom Cursor , AS3 It is not a bug. The displayList stores it objects in a Array, wich starts at 0. So Array[obj1,obj2,obj3,obj4] has 4 children wich are located at position 0, 1, 2, 3. If you remove a child every other moves up 1 place. So stage.numChildren is accordingly out of range. HTH C -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Keith Reinfeld Sent: vrijdag 14 november 2008 18:57 To: 'Flash Coders List' Subject: RE: [Flashcoders] ComboBox + Custom Cursor , AS3 Joel, Another good optimization point, Joel. If we assume that Karim's custom cursor is already a child of the stage, then setChildIndex() should be more efficient. So I guess it depends on the implementation. Interestingly, I get a RangeError with this: stage.setChildIndex(customCursor, stage.numChildren); but this works: stage.setChildIndex(customCursor, stage.numChildren - 1); However, stage.addChildAt(customCursor, stage.numChildren); does not trigger the RangeError, and stage.addChildAt(customCursor, stage.numChildren - 1); still produces the desired result. If this is a bug then 'stage.numChildren - 1' would be the safe way to go. Regards, -Keith http://keithreinfeld.home.comcast.net -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of Joel Stransky Sent: Friday, November 14, 2008 10:25 AM To: Flash Coders List Subject: Re: [Flashcoders] ComboBox + Custom Cursor , AS3 Very nice Keith. Wouldn't setChildIndex() work as well? Or is addChildAt() better for ensuring that the cursor is added to the display list? On Fri, Nov 14, 2008 at 11:08 AM, Keith Reinfeld [EMAIL PROTECTED]wrote: ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders No virus found in this incoming message. Checked by AVG - http://www.avg.com Version: 8.0.175 / Virus Database: 270.9.3/1788 - Release Date: 14-11-2008 13:36 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] ComboBox + Custom Cursor , AS3
I guess because you set the customCursor in the array position. And array positions can be set to any index, and for that matter it can't be out of range. stage.addChildAt(customCursor, 100); will try to put the child at index hundred. Eventually the displayList notices a empty index and will shuffle everything in place so there is never an empty indexed location. The same as when you remove a child for the displayList. I am not completely sure if this is the correct technical description, but from what I have read about the displayList, it figures. Kind regards Cor -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Keith Reinfeld Sent: vrijdag 14 november 2008 20:11 To: 'Flash Coders List' Subject: RE: [Flashcoders] ComboBox + Custom Cursor , AS3 Hi Cor, Right. I know all that. The question is why doesn't stage.addChildAt(customCursor, stage.numChildren); trigger a RangeError? Regards, -Keith http://keithreinfeld.home.comcast.net -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of Cor Sent: Friday, November 14, 2008 12:38 PM To: 'Flash Coders List' Subject: RE: [Flashcoders] ComboBox + Custom Cursor , AS3 It is not a bug. The displayList stores it objects in a Array, wich starts at 0. So Array[obj1,obj2,obj3,obj4] has 4 children wich are located at position 0, 1, 2, 3. If you remove a child every other moves up 1 place. So stage.numChildren is accordingly out of range. HTH C -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Keith Reinfeld Sent: vrijdag 14 november 2008 18:57 To: 'Flash Coders List' Subject: RE: [Flashcoders] ComboBox + Custom Cursor , AS3 Joel, Another good optimization point, Joel. If we assume that Karim's custom cursor is already a child of the stage, then setChildIndex() should be more efficient. So I guess it depends on the implementation. Interestingly, I get a RangeError with this: stage.setChildIndex(customCursor, stage.numChildren); but this works: stage.setChildIndex(customCursor, stage.numChildren - 1); However, stage.addChildAt(customCursor, stage.numChildren); does not trigger the RangeError, and stage.addChildAt(customCursor, stage.numChildren - 1); still produces the desired result. If this is a bug then 'stage.numChildren - 1' would be the safe way to go. Regards, -Keith http://keithreinfeld.home.comcast.net -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of Joel Stransky Sent: Friday, November 14, 2008 10:25 AM To: Flash Coders List Subject: Re: [Flashcoders] ComboBox + Custom Cursor , AS3 Very nice Keith. Wouldn't setChildIndex() work as well? Or is addChildAt() better for ensuring that the cursor is added to the display list? On Fri, Nov 14, 2008 at 11:08 AM, Keith Reinfeld [EMAIL PROTECTED]wrote: ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders No virus found in this incoming message. Checked by AVG - http://www.avg.com Version: 8.0.175 / Virus Database: 270.9.3/1788 - Release Date: 14-11-2008 13:36 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders No virus found in this incoming message. Checked by AVG - http://www.avg.com Version: 8.0.175 / Virus Database: 270.9.3/1788 - Release Date: 14-11-2008 13:36 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] ComboBox + Custom Cursor , AS3
Cor, addChildAt() -- Tested: Any index 0 thru numChildren (inclusive) = No RangeError. Any index greater than numChildren = RangeError. That's why I thought 'bug'. Just an observation. Just trying to help. So, Cor, howyabin? Regards, -Keith http://keithreinfeld.home.comcast.net -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of Cor Sent: Friday, November 14, 2008 1:18 PM To: 'Flash Coders List' Subject: RE: [Flashcoders] ComboBox + Custom Cursor , AS3 I guess because you set the customCursor in the array position. And array positions can be set to any index, and for that matter it can't be out of range. stage.addChildAt(customCursor, 100); will try to put the child at index hundred. Eventually the displayList notices a empty index and will shuffle everything in place so there is never an empty indexed location. The same as when you remove a child for the displayList. I am not completely sure if this is the correct technical description, but from what I have read about the displayList, it figures. Kind regards Cor -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Keith Reinfeld Sent: vrijdag 14 november 2008 20:11 To: 'Flash Coders List' Subject: RE: [Flashcoders] ComboBox + Custom Cursor , AS3 Hi Cor, Right. I know all that. The question is why doesn't stage.addChildAt(customCursor, stage.numChildren); trigger a RangeError? Regards, -Keith http://keithreinfeld.home.comcast.net -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of Cor Sent: Friday, November 14, 2008 12:38 PM To: 'Flash Coders List' Subject: RE: [Flashcoders] ComboBox + Custom Cursor , AS3 It is not a bug. The displayList stores it objects in a Array, wich starts at 0. So Array[obj1,obj2,obj3,obj4] has 4 children wich are located at position 0, 1, 2, 3. If you remove a child every other moves up 1 place. So stage.numChildren is accordingly out of range. HTH C -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Keith Reinfeld Sent: vrijdag 14 november 2008 18:57 To: 'Flash Coders List' Subject: RE: [Flashcoders] ComboBox + Custom Cursor , AS3 Joel, Another good optimization point, Joel. If we assume that Karim's custom cursor is already a child of the stage, then setChildIndex() should be more efficient. So I guess it depends on the implementation. Interestingly, I get a RangeError with this: stage.setChildIndex(customCursor, stage.numChildren); but this works: stage.setChildIndex(customCursor, stage.numChildren - 1); However, stage.addChildAt(customCursor, stage.numChildren); does not trigger the RangeError, and stage.addChildAt(customCursor, stage.numChildren - 1); still produces the desired result. If this is a bug then 'stage.numChildren - 1' would be the safe way to go. Regards, -Keith http://keithreinfeld.home.comcast.net -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of Joel Stransky Sent: Friday, November 14, 2008 10:25 AM To: Flash Coders List Subject: Re: [Flashcoders] ComboBox + Custom Cursor , AS3 Very nice Keith. Wouldn't setChildIndex() work as well? Or is addChildAt() better for ensuring that the cursor is added to the display list? On Fri, Nov 14, 2008 at 11:08 AM, Keith Reinfeld [EMAIL PROTECTED]wrote: ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders No virus found in this incoming message. Checked by AVG - http://www.avg.com Version: 8.0.175 / Virus Database: 270.9.3/1788 - Release Date: 14-11- 2008 13:36 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders No virus found in this incoming message. Checked by AVG - http://www.avg.com Version: 8.0.175 / Virus Database: 270.9.3/1788 - Release Date: 14-11-2008 13:36 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] ComboBox + Custom Cursor , AS3
It could be seen as a bug. addChildAt tells flash to ADD to the current number of children. setChildIndex works within the existing children. On Fri, Nov 14, 2008 at 2:49 PM, Keith Reinfeld [EMAIL PROTECTED]wrote: Cor, addChildAt() -- Tested: Any index 0 thru numChildren (inclusive) = No RangeError. Any index greater than numChildren = RangeError. That's why I thought 'bug'. Just an observation. Just trying to help. So, Cor, howyabin? Regards, -Keith http://keithreinfeld.home.comcast.net -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of Cor Sent: Friday, November 14, 2008 1:18 PM To: 'Flash Coders List' Subject: RE: [Flashcoders] ComboBox + Custom Cursor , AS3 I guess because you set the customCursor in the array position. And array positions can be set to any index, and for that matter it can't be out of range. stage.addChildAt(customCursor, 100); will try to put the child at index hundred. Eventually the displayList notices a empty index and will shuffle everything in place so there is never an empty indexed location. The same as when you remove a child for the displayList. I am not completely sure if this is the correct technical description, but from what I have read about the displayList, it figures. Kind regards Cor -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Keith Reinfeld Sent: vrijdag 14 november 2008 20:11 To: 'Flash Coders List' Subject: RE: [Flashcoders] ComboBox + Custom Cursor , AS3 Hi Cor, Right. I know all that. The question is why doesn't stage.addChildAt(customCursor, stage.numChildren); trigger a RangeError? Regards, -Keith http://keithreinfeld.home.comcast.net -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of Cor Sent: Friday, November 14, 2008 12:38 PM To: 'Flash Coders List' Subject: RE: [Flashcoders] ComboBox + Custom Cursor , AS3 It is not a bug. The displayList stores it objects in a Array, wich starts at 0. So Array[obj1,obj2,obj3,obj4] has 4 children wich are located at position 0, 1, 2, 3. If you remove a child every other moves up 1 place. So stage.numChildren is accordingly out of range. HTH C -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Keith Reinfeld Sent: vrijdag 14 november 2008 18:57 To: 'Flash Coders List' Subject: RE: [Flashcoders] ComboBox + Custom Cursor , AS3 Joel, Another good optimization point, Joel. If we assume that Karim's custom cursor is already a child of the stage, then setChildIndex() should be more efficient. So I guess it depends on the implementation. Interestingly, I get a RangeError with this: stage.setChildIndex(customCursor, stage.numChildren); but this works: stage.setChildIndex(customCursor, stage.numChildren - 1); However, stage.addChildAt(customCursor, stage.numChildren); does not trigger the RangeError, and stage.addChildAt(customCursor, stage.numChildren - 1); still produces the desired result. If this is a bug then 'stage.numChildren - 1' would be the safe way to go. Regards, -Keith http://keithreinfeld.home.comcast.net -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of Joel Stransky Sent: Friday, November 14, 2008 10:25 AM To: Flash Coders List Subject: Re: [Flashcoders] ComboBox + Custom Cursor , AS3 Very nice Keith. Wouldn't setChildIndex() work as well? Or is addChildAt() better for ensuring that the cursor is added to the display list? On Fri, Nov 14, 2008 at 11:08 AM, Keith Reinfeld [EMAIL PROTECTED]wrote: ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders No virus found in this incoming message. Checked by AVG - http://www.avg.com Version: 8.0.175 / Virus Database: 270.9.3/1788 - Release Date: 14-11- 2008 13:36 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders No virus found in this incoming message. Checked by AVG - http://www.avg.com Version: 8.0.175 / Virus Database: 270.9.3/1788 - Release Date: 14-11-2008 13:36 ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http
RE: [Flashcoders] ComboBox + Custom Cursor , AS3
Joel, Ah, yes, of course. Well that clears it up for me. Thanks. Regards, -Keith http://keithreinfeld.home.comcast.net -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of Joel Stransky Sent: Friday, November 14, 2008 3:33 PM To: Flash Coders List Subject: Re: [Flashcoders] ComboBox + Custom Cursor , AS3 It could be seen as a bug. addChildAt tells flash to ADD to the current number of children. setChildIndex works within the existing children. On Fri, Nov 14, 2008 at 2:49 PM, Keith Reinfeld [EMAIL PROTECTED]wrote: Cor, addChildAt() -- Tested: Any index 0 thru numChildren (inclusive) = No RangeError. Any index greater than numChildren = RangeError. That's why I thought 'bug'. Just an observation. Just trying to help. So, Cor, howyabin? Regards, -Keith http://keithreinfeld.home.comcast.net -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of Cor Sent: Friday, November 14, 2008 1:18 PM To: 'Flash Coders List' Subject: RE: [Flashcoders] ComboBox + Custom Cursor , AS3 I guess because you set the customCursor in the array position. And array positions can be set to any index, and for that matter it can't be out of range. stage.addChildAt(customCursor, 100); will try to put the child at index hundred. Eventually the displayList notices a empty index and will shuffle everything in place so there is never an empty indexed location. The same as when you remove a child for the displayList. I am not completely sure if this is the correct technical description, but from what I have read about the displayList, it figures. Kind regards Cor -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Keith Reinfeld Sent: vrijdag 14 november 2008 20:11 To: 'Flash Coders List' Subject: RE: [Flashcoders] ComboBox + Custom Cursor , AS3 Hi Cor, Right. I know all that. The question is why doesn't stage.addChildAt(customCursor, stage.numChildren); trigger a RangeError? Regards, -Keith http://keithreinfeld.home.comcast.net -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of Cor Sent: Friday, November 14, 2008 12:38 PM To: 'Flash Coders List' Subject: RE: [Flashcoders] ComboBox + Custom Cursor , AS3 It is not a bug. The displayList stores it objects in a Array, wich starts at 0. So Array[obj1,obj2,obj3,obj4] has 4 children wich are located at position 0, 1, 2, 3. If you remove a child every other moves up 1 place. So stage.numChildren is accordingly out of range. HTH C -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Keith Reinfeld Sent: vrijdag 14 november 2008 18:57 To: 'Flash Coders List' Subject: RE: [Flashcoders] ComboBox + Custom Cursor , AS3 Joel, Another good optimization point, Joel. If we assume that Karim's custom cursor is already a child of the stage, then setChildIndex() should be more efficient. So I guess it depends on the implementation. Interestingly, I get a RangeError with this: stage.setChildIndex(customCursor, stage.numChildren); but this works: stage.setChildIndex(customCursor, stage.numChildren - 1); However, stage.addChildAt(customCursor, stage.numChildren); does not trigger the RangeError, and stage.addChildAt(customCursor, stage.numChildren - 1); still produces the desired result. If this is a bug then 'stage.numChildren - 1' would be the safe way to go. Regards, -Keith http://keithreinfeld.home.comcast.net -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of Joel Stransky Sent: Friday, November 14, 2008 10:25 AM To: Flash Coders List Subject: Re: [Flashcoders] ComboBox + Custom Cursor , AS3 Very nice Keith. Wouldn't setChildIndex() work as well? Or is addChildAt() better for ensuring that the cursor is added to the display list? On Fri, Nov 14, 2008 at 11:08 AM, Keith Reinfeld [EMAIL PROTECTED]wrote: ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders No virus found in this incoming message. Checked by AVG - http://www.avg.com Version: 8.0.175 / Virus Database: 270.9.3/1788 - Release Date: 14- 11- 2008 13:36 ___ Flashcoders mailing list Flashcoders
RE: [Flashcoders] ComboBox + Custom Cursor , AS3
Yeh - this might not work - I already have a similar structure, and as the ComboBox adds the List to the stage. I tried to find a 'lockRoot' type of solution for AS3 - but no joy there. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Joel Stransky Sent: 12 November 2008 23:03 To: Flash Coders List Subject: Re: [Flashcoders] ComboBox + Custom Cursor , AS3 This might be a bit cumbersome but less processor intensive. Instead of using MOUSE_MOVE, create two Sprites on the stage. One as a content pane and other as a custom cursor pane. Then add all content including the combo box to the content pane and the cursor to the cursor pane. I can't say for sure if the combo box will still display on top but may be worth a shot if you're big on freeing up resources. On Wed, Nov 12, 2008 at 5:47 PM, karim beyrouti [EMAIL PROTECTED] wrote: Perfect - thank you ! it seems a little odd that the ComboBox adds the List to the stage and not one of its own children. Maybe memory/resource managment. h. On 12 Nov 2008, at 16:26, Keith Reinfeld wrote: Karim, Try adding the following line of code to your MOUSE_MOVE event listener function: stage.addChildAt(customCursor, stage.numChildren); Of course, you must substitute your custom cursor's instance name for 'customCursor'. HTH Regards, -Keith http://keithreinfeld.home.comcast.net ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- --Joel ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] ComboBox + Custom Cursor , AS3
Karim, Try adding the following line of code to your MOUSE_MOVE event listener function: stage.addChildAt(customCursor, stage.numChildren); Of course, you must substitute your custom cursor's instance name for 'customCursor'. HTH Regards, -Keith http://keithreinfeld.home.comcast.net ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] ComboBox + Custom Cursor , AS3
Some other way... but will look into CursorManager Thanks Karim -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Peter Hall Sent: 12 November 2008 13:01 To: Flash Coders List Subject: Re: [Flashcoders] ComboBox + Custom Cursor , AS3 Are you using CursorManager or adding the cursor in some other way? Peter On Wed, Nov 12, 2008 at 12:42 PM, Karim Beyrouti [EMAIL PROTECTED] wrote: Hello All - I am a little stumped by this one. I am using a custom cursor ( added to the stage ), one of my loaded SWF's has a drop down comboBox - The problem: The List gets added to the stage and goes over the custom mouse cursor. Do you guys know of any fixes for this one? Regards Karim Beyrouti ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] ComboBox + Custom Cursor , AS3
Oh yes sorry, it's Flex. Peter On Wed, Nov 12, 2008 at 1:26 PM, Karim Beyrouti [EMAIL PROTECTED] wrote: Did not find it in Docs, so googled it - and it's a Flex thing no?... Using flash CS3... -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Peter Hall Sent: 12 November 2008 13:01 To: Flash Coders List Subject: Re: [Flashcoders] ComboBox + Custom Cursor , AS3 Are you using CursorManager or adding the cursor in some other way? Peter On Wed, Nov 12, 2008 at 12:42 PM, Karim Beyrouti [EMAIL PROTECTED] wrote: Hello All - I am a little stumped by this one. I am using a custom cursor ( added to the stage ), one of my loaded SWF's has a drop down comboBox - The problem: The List gets added to the stage and goes over the custom mouse cursor. Do you guys know of any fixes for this one? Regards Karim Beyrouti ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] ComboBox + Custom Cursor , AS3
Did not find it in Docs, so googled it - and it's a Flex thing no?... Using flash CS3... -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Peter Hall Sent: 12 November 2008 13:01 To: Flash Coders List Subject: Re: [Flashcoders] ComboBox + Custom Cursor , AS3 Are you using CursorManager or adding the cursor in some other way? Peter On Wed, Nov 12, 2008 at 12:42 PM, Karim Beyrouti [EMAIL PROTECTED] wrote: Hello All - I am a little stumped by this one. I am using a custom cursor ( added to the stage ), one of my loaded SWF's has a drop down comboBox - The problem: The List gets added to the stage and goes over the custom mouse cursor. Do you guys know of any fixes for this one? Regards Karim Beyrouti ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] ComboBox + Custom Cursor , AS3
Are you using CursorManager or adding the cursor in some other way? Peter On Wed, Nov 12, 2008 at 12:42 PM, Karim Beyrouti [EMAIL PROTECTED] wrote: Hello All - I am a little stumped by this one. I am using a custom cursor ( added to the stage ), one of my loaded SWF's has a drop down comboBox - The problem: The List gets added to the stage and goes over the custom mouse cursor. Do you guys know of any fixes for this one? Regards Karim Beyrouti ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] ComboBox + Custom Cursor , AS3
Perfect - thank you ! it seems a little odd that the ComboBox adds the List to the stage and not one of its own children. Maybe memory/resource managment. h. On 12 Nov 2008, at 16:26, Keith Reinfeld wrote: Karim, Try adding the following line of code to your MOUSE_MOVE event listener function: stage.addChildAt(customCursor, stage.numChildren); Of course, you must substitute your custom cursor's instance name for 'customCursor'. HTH Regards, -Keith http://keithreinfeld.home.comcast.net ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] ComboBox + Custom Cursor , AS3
This might be a bit cumbersome but less processor intensive. Instead of using MOUSE_MOVE, create two Sprites on the stage. One as a content pane and other as a custom cursor pane. Then add all content including the combo box to the content pane and the cursor to the cursor pane. I can't say for sure if the combo box will still display on top but may be worth a shot if you're big on freeing up resources. On Wed, Nov 12, 2008 at 5:47 PM, karim beyrouti [EMAIL PROTECTED] wrote: Perfect - thank you ! it seems a little odd that the ComboBox adds the List to the stage and not one of its own children. Maybe memory/resource managment. h. On 12 Nov 2008, at 16:26, Keith Reinfeld wrote: Karim, Try adding the following line of code to your MOUSE_MOVE event listener function: stage.addChildAt(customCursor, stage.numChildren); Of course, you must substitute your custom cursor's instance name for 'customCursor'. HTH Regards, -Keith http://keithreinfeld.home.comcast.net ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- --Joel ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] ComboBox not dropping down in browser?
Hi Cor... I was looking for an example but I don't have one at the moment. All you need to do is add an onEnterFrame function somewhere, then within that function, set the params of the ComboBox instance. The last line of the onEnterFrame function is to delete onEnterFrame. The issue is that V2 components need one frame to initialize themselves, so when you set your custom params (data, etc.) you are doing it after the ComboBox has been drawn to the stage. You could also look into doing it onInit. I believe that's an event for the ComboBox but I am not 100% certain at the moment. The onEnterFrame function probably shouldn't be on the ComboBox itself, but maybe in the MovieClip containing the ComboBox instance. Hope that helps, let me know if you've got it working. - MM ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] ComboBox not dropping down in browser?
The problem with the drop down not working could be you removing some needed assets from the styling MovieClips. I suggest if you need to remove some bits of components you just test a lot and try to set the alpha to 0 from the palette if you need to remove something... As for the fonts - I had some issues. This code worked for me (AS3 FP9): Note GothamMedium is embedded in the lib. code var tClass:Class= getDefinitionByName(GothamMedium) as Class; Font.registerFont(tClass); var tf:TextFormat = new TextFormat(); tf.font = Gotham Medium; tf.size = 12; tf.bold = false; cmb_mc.dropdown.setRendererStyle(embedFonts , true); cmb_mc.dropdown.setRendererStyle(textFormat , tf); cmb_mc.textField.setStyle(fontFamily , Gotham Medium ); cmb_mc.textField.setStyle(embedFonts , true ); dob_txt.embedFonts = true; dob_txt.setTextFormat( tf); StyleManager.setStyle( textFormat , tf) /code Hope this helps Karim -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Preston Parris Sent: 31 October 2008 16:53 To: flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] ComboBox not dropping down in browser? I have a combo box that I just styled, everything works perfectly in the flash ide, all of the data populates, it drops down, is styled fine, Now when I open it in the browser, I click to drop it down, nothing happens. If I click it then tab to the box it shows the yellow outline of wear the content should be yet nothing is there, also my font styling for this box seems to have no effect in the browser, yet like I said in the ide, everything is perfect. thank you to anyone who can help, I will continue my struggle, haha. -- Preston Parris [EMAIL PROTECTED] cell: 704.450.9299 www.modevisual.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] ComboBox not dropping down in browser?
It's possible that if your movie is a one frame timeline, you need to initiate all the ComboBox params after one frame. I can only speak for V2 components in AS2, but I have always needed to set up components after one refresh. - MM ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] ComboBox not dropping down in browser?
Can you show it?? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Preston Parris Sent: vrijdag 31 oktober 2008 17:53 To: flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] ComboBox not dropping down in browser? I have a combo box that I just styled, everything works perfectly in the flash ide, all of the data populates, it drops down, is styled fine, Now when I open it in the browser, I click to drop it down, nothing happens. If I click it then tab to the box it shows the yellow outline of wear the content should be yet nothing is there, also my font styling for this box seems to have no effect in the browser, yet like I said in the ide, everything is perfect. thank you to anyone who can help, I will continue my struggle, haha. -- Preston Parris [EMAIL PROTECTED] cell: 704.450.9299 www.modevisual.com ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] combobox still giving grief
Hi, you're not using runtime file sharing right? greetz JC On Wed, Sep 3, 2008 at 11:48 AM, allandt bik-elliott (thefieldcomic.com) [EMAIL PROTECTED] wrote: sorry to necro an old thread but i still have a problem file structure: one index swf that preloads the main swf main swf that loads in several different section swfs and masks them in a frame the combobox is in one of the masked sections the issue is this: i have a combo box that uses an array populated by a loaded xml file as a dataprovider. It all works just fine apart from that when the combo box is first opened, the first 'page' of entries doesn't render. If the list is scrolled or an entry is selected (it's fully populated), the entire list renders properly, including the entry that's selected. This happens when the site is viewed on a server and when the file is 'test movie'd on it's own but it doesn't happen when the index swf is 'test movie'd or when the site is viewed locally in a browser The cb uses fonts used throughout the site and they are embedded (i've added the code for the cb below). It's been suggested that maybe the cb is loaded before the fonts so that it doesn't get a chance to render properly but i can't see how that is happeneing - i've tried added a textfield with the fonts embedded make sure that that wasn't it (although i haven't added the fonts to a frame loaded before the cb - i'm trying that now) the cb is placed manually onstage and has the following code added on the timeline: function init():Void { xml.ignoreWhite = true; xmlFile = (xmldata != undefined) ? xmldata : PATH(); xml.load(xmlFile); xml.onData = function (src:String) { if (src == undefined) { this.onLoad(false); } else { this.parseXML(src); this.loaded = true; this.onLoad(true); parse(); // creates the arrays } } var cBox:Object = {}; cBox.change = function(o:Object):Void { //Selection.setFocus(c); // didn't work //o.target.onKillFocus=undefined; // didn't work getGeoEvents( arrayOfUniversitiesNames[mc_university.cb_listOfUniversities.selectedIndex] ); // sends user to correct tab lock(); } // this is the script for the cb var c:MovieClip = mc_university.cb_listOfUniversities; c.setStyle(fontFamily, VAG Rounded Light); c.setStyle(embedFonts, true); c.addEventListener(change, cBox); c.dataProvider = arrayOfUniversitiesNames; c.text = Select; //Selection.setFocus(c); // didn't work changeTab(bt_tab); } ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] combobox still giving grief
i've tried amending the combo box to instantiate it on the fly and that doesn't seem to work either // first attempt using the component as an mc //var c:MovieClip = mc_university.cb_listOfUniversities; //var c:MovieClip = mc_university.attachMovie(ComboBox, cb_listOfUniversities, mc_university.getNextHighestDepth(), {_x:74, _y:133.6, _width:245}); // second attempt using createClassObject import mx.controls.ComboBox; var c:ComboBox = mc_university.createClassObject(ComboBox, cb_listOfUniversities, mc_university.getNextHighestDepth(), {_x:74, _y:133.6, _width:245}); c.setStyle(fontFamily, Lloyds TSB VAG Rounded Light); c.setStyle(embedFonts, true); c.addEventListener(change, cBox); c.dataProvider = arrayOfUniversitiesNames; c.text = Select; //Selection.setFocus(c); changeTab(bt_tab_university); unlock(); } On Wed, Sep 3, 2008 at 11:35 AM, allandt bik-elliott (thefieldcomic.com) [EMAIL PROTECTED] wrote: nope On Wed, Sep 3, 2008 at 11:23 AM, Hans Wichman [EMAIL PROTECTED] wrote: Hi, you're not using runtime file sharing right? greetz JC On Wed, Sep 3, 2008 at 11:48 AM, allandt bik-elliott (thefieldcomic.com) [EMAIL PROTECTED] wrote: sorry to necro an old thread but i still have a problem file structure: one index swf that preloads the main swf main swf that loads in several different section swfs and masks them in a frame the combobox is in one of the masked sections the issue is this: i have a combo box that uses an array populated by a loaded xml file as a dataprovider. It all works just fine apart from that when the combo box is first opened, the first 'page' of entries doesn't render. If the list is scrolled or an entry is selected (it's fully populated), the entire list renders properly, including the entry that's selected. This happens when the site is viewed on a server and when the file is 'test movie'd on it's own but it doesn't happen when the index swf is 'test movie'd or when the site is viewed locally in a browser The cb uses fonts used throughout the site and they are embedded (i've added the code for the cb below). It's been suggested that maybe the cb is loaded before the fonts so that it doesn't get a chance to render properly but i can't see how that is happeneing - i've tried added a textfield with the fonts embedded make sure that that wasn't it (although i haven't added the fonts to a frame loaded before the cb - i'm trying that now) the cb is placed manually onstage and has the following code added on the timeline: function init():Void { xml.ignoreWhite = true; xmlFile = (xmldata != undefined) ? xmldata : PATH(); xml.load(xmlFile); xml.onData = function (src:String) { if (src == undefined) { this.onLoad(false); } else { this.parseXML(src); this.loaded = true; this.onLoad(true); parse(); // creates the arrays } } var cBox:Object = {}; cBox.change = function(o:Object):Void { //Selection.setFocus(c); // didn't work //o.target.onKillFocus=undefined; // didn't work getGeoEvents( arrayOfUniversitiesNames[mc_university.cb_listOfUniversities.selectedIndex] ); // sends user to correct tab lock(); } // this is the script for the cb var c:MovieClip = mc_university.cb_listOfUniversities; c.setStyle(fontFamily, VAG Rounded Light); c.setStyle(embedFonts, true); c.addEventListener(change, cBox); c.dataProvider = arrayOfUniversitiesNames; c.text = Select; //Selection.setFocus(c); // didn't work changeTab(bt_tab); } ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] combobox still giving grief
just tried putting the box on the stage and applying the style to it on the first frame and putting the rest of the code on the second but no joy On Wed, Sep 3, 2008 at 11:49 AM, allandt bik-elliott (thefieldcomic.com) [EMAIL PROTECTED] wrote: i've tried amending the combo box to instantiate it on the fly and that doesn't seem to work either // first attempt using the component as an mc //var c:MovieClip = mc_university.cb_listOfUniversities; //var c:MovieClip = mc_university.attachMovie(ComboBox, cb_listOfUniversities, mc_university.getNextHighestDepth(), {_x:74, _y:133.6, _width:245}); // second attempt using createClassObject import mx.controls.ComboBox; var c:ComboBox = mc_university.createClassObject(ComboBox, cb_listOfUniversities, mc_university.getNextHighestDepth(), {_x:74, _y:133.6, _width:245}); c.setStyle(fontFamily, Lloyds TSB VAG Rounded Light); c.setStyle(embedFonts, true); c.addEventListener(change, cBox); c.dataProvider = arrayOfUniversitiesNames; c.text = Select; //Selection.setFocus(c); changeTab(bt_tab_university); unlock(); } On Wed, Sep 3, 2008 at 11:35 AM, allandt bik-elliott (thefieldcomic.com) [EMAIL PROTECTED] wrote: nope On Wed, Sep 3, 2008 at 11:23 AM, Hans Wichman [EMAIL PROTECTED] wrote: Hi, you're not using runtime file sharing right? greetz JC On Wed, Sep 3, 2008 at 11:48 AM, allandt bik-elliott (thefieldcomic.com) [EMAIL PROTECTED] wrote: sorry to necro an old thread but i still have a problem file structure: one index swf that preloads the main swf main swf that loads in several different section swfs and masks them in a frame the combobox is in one of the masked sections the issue is this: i have a combo box that uses an array populated by a loaded xml file as a dataprovider. It all works just fine apart from that when the combo box is first opened, the first 'page' of entries doesn't render. If the list is scrolled or an entry is selected (it's fully populated), the entire list renders properly, including the entry that's selected. This happens when the site is viewed on a server and when the file is 'test movie'd on it's own but it doesn't happen when the index swf is 'test movie'd or when the site is viewed locally in a browser The cb uses fonts used throughout the site and they are embedded (i've added the code for the cb below). It's been suggested that maybe the cb is loaded before the fonts so that it doesn't get a chance to render properly but i can't see how that is happeneing - i've tried added a textfield with the fonts embedded make sure that that wasn't it (although i haven't added the fonts to a frame loaded before the cb - i'm trying that now) the cb is placed manually onstage and has the following code added on the timeline: function init():Void { xml.ignoreWhite = true; xmlFile = (xmldata != undefined) ? xmldata : PATH(); xml.load(xmlFile); xml.onData = function (src:String) { if (src == undefined) { this.onLoad(false); } else { this.parseXML(src); this.loaded = true; this.onLoad(true); parse(); // creates the arrays } } var cBox:Object = {}; cBox.change = function(o:Object):Void { //Selection.setFocus(c); // didn't work //o.target.onKillFocus=undefined; // didn't work getGeoEvents( arrayOfUniversitiesNames[mc_university.cb_listOfUniversities.selectedIndex] ); // sends user to correct tab lock(); } // this is the script for the cb var c:MovieClip = mc_university.cb_listOfUniversities; c.setStyle(fontFamily, VAG Rounded Light); c.setStyle(embedFonts, true); c.addEventListener(change, cBox); c.dataProvider = arrayOfUniversitiesNames; c.text = Select; //Selection.setFocus(c); // didn't work changeTab(bt_tab); } ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] combobox still giving grief
Why can't you put all the code in the first frame? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of allandt bik-elliott (thefieldcomic.com) Sent: woensdag 3 september 2008 13:22 To: Flash Coders List Subject: Re: [Flashcoders] combobox still giving grief just tried putting the box on the stage and applying the style to it on the first frame and putting the rest of the code on the second but no joy On Wed, Sep 3, 2008 at 11:49 AM, allandt bik-elliott (thefieldcomic.com) [EMAIL PROTECTED] wrote: i've tried amending the combo box to instantiate it on the fly and that doesn't seem to work either // first attempt using the component as an mc //var c:MovieClip = mc_university.cb_listOfUniversities; //var c:MovieClip = mc_university.attachMovie(ComboBox, cb_listOfUniversities, mc_university.getNextHighestDepth(), {_x:74, _y:133.6, _width:245}); // second attempt using createClassObject import mx.controls.ComboBox; var c:ComboBox = mc_university.createClassObject(ComboBox, cb_listOfUniversities, mc_university.getNextHighestDepth(), {_x:74, _y:133.6, _width:245}); c.setStyle(fontFamily, Lloyds TSB VAG Rounded Light); c.setStyle(embedFonts, true); c.addEventListener(change, cBox); c.dataProvider = arrayOfUniversitiesNames; c.text = Select; //Selection.setFocus(c); changeTab(bt_tab_university); unlock(); } On Wed, Sep 3, 2008 at 11:35 AM, allandt bik-elliott (thefieldcomic.com) [EMAIL PROTECTED] wrote: nope On Wed, Sep 3, 2008 at 11:23 AM, Hans Wichman [EMAIL PROTECTED] wrote: Hi, you're not using runtime file sharing right? greetz JC On Wed, Sep 3, 2008 at 11:48 AM, allandt bik-elliott (thefieldcomic.com) [EMAIL PROTECTED] wrote: sorry to necro an old thread but i still have a problem file structure: one index swf that preloads the main swf main swf that loads in several different section swfs and masks them in a frame the combobox is in one of the masked sections the issue is this: i have a combo box that uses an array populated by a loaded xml file as a dataprovider. It all works just fine apart from that when the combo box is first opened, the first 'page' of entries doesn't render. If the list is scrolled or an entry is selected (it's fully populated), the entire list renders properly, including the entry that's selected. This happens when the site is viewed on a server and when the file is 'test movie'd on it's own but it doesn't happen when the index swf is 'test movie'd or when the site is viewed locally in a browser The cb uses fonts used throughout the site and they are embedded (i've added the code for the cb below). It's been suggested that maybe the cb is loaded before the fonts so that it doesn't get a chance to render properly but i can't see how that is happeneing - i've tried added a textfield with the fonts embedded make sure that that wasn't it (although i haven't added the fonts to a frame loaded before the cb - i'm trying that now) the cb is placed manually onstage and has the following code added on the timeline: function init():Void { xml.ignoreWhite = true; xmlFile = (xmldata != undefined) ? xmldata : PATH(); xml.load(xmlFile); xml.onData = function (src:String) { if (src == undefined) { this.onLoad(false); } else { this.parseXML(src); this.loaded = true; this.onLoad(true); parse(); // creates the arrays } } var cBox:Object = {}; cBox.change = function(o:Object):Void { //Selection.setFocus(c); // didn't work //o.target.onKillFocus=undefined; // didn't work getGeoEvents( arrayOfUniversitiesNames[mc_university.cb_listOfUniversities.selectedIndex] ); // sends user to correct tab lock(); } // this is the script for the cb var c:MovieClip = mc_university.cb_listOfUniversities; c.setStyle(fontFamily, VAG Rounded Light); c.setStyle(embedFonts, true); c.addEventListener(change, cBox); c.dataProvider = arrayOfUniversitiesNames; c.text = Select; //Selection.setFocus(c); // didn't work changeTab(bt_tab); } ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE : [Flashcoders] combobox still giving grief ...
In regards to this part of your question: --- If the list is scrolled or an entry is selected (it's fully populated), the entire list renders properly, including the entry that's selected. --- Can you force or simulate whatever event or function is fired when any of the above occurs?, before the user actually does anything? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: RE : [Flashcoders] combobox still giving grief ...
ah - i solved the problem - the dataprovider wasn't populated properly thanks for the response On Wed, Sep 3, 2008 at 12:46 PM, S0 F1 [EMAIL PROTECTED] wrote: In regards to this part of your question: --- If the list is scrolled or an entry is selected (it's fully populated), the entire list renders properly, including the entry that's selected. --- Can you force or simulate whatever event or function is fired when any of the above occurs?, before the user actually does anything? ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] ComboBox Component and preloader
Ah right, that can be annoying indeed. Did you generate any size reports, while working on the preloader? greetz JC On 8/18/07, Kerry Thompson [EMAIL PROTECTED] wrote: Hans Wichman wrote: could you try exporting the classes in the frame BEFORE you export your content? This seems so simple, yet I spent the better part of a day getting this to work. I was doing everything exactly right, as far as I could tell. Exporting classes on frame 5, instances on-stage in frame 6. I'm beginning to appreciate the frustration with V2 components. You'll love the solution. I finally discovered that I was exporting a radio button component on frame 1. The way components interact, that was screwing everything up, and neither the radio buttons nor the ComboBox were working. Thanks for pointing me in the right direction, Hans. Cordially, Kerry Thompson ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] ComboBox Component and preloader
Ah right, that can be annoying indeed. Did you generate any size reports, while working on the preloader? Yes, I did. I ran the profiler in debug mode. That's when I saw the spike on the first frame and started digging around. The ironic thing is that the piece has very little graphics. It's very code-intensive. It calculates what you need to save for retirement, and uses some heavy-duty actuarial math, but few graphics. So, the piece is very light, and the load bar is superfluous on broadband. Even on a 28.8 modem, it only takes a couple of seconds to load. Cordially, Kerry Thompson ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] ComboBox Component and preloader
Hans Wichman wrote: could you try exporting the classes in the frame BEFORE you export your content? This seems so simple, yet I spent the better part of a day getting this to work. I was doing everything exactly right, as far as I could tell. Exporting classes on frame 5, instances on-stage in frame 6. I'm beginning to appreciate the frustration with V2 components. You'll love the solution. I finally discovered that I was exporting a radio button component on frame 1. The way components interact, that was screwing everything up, and neither the radio buttons nor the ComboBox were working. Thanks for pointing me in the right direction, Hans. Cordially, Kerry Thompson ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] ComboBox Component and preloader
Hans Wichman wrote: Hi, coudl you try exporting the classes in the frame BEFORE you export your content? So not classes in frame 6 and the combobox clip in 6, but say classes in 5 and combobox in 6. I think that might help. In addition search the archives for combobox woes, there's been a lot on it lately. Thanks, Hans. I'll try that. Now that you mention it, there is a warning in the docs about that. As to ComboBox woes, I have my share of horror stories to share. But I'll spare you. Cordially, Kerry Thompson ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] ComboBox Component and preloader
Sorry, I should have been specific. I'm using CS3 on Windows Vista, publishing as F8. Using AS2 AS2 components. Code is almost pure OOP, except for the preloader and a couple dozen lines in frame 6 where I instantiate some movie clips with my MC subclass. Oh, yes--I'm not a novice, so you don't have to be too gentle. I've been programming for 25 years. It's just some aspects of Flash I'm not yet familiar with. -Kerry -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of Kerry Thompson Sent: Thursday, August 16, 2007 8:52 PM To: flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] ComboBox Component and preloader Greetings. This is my first post here--the stuff I'm doing is getting too complicated for the Newbie list. I have an app up and running--in alpha, in fact. Now I'm adding a load bar. Everything is working the way it should, except for the ComboBox components. It's not showing when it's supposed to. Actually, it's kind of showing--there's just a little empty square, and the 0th selection text. What do I need to do with components that is different from Movie Clips? My movie structure is pretty common: - preloader code in frame 1 - 6 pages, 5 frames each (all code except preloader is in frame 6, layer 1--the pages are 5 frames so I can see the labels) - everything I need exported to AS, 1st frame deselected - in Publish Settings, everything is exported in frame 6 - There is an instance of all mc's and the ComboBox component from the library in the paste area (off-stage) in frame 6 - The ComboBox does not have a class assigned to it, nor do its instances. - The ComboBox instances' content, the 50 states, are filled in in the component inspector, not in code. Their callbacks are set in the frame 6 code. So, what else do I need to do to get the ComboBox to appear when I want it to? Cordially, Kerry Thompson ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] ComboBox Component and preloader
Hi, coudl you try exporting the classes in the frame BEFORE you export your content? So not classes in frame 6 and the combobox clip in 6, but say classes in 5 and combobox in 6. I think that might help. In addition search the archives for combobox woes, there's been a lot on it lately. greetz JC On 8/17/07, Kerry Thompson [EMAIL PROTECTED] wrote: Sorry, I should have been specific. I'm using CS3 on Windows Vista, publishing as F8. Using AS2 AS2 components. Code is almost pure OOP, except for the preloader and a couple dozen lines in frame 6 where I instantiate some movie clips with my MC subclass. Oh, yes--I'm not a novice, so you don't have to be too gentle. I've been programming for 25 years. It's just some aspects of Flash I'm not yet familiar with. -Kerry -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of Kerry Thompson Sent: Thursday, August 16, 2007 8:52 PM To: flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] ComboBox Component and preloader Greetings. This is my first post here--the stuff I'm doing is getting too complicated for the Newbie list. I have an app up and running--in alpha, in fact. Now I'm adding a load bar. Everything is working the way it should, except for the ComboBox components. It's not showing when it's supposed to. Actually, it's kind of showing--there's just a little empty square, and the 0th selection text. What do I need to do with components that is different from Movie Clips? My movie structure is pretty common: - preloader code in frame 1 - 6 pages, 5 frames each (all code except preloader is in frame 6, layer 1--the pages are 5 frames so I can see the labels) - everything I need exported to AS, 1st frame deselected - in Publish Settings, everything is exported in frame 6 - There is an instance of all mc's and the ComboBox component from the library in the paste area (off-stage) in frame 6 - The ComboBox does not have a class assigned to it, nor do its instances. - The ComboBox instances' content, the 50 states, are filled in in the component inspector, not in code. Their callbacks are set in the frame 6 code. So, what else do I need to do to get the ComboBox to appear when I want it to? Cordially, Kerry Thompson ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] combobox class object not showing starting value
please help - On 25 May 2007, at 23:03, Muzak wrote: - Original Message - From: Allandt Bik-Elliott (Receptacle) [EMAIL PROTECTED] To: flashcoders@chattyfig.figleaf.com Sent: Friday, May 25, 2007 8:36 PM Subject: Re: [Flashcoders] combobox class object not showing starting value crikey - i've posted this in 4 places and i've not had a single response Maybe that should tell you something about cross-posting ;-) ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] combobox class object not showing starting value
i've also tried var combo:ComboBox = createClassObject(ComboBox, variationCombo, 5004); combo._y = 450; combo._x = 500; combo.labelField = thisSize; combo.dataProvider = sizes; On 25 May 2007, at 17:30, Allandt Bik-Elliott (Receptacle) wrote: thanks for all your help today guys last question (for today :D ) i've loaded an array (including a starting value) into a combo box that was made using createClassObject in actionscript and it works fine (drop down has the full list of values, including the starting one) except that nothing ever appears in the 'up' state. var comboInit:Object = new Object(); var sizes:Array = [{thisSize: choose one}]; for (var i:Number = 0; i productArray[product].sizes.length; i++) { sizes.push ({thisSize:productArray[product].sizes[i]}); } comboInit._y = 450; comboInit._x = 500; comboInit.dataProvider = sizes; comboInit.labelField = thisSize; createClassObject(ComboBox, variationCombo, 5004, comboInit); did i not do something correctly? hope you can help a ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] combobox class object not showing starting value
crikey - i've posted this in 4 places and i've not had a single response On 25 May 2007, at 18:19, Allandt Bik-Elliott (Receptacle) wrote: i've also tried var combo:ComboBox = createClassObject(ComboBox, variationCombo, 5004); combo._y = 450; combo._x = 500; combo.labelField = thisSize; combo.dataProvider = sizes; On 25 May 2007, at 17:30, Allandt Bik-Elliott (Receptacle) wrote: thanks for all your help today guys last question (for today :D ) i've loaded an array (including a starting value) into a combo box that was made using createClassObject in actionscript and it works fine (drop down has the full list of values, including the starting one) except that nothing ever appears in the 'up' state. var comboInit:Object = new Object(); var sizes:Array = [{thisSize: choose one}]; for (var i:Number = 0; i productArray[product].sizes.length; i++) { sizes.push ({thisSize:productArray[product].sizes[i]}); } comboInit._y = 450; comboInit._x = 500; comboInit.dataProvider = sizes; comboInit.labelField = thisSize; createClassObject(ComboBox, variationCombo, 5004, comboInit); did i not do something correctly? hope you can help a ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] combobox class object not showing starting value
i have also tried var combo:ComboBox = createClassObject(ComboBox, variationCombo, 5004); combo.addItem(Size); for (var i:Number = 0; i productArray[product].sizes.length; i++) { combo.addItem(productArray[product].sizes[i]); } combo._y = 445; combo._x = 530; with the same result On 25 May 2007, at 19:36, Allandt Bik-Elliott (Receptacle) wrote: crikey - i've posted this in 4 places and i've not had a single response On 25 May 2007, at 18:19, Allandt Bik-Elliott (Receptacle) wrote: i've also tried var combo:ComboBox = createClassObject(ComboBox, variationCombo, 5004); combo._y = 450; combo._x = 500; combo.labelField = thisSize; combo.dataProvider = sizes; On 25 May 2007, at 17:30, Allandt Bik-Elliott (Receptacle) wrote: thanks for all your help today guys last question (for today :D ) i've loaded an array (including a starting value) into a combo box that was made using createClassObject in actionscript and it works fine (drop down has the full list of values, including the starting one) except that nothing ever appears in the 'up' state. var comboInit:Object = new Object(); var sizes:Array = [{thisSize: choose one}]; for (var i:Number = 0; i productArray[product].sizes.length; i+ +) { sizes.push ({thisSize:productArray[product].sizes[i]}); } comboInit._y = 450; comboInit._x = 500; comboInit.dataProvider = sizes; comboInit.labelField = thisSize; createClassObject(ComboBox, variationCombo, 5004, comboInit); did i not do something correctly? hope you can help a ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] combobox class object not showing starting value
- Original Message - From: Allandt Bik-Elliott (Receptacle) [EMAIL PROTECTED] To: flashcoders@chattyfig.figleaf.com Sent: Friday, May 25, 2007 8:36 PM Subject: Re: [Flashcoders] combobox class object not showing starting value crikey - i've posted this in 4 places and i've not had a single response Maybe that should tell you something about cross-posting ;-) ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Combobox embed fonts PC/Mac problem
Still no go. But thanks. Just going to build our own combo box now. Delfi Ramirez wrote: Try ordinary marks. I mean not () but (') Delfí Ramírez i Ruiz http://segonquart.blogspot.com ___ Copy addresses and emails from any email account to Yahoo! Mail - quick, easy and free. http://uk.docs.yahoo.com/trueswitch2.html ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Combobox embed fonts PC/Mac problem
You might try: myComboBox.embedFonts = true; Chip Moeser wrote: We are having an cross platform issue when trying to embed fonts using the combobox and set style. When we publish on a mac with: myCombobox.setStyle(embedFonts, true); the fonts show up embedded on a mac but not a pc. When we publish with (minus quotes around true): myCombobox.setStyle(embedFonts, true); The fonts show up embedded on the pc but not the mac. Have also tried using both lines, the later always cancels out the previous. Has anyone run into this issue before? Thanks! -Chip ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Combobox embed fonts PC/Mac problem
Thanks but no go:( Brandon Barkley wrote: You might try: myComboBox.embedFonts = true; Chip Moeser wrote: We are having an cross platform issue when trying to embed fonts using the combobox and set style. When we publish on a mac with: myCombobox.setStyle(embedFonts, true); the fonts show up embedded on a mac but not a pc. When we publish with (minus quotes around true): myCombobox.setStyle(embedFonts, true); The fonts show up embedded on the pc but not the mac. Have also tried using both lines, the later always cancels out the previous. Has anyone run into this issue before? Thanks! -Chip ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Combobox embed fonts PC/Mac problem
Chip, Try this: // check the Flash Player version trace(System.capabilities.version); var OS:String = System.capabilities.version.substring(0,3); trace(OS = +OS); if(OS == WIN){ trace(Windows); myCombobox.setStyle(embedFonts, true); } if(OS == MAC){ trace(MAC); myCombobox.setStyle(embedFonts, true); } if(OS == UNI){ trace(UNI); myCombobox.setStyle(embedFonts, true);// OR WHATEVER WORKS HERE } From LiveDocs: The format of the version number is: platform majorVersion, minorVersion, buildNumber, internalBuildNumber. Possible values for platform are WIN, MAC, and UNIX. Some examples: WIN 8,0,22,0 MAC 7,0,25,0 UNIX 5,0,55,0 Please see the following technote for more information: http://www.macromedia.com/go/tn_14294 HTH -Keith http://keithreinfeld.home.comcast.net -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Chip Moeser Sent: Tuesday, January 23, 2007 12:51 PM To: Flashcoders mailing list Subject: [Flashcoders] Combobox embed fonts PC/Mac problem We are having an cross platform issue when trying to embed fonts using the combobox and set style. When we publish on a mac with: myCombobox.setStyle(embedFonts, true); the fonts show up embedded on a mac but not a pc. When we publish with (minus quotes around true): myCombobox.setStyle(embedFonts, true); The fonts show up embedded on the pc but not the mac. Have also tried using both lines, the later always cancels out the previous. Has anyone run into this issue before? Thanks! -Chip ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Combobox embed fonts PC/Mac problem
Keith, Thanks, but this didn't work. Since we will always be doing our final compile on a mac and embedding takes place at compile time checking the version of the machine wouldn't really make a difference. I think we may just end up building our own combo box. -Chip Keith Reinfeld wrote: Chip, Try this: // check the Flash Player version trace(System.capabilities.version); var OS:String = System.capabilities.version.substring(0,3); trace(OS = +OS); if(OS == WIN){ trace(Windows); myCombobox.setStyle(embedFonts, true); } if(OS == MAC){ trace(MAC); myCombobox.setStyle(embedFonts, true); } if(OS == UNI){ trace(UNI); myCombobox.setStyle(embedFonts, true);// OR WHATEVER WORKS HERE } From LiveDocs: The format of the version number is: platform majorVersion, minorVersion, buildNumber, internalBuildNumber. Possible values for platform are WIN, MAC, and UNIX. Some examples: WIN 8,0,22,0 MAC 7,0,25,0 UNIX 5,0,55,0 Please see the following technote for more information: http://www.macromedia.com/go/tn_14294 HTH -Keith http://keithreinfeld.home.comcast.net -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Chip Moeser Sent: Tuesday, January 23, 2007 12:51 PM To: Flashcoders mailing list Subject: [Flashcoders] Combobox embed fonts PC/Mac problem We are having an cross platform issue when trying to embed fonts using the combobox and set style. When we publish on a mac with: myCombobox.setStyle(embedFonts, true); the fonts show up embedded on a mac but not a pc. When we publish with (minus quotes around true): myCombobox.setStyle(embedFonts, true); The fonts show up embedded on the pc but not the mac. Have also tried using both lines, the later always cancels out the previous. Has anyone run into this issue before? Thanks! -Chip ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Combobox embed fonts PC/Mac problem
i've not used setStyle with a combo box... but i have had some experience with embedding fonts. I'm not saying this is the best practice, but it is one that has worked for me in the past. remove the embedFonts line. somewhere on the stage create a dynamic text field, set to the font you want. embed the glyphs you want, and use that font for the combobox. On 1/23/07, Chip Moeser [EMAIL PROTECTED] wrote: Keith, Thanks, but this didn't work. Since we will always be doing our final compile on a mac and embedding takes place at compile time checking the version of the machine wouldn't really make a difference. I think we may just end up building our own combo box. -Chip Keith Reinfeld wrote: Chip, Try this: // check the Flash Player version trace(System.capabilities.version); var OS:String = System.capabilities.version.substring(0,3); trace(OS = +OS); if(OS == WIN){ trace(Windows); myCombobox.setStyle(embedFonts, true); } if(OS == MAC){ trace(MAC); myCombobox.setStyle(embedFonts, true); } if(OS == UNI){ trace(UNI); myCombobox.setStyle(embedFonts, true);// OR WHATEVER WORKS HERE } From LiveDocs: The format of the version number is: platform majorVersion, minorVersion, buildNumber, internalBuildNumber. Possible values for platform are WIN, MAC, and UNIX. Some examples: WIN 8,0,22,0 MAC 7,0,25,0 UNIX 5,0,55,0 Please see the following technote for more information: http://www.macromedia.com/go/tn_14294 HTH -Keith http://keithreinfeld.home.comcast.net -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Chip Moeser Sent: Tuesday, January 23, 2007 12:51 PM To: Flashcoders mailing list Subject: [Flashcoders] Combobox embed fonts PC/Mac problem We are having an cross platform issue when trying to embed fonts using the combobox and set style. When we publish on a mac with: myCombobox.setStyle(embedFonts, true); the fonts show up embedded on a mac but not a pc. When we publish with (minus quotes around true): myCombobox.setStyle(embedFonts, true); The fonts show up embedded on the pc but not the mac. Have also tried using both lines, the later always cancels out the previous. Has anyone run into this issue before? Thanks! -Chip ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Combobox embed fonts PC/Mac problem
Thanks. Seems to me this should work, but it didn't. James Dean wrote: i've not used setStyle with a combo box... but i have had some experience with embedding fonts. I'm not saying this is the best practice, but it is one that has worked for me in the past. remove the embedFonts line. somewhere on the stage create a dynamic text field, set to the font you want. embed the glyphs you want, and use that font for the combobox. On 1/23/07, Chip Moeser [EMAIL PROTECTED] wrote: Keith, Thanks, but this didn't work. Since we will always be doing our final compile on a mac and embedding takes place at compile time checking the version of the machine wouldn't really make a difference. I think we may just end up building our own combo box. -Chip Keith Reinfeld wrote: Chip, Try this: // check the Flash Player version trace(System.capabilities.version); var OS:String = System.capabilities.version.substring(0,3); trace(OS = +OS); if(OS == WIN){ trace(Windows); myCombobox.setStyle(embedFonts, true); } if(OS == MAC){ trace(MAC); myCombobox.setStyle(embedFonts, true); } if(OS == UNI){ trace(UNI); myCombobox.setStyle(embedFonts, true);// OR WHATEVER WORKS HERE } From LiveDocs: The format of the version number is: platform majorVersion, minorVersion, buildNumber, internalBuildNumber. Possible values for platform are WIN, MAC, and UNIX. Some examples: WIN 8,0,22,0 MAC 7,0,25,0 UNIX 5,0,55,0 Please see the following technote for more information: http://www.macromedia.com/go/tn_14294 HTH -Keith http://keithreinfeld.home.comcast.net -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Chip Moeser Sent: Tuesday, January 23, 2007 12:51 PM To: Flashcoders mailing list Subject: [Flashcoders] Combobox embed fonts PC/Mac problem We are having an cross platform issue when trying to embed fonts using the combobox and set style. When we publish on a mac with: myCombobox.setStyle(embedFonts, true); the fonts show up embedded on a mac but not a pc. When we publish with (minus quotes around true): myCombobox.setStyle(embedFonts, true); The fonts show up embedded on the pc but not the mac. Have also tried using both lines, the later always cancels out the previous. Has anyone run into this issue before? Thanks! -Chip ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Combobox embed fonts PC/Mac problem
Try ordinary marks. I mean not () but (') Delfí Ramírez i Ruiz http://segonquart.blogspot.com ___ Copy addresses and emails from any email account to Yahoo! Mail - quick, easy and free. http://uk.docs.yahoo.com/trueswitch2.html ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] combobox
No the bar can not be open , very strange Le 17/01/07 10:06, « Hans Wichman » [EMAIL PROTECTED] a écrit : Hi, what do you mean with blocked? Strange layout, small weird icon etc? greetz JC On 1/17/07, Laurent CUCHET [EMAIL PROTECTED] wrote: I use an mc with a combobox loaded at level 40 for ex. it works ok : loadMovieNum(³combo.swf²,40); I load this movie in a link : loadmovie(³combo.swf², link); and the combobox is blocked. Impossible to open i. Have you got an idea ? Thank you ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] combobox
try this on frame 1 of your main movie: Object.registerClass(ComboDownArrowDisabled, MovieClip); greetz JC On 1/17/07, Laurent CUCHET [EMAIL PROTECTED] wrote: No the bar can not be open , very strange Le 17/01/07 10:06, «Hans Wichman» [EMAIL PROTECTED] a écrit: Hi, what do you mean with blocked? Strange layout, small weird icon etc? greetz JC On 1/17/07, Laurent CUCHET [EMAIL PROTECTED] wrote: I use an mc with a combobox loaded at level 40 for ex. it works ok : loadMovieNum(³combo.swf²,40); I load this movie in a link : loadmovie(³combo.swf², link); and the combobox is blocked. Impossible to open i. Have you got an idea ? Thank you ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] combobox
Hi, Had the same problem, solved it by bringing an instance of the combo component in the main movie even if th emain movie doesn't use it. Also, in other cases i had to uses the _lockroot property (http://livedocs.macromedia.com/flash/mx2004/main_7_2/wwhelp/wwhimpl/common/html/wwhelp.htm?context=Flash_MX_2004file=1522.html) which works well but be carreful with it cause it doesn't goes right with the encapsulation N. -- Nicolas TASKY conseil, analyse et développement multimédia ntasky.com - (514) 839-6426 - Original Message - From: Laurent CUCHET [EMAIL PROTECTED] To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com Sent: Wednesday, January 17, 2007 6:11 AM Subject: Re: [Flashcoders] combobox No the bar can not be open , very strange Le 17/01/07 10:06, « Hans Wichman » [EMAIL PROTECTED] a écrit : Hi, what do you mean with blocked? Strange layout, small weird icon etc? greetz JC On 1/17/07, Laurent CUCHET [EMAIL PROTECTED] wrote: I use an mc with a combobox loaded at level 40 for ex. it works ok : loadMovieNum(³combo.swf²,40); I load this movie in a link : loadmovie(³combo.swf², link); and the combobox is blocked. Impossible to open i. Have you got an idea ? Thank you ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] combobox
Also, when you load a clip using loadMovieNum, you're loading the SWF directly into the timeline. When you use loadMovie, you're loading the SWF into a target clip. When you load a SWF into a target clip that utilizes components, you'll need to set _lockroot = true; on the target clip. var link:MovieClip = this.myClip; loadMovie(combo.swf, link); link._lockroot = true; Hope that helps, Andrew -Original Message- From: Hans Wichman [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 17, 2007 5:17 AM To: Flashcoders mailing list Subject: Re: [Flashcoders] combobox try this on frame 1 of your main movie: Object.registerClass(ComboDownArrowDisabled, MovieClip); greetz JC On 1/17/07, Laurent CUCHET [EMAIL PROTECTED] wrote: No the bar can not be open , very strange Le 17/01/07 10:06, «Hans Wichman» [EMAIL PROTECTED] a écrit: Hi, what do you mean with blocked? Strange layout, small weird icon etc? greetz JC On 1/17/07, Laurent CUCHET [EMAIL PROTECTED] wrote: I use an mc with a combobox loaded at level 40 for ex. it works ok : loadMovieNum(³combo.swf²,40); I load this movie in a link : loadmovie(³combo.swf², link); and the combobox is blocked. Impossible to open i. Have you got an idea ? Thank you ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] ComboBox drawing border on lost focus
focusRect On 11/28/06, Wade Arnold [EMAIL PROTECTED] wrote: I have a MM ComboBox component in a movieclip that extends UIComponent. When I select something from the ComboBox I get a yellow boarder around the movieclip that the combobox resides in. Once I move the mouse the yellow box disappears. Any ideas on where or what to start looking for? Thanks! Wade ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] ComboBox drawing border on lost focus
_focusrect = false; Much love! -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of eric dolecki Sent: Tuesday, November 28, 2006 11:27 AM To: Flashcoders mailing list Subject: Re: [Flashcoders] ComboBox drawing border on lost focus focusRect On 11/28/06, Wade Arnold [EMAIL PROTECTED] wrote: I have a MM ComboBox component in a movieclip that extends UIComponent. When I select something from the ComboBox I get a yellow boarder around the movieclip that the combobox resides in. Once I move the mouse the yellow box disappears. Any ideas on where or what to start looking for? Thanks! Wade ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] ComboBox - green bounding box
Hi I'm having a bit of a problem with some ComboBoxes. The ComboBoxes are in a swf that is loaded into another at runtime. The ComboBoxes work fine when I simply run the swf they're in. But when I load that swf in, and click on the ComboBoxes a green box bounding the dropdown is left visible whenever the dropdown disappears. I'm using _lockroot=true in the loaded swf which seems to allow the ComboBoxes to run correctly except for the green bounding box.. Any ideas? Thanks Ned This e-mail (and any attachments) is confidential and may contain personal views which are not the views of Cimex Media Ltd and any affiliated companies, unless specifically stated. It is intended for the use of the individual or group to whom it is addressed. If you have received it in error, please delete it from your system, do not use, copy or disclose the information in any way nor act in reliance on it and please notify [EMAIL PROTECTED] This email was scanned by Postini, the leading provider in Managed Email Security. http://www.postini.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] ComboBox - green bounding box
Thanks Mick That worked a treat! Ned -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mick G Sent: 24 November 2006 10:45 To: Flashcoders mailing list Subject: Re: [Flashcoders] ComboBox - green bounding box If you put an instance of the Combobox in the library of your root SWF it will fix the problem - but the same old story of this messing up your preloaders :) Also read this... http://ariaware.com/products/optimizer/downloads/docs/hints___tips/the_c orrect_way_to_load_in_external_swfs_that_contain_v2_components.htm On 11/24/06, Ned Perry [EMAIL PROTECTED] wrote: Hi I'm having a bit of a problem with some ComboBoxes. The ComboBoxes are in a swf that is loaded into another at runtime. The ComboBoxes work fine when I simply run the swf they're in. But when I load that swf in, and click on the ComboBoxes a green box bounding the dropdown is left visible whenever the dropdown disappears. I'm using _lockroot=true in the loaded swf which seems to allow the ComboBoxes to run correctly except for the green bounding box.. Any ideas? Thanks Ned This e-mail (and any attachments) is confidential and may contain personal views which are not the views of Cimex Media Ltd and any affiliated companies, unless specifically stated. It is intended for the use of the individual or group to whom it is addressed. If you have received it in error, please delete it from your system, do not use, copy or disclose the information in any way nor act in reliance on it and please notify [EMAIL PROTECTED] This email was scanned by Postini, the leading provider in Managed Email Security. http://www.postini.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com This e-mail (and any attachments) is confidential and may contain personal views which are not the views of Cimex Media Ltd and any affiliated companies, unless specifically stated. It is intended for the use of the individual or group to whom it is addressed. If you have received it in error, please delete it from your system, do not use, copy or disclose the information in any way nor act in reliance on it and please notify [EMAIL PROTECTED] This email was scanned by Postini, the leading provider in Managed Email Security. http://www.postini.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] ComboBox
Just put a button called button on your stage... and code: One_cb.addItem({data:1, label:One}); One_cb.addItem({data:2, label:Two}); One_cb.addItem({data:3, label:Hello}); One_cb.addItem({data:4, label:Yes}); One_cb.addItem({data:5, label:It works}); button.onRelease = function():Void { for (var i:Number=0;iOne_cb.length;i++) { var subObject:Object = One_cb.getItemAt(i); var itemObject:Object = new Object(); trace(--); for (var j:String in subObject) { trace(j: +j+--+subObject[j]); itemObject[j] = subObject[j]; } Two_cb.addItem(itemObject); } } May be there is something more simple... David Buff - Original Message - From: Laurent CUCHET [EMAIL PROTECTED] To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com Sent: Thursday, October 19, 2006 2:15 PM Subject: [Flashcoders] ComboBox There is 2 combobox on the stage, One_cb and two_cb One_cb.addItem({data:1, label:One}); One_cb.addItem({data:2, label:Two}); How can I do to fill two_cb (data and label) with a button ? Thank you for your tips, Laurent ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] combobox label not displaying any text
the font must be available as a symbol font in the library. And, in some cases, the font must be in the library of the main movie, in the case of combobox being in a movie loaded by another one. This is because Flash creates the combobox list in _level0. Sometime I created a combobox inside a movie that was rotationed, and the list appeared straight on the screen, without the inclination of the main movie (the main movie of the list was, actually, the _root). []'s andrei On 9/25/06, Rich Rodecker [EMAIL PROTECTED] wrote: I have a combobox that I am using in a CellRenderer for a datagrid. For some reason the text for the selected item in the comboobox wont display. If i trace out the value of the text, it shows the right value, so I know its being set. I am setting embedFonts to true for the TextInput and ComboBox components in the _global styles. anyone have any ideas as to why the selected text isnt displaying? ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] combobox label not displaying any text
i am embedding the font through a dynamic textfiled on the main timeline, since adding a font symbol takes up way more space. On 9/25/06, Andrei Thomaz [EMAIL PROTECTED] wrote: the font must be available as a symbol font in the library. And, in some cases, the font must be in the library of the main movie, in the case of combobox being in a movie loaded by another one. This is because Flash creates the combobox list in _level0. Sometime I created a combobox inside a movie that was rotationed, and the list appeared straight on the screen, without the inclination of the main movie (the main movie of the list was, actually, the _root). []'s andrei On 9/25/06, Rich Rodecker [EMAIL PROTECTED] wrote: I have a combobox that I am using in a CellRenderer for a datagrid. For some reason the text for the selected item in the comboobox wont display. If i trace out the value of the text, it shows the right value, so I know its being set. I am setting embedFonts to true for the TextInput and ComboBox components in the _global styles. anyone have any ideas as to why the selected text isnt displaying? ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] combobox label not displaying any text
also, all the items in the combobox's dropdown display fine...its just the TextInput that shows the cb's selected item. On 9/25/06, Rich Rodecker [EMAIL PROTECTED] wrote: i am embedding the font through a dynamic textfiled on the main timeline, since adding a font symbol takes up way more space. On 9/25/06, Andrei Thomaz [EMAIL PROTECTED] wrote: the font must be available as a symbol font in the library. And, in some cases, the font must be in the library of the main movie, in the case of combobox being in a movie loaded by another one. This is because Flash creates the combobox list in _level0. Sometime I created a combobox inside a movie that was rotationed, and the list appeared straight on the screen, without the inclination of the main movie (the main movie of the list was, actually, the _root). []'s andrei On 9/25/06, Rich Rodecker [EMAIL PROTECTED] wrote: I have a combobox that I am using in a CellRenderer for a datagrid. For some reason the text for the selected item in the comboobox wont display. If i trace out the value of the text, it shows the right value, so I know its being set. I am setting embedFonts to true for the TextInput and ComboBox components in the _global styles. anyone have any ideas as to why the selected text isnt displaying? ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] combobox label not displaying any text
i also notice if i set the DG's editable property to true, i cant enter any tex into the input field...wtf? On 9/25/06, Rich Rodecker [EMAIL PROTECTED] wrote: also, all the items in the combobox's dropdown display fine...its just the TextInput that shows the cb's selected item. On 9/25/06, Rich Rodecker [EMAIL PROTECTED] wrote: i am embedding the font through a dynamic textfiled on the main timeline, since adding a font symbol takes up way more space. On 9/25/06, Andrei Thomaz [EMAIL PROTECTED] wrote: the font must be available as a symbol font in the library. And, in some cases, the font must be in the library of the main movie, in the case of combobox being in a movie loaded by another one. This is because Flash creates the combobox list in _level0. Sometime I created a combobox inside a movie that was rotationed, and the list appeared straight on the screen, without the inclination of the main movie (the main movie of the list was, actually, the _root). []'s andrei On 9/25/06, Rich Rodecker [EMAIL PROTECTED] wrote: I have a combobox that I am using in a CellRenderer for a datagrid. For some reason the text for the selected item in the comboobox wont display. If i trace out the value of the text, it shows the right value, so I know its being set. I am setting embedFonts to true for the TextInput and ComboBox components in the _global styles. anyone have any ideas as to why the selected text isnt displaying? ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] ComboBox,Depth, Draw API - Bug?
Thanks, I tried kTop and kTopmost as well, and it didn't work either. There is some kind of conflict between V2 components and the draw API depth which I can't seem to get DepthManager to solve. Jason Merrill Bank of America Learning Organization Effectiveness - Technology Solutions -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of Pete Miller Sent: Thursday, September 07, 2006 10:24 AM To: Flashcoders mailing list Subject: RE: [Flashcoders] ComboBox,Depth, Draw API - Bug? I think you want to avoid using kCursor. That is a special level reserved for, you got it, the cursor. There is also another special reserved level for combobox dropdowns which is set high enough to be above all normal levels. Try creating your combobox and the movieclip using DepthManager.kTop or kTopmost. -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of Merrill, Jason Sent: Wednesday, September 06, 2006 4:33 PM To: Flashcoders mailing list Subject: RE: [Flashcoders] ComboBox,Depth, Draw API - Bug? Hmm... I have been playing with the DepthManager class, alternatively trying: my_cb = DepthManager.createClassObjectAtDepth(mx.controls.ComboBox, DepthManager.kCursor); and setting the drawn on mc to HighestDepth or creating the ComboBox at usual depth and setting the depth of the movieClip being drawn on to DepthManager.kCursor and other static depths of the DepthManager class, with no luck. I can create the class object, but it still remains behind the drawn on movie clips. Any ideas? Jason Merrill Bank of America Learning Organization Effectiveness - Technology Solutions -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of Pete Miller Sent: Wednesday, September 06, 2006 3:41 PM To: Flashcoders mailing list Subject: RE: [Flashcoders] ComboBox,Depth, Draw API - Bug? Try tracing the value that you get from getNextHighestDepth(). If the result is 1048575, you are incorporating v2.0 components, which causes getNextHighestDepth() to be less than useful. Use DepthManager instead. This pointer isn't entirely related, but might help explaining why: http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_19435 P. -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of Merrill, Jason Sent: Wednesday, September 06, 2006 3:31 PM To: Flashcoders mailing list Subject: [Flashcoders] ComboBox,Depth, Draw API - Bug? Is this a bug? Try the sample code out below - Why is it that if you specify an explicit depth for a movie clip (SEE LINE 2 OF THE FIRST SET OF CODE BELOW) and draw on it with the draw API, and a comboBox made later with a depth of getNextHighestDepth() will have a drop down which displays over the drawn portion of the movie clip AS EXPECTED, but when you use getNextHighestDepth() on the movie clip (SEE LINE 2 OF THE SECOND SET OF CODE BELOW), the comboBox's dropdown is BEHIND the drawn portions of the clip, even though the depth of the clip is greater??? So in other words, this: //CODE SAMPLE #1 import mx.controls.ComboBox; mc = this.createEmptyMovieClip(triangle, 1); mc.beginFill(0x00aaFF, 100); mc.lineStyle(4, 0xFF, 100); mc.moveTo(0, 0); mc.lineTo(100, 100); mc.lineTo(0, 100); mc.lineTo(0, 0); this.createClassObject(mx.controls.ComboBox, my_cb, this.getNextHighestDepth()); for (i = 0; i 7; i++) { my_cb.addItem({label:i}); } trace(mc depth: +mc.getDepth()); trace(my_cb. depth: +my_cb.getDepth()); //cb depth is higher than mc as expected Vs. this: //CODE SAMPLE #2 (only diff. from CODE 1 is line 2) import mx.controls.ComboBox; mc = this.createEmptyMovieClip(triangle, this.getNextHighestDepth()); mc.beginFill(0x00aaFF, 100); mc.lineStyle(4, 0xFF, 100); mc.moveTo(0, 0); mc.lineTo(100, 100); mc.lineTo(0, 100); mc.lineTo(0, 0); this.createClassObject(mx.controls.ComboBox, my_cb, this.getNextHighestDepth()); for (i = 0; i 7; i++) { my_cb.addItem({label:i}); } trace(mc depth: +mc.getDepth()); trace(my_cb. depth: +my_cb.getDepth()); //cb depth is higher than mc as expected, //yet drop down is drawn BEHIND mc! Is this a bug with ComboBox? Is there any way to get the comboBox's dropdown in front of drawn content on mc while using getNextHighestDepth() for mc? Jason Merrill Bank of America Learning Organization Effectiveness - Technology Solutions ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: RE: [Flashcoders] ComboBox,Depth, Draw API - Bug?
I almost always shoehorn all my v2 components into their own movieclips so I can ignore DepthManager completely. If each lives in a separate clip, you know they can't interfere with the drawing API. -mark From: Merrill, Jason [EMAIL PROTECTED] Date: 2006/09/07 Thu AM 09:31:14 CDT To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com Subject: RE: [Flashcoders] ComboBox,Depth, Draw API - Bug? Thanks, I tried kTop and kTopmost as well, and it didn't work either. There is some kind of conflict between V2 components and the draw API depth which I can't seem to get DepthManager to solve. Jason Merrill Bank of America Learning Organization Effectiveness - Technology Solutions -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of Pete Miller Sent: Thursday, September 07, 2006 10:24 AM To: Flashcoders mailing list Subject: RE: [Flashcoders] ComboBox,Depth, Draw API - Bug? I think you want to avoid using kCursor. That is a special level reserved for, you got it, the cursor. There is also another special reserved level for combobox dropdowns which is set high enough to be above all normal levels. Try creating your combobox and the movieclip using DepthManager.kTop or kTopmost. -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of Merrill, Jason Sent: Wednesday, September 06, 2006 4:33 PM To: Flashcoders mailing list Subject: RE: [Flashcoders] ComboBox,Depth, Draw API - Bug? Hmm... I have been playing with the DepthManager class, alternatively trying: my_cb = DepthManager.createClassObjectAtDepth(mx.controls.ComboBox, DepthManager.kCursor); and setting the drawn on mc to HighestDepth or creating the ComboBox at usual depth and setting the depth of the movieClip being drawn on to DepthManager.kCursor and other static depths of the DepthManager class, with no luck. I can create the class object, but it still remains behind the drawn on movie clips. Any ideas? Jason Merrill Bank of America Learning Organization Effectiveness - Technology Solutions -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of Pete Miller Sent: Wednesday, September 06, 2006 3:41 PM To: Flashcoders mailing list Subject: RE: [Flashcoders] ComboBox,Depth, Draw API - Bug? Try tracing the value that you get from getNextHighestDepth(). If the result is 1048575, you are incorporating v2.0 components, which causes getNextHighestDepth() to be less than useful. Use DepthManager instead. This pointer isn't entirely related, but might help explaining why: http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_19435 P. -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of Merrill, Jason Sent: Wednesday, September 06, 2006 3:31 PM To: Flashcoders mailing list Subject: [Flashcoders] ComboBox,Depth, Draw API - Bug? Is this a bug? Try the sample code out below - Why is it that if you specify an explicit depth for a movie clip (SEE LINE 2 OF THE FIRST SET OF CODE BELOW) and draw on it with the draw API, and a comboBox made later with a depth of getNextHighestDepth() will have a drop down which displays over the drawn portion of the movie clip AS EXPECTED, but when you use getNextHighestDepth() on the movie clip (SEE LINE 2 OF THE SECOND SET OF CODE BELOW), the comboBox's dropdown is BEHIND the drawn portions of the clip, even though the depth of the clip is greater??? So in other words, this: //CODE SAMPLE #1 import mx.controls.ComboBox; mc = this.createEmptyMovieClip(triangle, 1); mc.beginFill(0x00aaFF, 100); mc.lineStyle(4, 0xFF, 100); mc.moveTo(0, 0); mc.lineTo(100, 100); mc.lineTo(0, 100); mc.lineTo(0, 0); this.createClassObject(mx.controls.ComboBox, my_cb, this.getNextHighestDepth()); for (i = 0; i 7; i++) { my_cb.addItem({label:i}); } trace(mc depth: +mc.getDepth()); trace(my_cb. depth: +my_cb.getDepth()); //cb depth is higher than mc as expected Vs. this: //CODE SAMPLE #2 (only diff. from CODE 1 is line 2) import mx.controls.ComboBox; mc = this.createEmptyMovieClip(triangle, this.getNextHighestDepth()); mc.beginFill(0x00aaFF, 100); mc.lineStyle(4, 0xFF, 100); mc.moveTo(0, 0); mc.lineTo(100, 100); mc.lineTo(0, 100); mc.lineTo(0, 0); this.createClassObject(mx.controls.ComboBox, my_cb, this.getNextHighestDepth()); for (i = 0; i 7; i++) { my_cb.addItem({label:i}); } trace(mc depth: +mc.getDepth()); trace(my_cb. depth: +my_cb.getDepth()); //cb depth is higher than mc as expected, //yet drop down is drawn BEHIND mc! Is this a bug with ComboBox? Is there any
RE: RE: [Flashcoders] ComboBox,Depth, Draw API - Bug?
Ah! Good idea. I never thought of that, and wish I had yesterday Thanks, I'll give that a go Jason Merrill Bank of America Learning Organization Effectiveness - Technology Solutions -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of John Mark Hawley Sent: Thursday, September 07, 2006 11:17 AM To: Flashcoders mailing list Subject: Re: RE: [Flashcoders] ComboBox,Depth, Draw API - Bug? I almost always shoehorn all my v2 components into their own movieclips so I can ignore DepthManager completely. If each lives in a separate clip, you know they can't interfere with the drawing API. -mark From: Merrill, Jason [EMAIL PROTECTED] Date: 2006/09/07 Thu AM 09:31:14 CDT To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com Subject: RE: [Flashcoders] ComboBox,Depth, Draw API - Bug? Thanks, I tried kTop and kTopmost as well, and it didn't work either. There is some kind of conflict between V2 components and the draw API depth which I can't seem to get DepthManager to solve. Jason Merrill Bank of America Learning Organization Effectiveness - Technology Solutions -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of Pete Miller Sent: Thursday, September 07, 2006 10:24 AM To: Flashcoders mailing list Subject: RE: [Flashcoders] ComboBox,Depth, Draw API - Bug? I think you want to avoid using kCursor. That is a special level reserved for, you got it, the cursor. There is also another special reserved level for combobox dropdowns which is set high enough to be above all normal levels. Try creating your combobox and the movieclip using DepthManager.kTop or kTopmost. -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of Merrill, Jason Sent: Wednesday, September 06, 2006 4:33 PM To: Flashcoders mailing list Subject: RE: [Flashcoders] ComboBox,Depth, Draw API - Bug? Hmm... I have been playing with the DepthManager class, alternatively trying: my_cb = DepthManager.createClassObjectAtDepth(mx.controls.ComboBox, DepthManager.kCursor); and setting the drawn on mc to HighestDepth or creating the ComboBox at usual depth and setting the depth of the movieClip being drawn on to DepthManager.kCursor and other static depths of the DepthManager class, with no luck. I can create the class object, but it still remains behind the drawn on movie clips. Any ideas? Jason Merrill Bank of America Learning Organization Effectiveness - Technology Solutions -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of Pete Miller Sent: Wednesday, September 06, 2006 3:41 PM To: Flashcoders mailing list Subject: RE: [Flashcoders] ComboBox,Depth, Draw API - Bug? Try tracing the value that you get from getNextHighestDepth(). If the result is 1048575, you are incorporating v2.0 components, which causes getNextHighestDepth() to be less than useful. Use DepthManager instead. This pointer isn't entirely related, but might help explaining why: http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_19435 P. -Original Message- From: [EMAIL PROTECTED] [mailto:flashcoders- [EMAIL PROTECTED] On Behalf Of Merrill, Jason Sent: Wednesday, September 06, 2006 3:31 PM To: Flashcoders mailing list Subject: [Flashcoders] ComboBox,Depth, Draw API - Bug? Is this a bug? Try the sample code out below - Why is it that if you specify an explicit depth for a movie clip (SEE LINE 2 OF THE FIRST SET OF CODE BELOW) and draw on it with the draw API, and a comboBox made later with a depth of getNextHighestDepth() will have a drop down which displays over the drawn portion of the movie clip AS EXPECTED, but when you use getNextHighestDepth() on the movie clip (SEE LINE 2 OF THE SECOND SET OF CODE BELOW), the comboBox's dropdown is BEHIND the drawn portions of the clip, even though the depth of the clip is greater??? So in other words, this: //CODE SAMPLE #1 import mx.controls.ComboBox; mc = this.createEmptyMovieClip(triangle, 1); mc.beginFill(0x00aaFF, 100); mc.lineStyle(4, 0xFF, 100); mc.moveTo(0, 0); mc.lineTo(100, 100); mc.lineTo(0, 100); mc.lineTo(0, 0); this.createClassObject(mx.controls.ComboBox, my_cb, this.getNextHighestDepth()); for (i = 0; i 7; i++) { my_cb.addItem({label:i}); } trace(mc depth: +mc.getDepth()); trace(my_cb. depth: +my_cb.getDepth()); //cb depth is higher than mc as expected Vs. this: //CODE SAMPLE #2 (only diff. from CODE 1 is line 2) import mx.controls.ComboBox; mc = this.createEmptyMovieClip(triangle, this.getNextHighestDepth()); mc.beginFill(0x00aaFF, 100); mc.lineStyle(4, 0xFF, 100); mc.moveTo(0, 0