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