Flash :: Xml - AS3 Loading XML Into Listbox
Mar 16, 2010I am able to load my XML file into flash and trace results. Want to populate listbox with information from xml file.
[Code].....
I am able to load my XML file into flash and trace results. Want to populate listbox with information from xml file.
[Code].....
im trying to load data from a mysql table to a listbox. ive figured out how to get the data from an XML file using this code:
Code:
var options:XML = new XML();
options.ignoreWhitespace = true;
[code].....
I'm populating a listbox like this: dp.addItem( {label:"red dress", data:"OV4MP/23OL.swf"} ); Instead of data:"OV4MP/23OL.swf", I would like to make part of the data file name a variable from a dynamic textbox named centerPt that belongs to the parent movieclip, so I did this: dp.addItem( {label:"red dress", data:"OV4MP/23"+MovieClip(parent.parent).centerPt.text+".swf"} );
[Code]....
I'm trying to use a listbox to instantiate a class. "SEA30_05_215_Single_Classroom" is a class that is loaded in using another function just fine. When I attempt to use the function below I get an error that says "Instantiation attempted on a non-constructor."Any ideas how to either fix the error or do it a different way? It seems like it should be a fairly simple thing to instantiate a class using a list box..[code]
View 4 RepliesThis is a Flash MX actionscript question - I thought that it would be a cool usability thing if, when the user gets to the bottom of the listbox, it scrolls down one or two places automatically.
View 4 Repliesi want to amke one application in flash same functionality what is can u guys tell me how to make selection of one item in combobox to update the value of the listbox below and how to make the different folders and subfolders with icon as they have done
View 4 Repliesi am using flash listbox component in my project. and i want to it's text alignment form left to right and it's scrollbar position is right to left.
View 1 RepliesIs there a way to modify the text size of text added to a ListBox Component in Flash MX?
View 1 RepliesThe Listbox is populated with the category and the image and caption is being shown in the correct place but the list box doesn't function and the images cycle through all and not just the ones in that category.Here is my code
Code:
var ssx:XML = new XML();
ssx.ignoreWhite = true;[code]...........
I've been going crazy trying to figure out a couple things, spent the last few days scouring the forums and my understanding of actionscript and php aren't advanced enough to understand what I need to do.I have a very basic contact form (one I've successfully used before) that I thought I would adapt for a new project (to include a couple listboxes).In Flash, visitors enter name and contact info, then we want a listbox for them to select an event on a specific day, then another one that they select a time (both listboxes will be populated within flash, so no dynamic loading).
They hit Submit and the form information is sent to our email address using php.The first difficulty I had was how to capture the selection of the listbox. I don't know much about actionscript, but I thought that would be pretty straight forward and was hoping I'd find something in the community to keep it simple for people like me.
Then to send it to the php email document, I'm not sure how to treat it the standard text is easy to prep for php but I'm at a loss on the listbox-selected items.Right now I try to fill out the form, I hit submit, and get a message: undefined.I commented out the second listbox so I could just focus on getting one to work, but I'm not sure which stage I'm doing it wrong.[code]I think the php is good, and pretty sure I just don't know what I'm doing with the listbox selection.
i have to use listbox for air for android. But when i type in import fl.controls.List, i get the error: can't find definition fl.controls:Listeven when i use fl.controls.* it gives the same error.i found out that its becouse fl.controls.List is made for the following:Language Version: ActionScript 3.0Product Version: Flash CS3Runtime Versions: Flash Player 9.0.28.0, AIR 1.0(i got this from i use flash cs5.5 en air for android. does any1 know how i can use a listbox for air for android?
View 5 RepliesSo I have a list box on stage with the instance name "lb" I'm trying to get some text from my xml list into this list box? In this case the @TITLE data.
I'm able to trace the data from the xml file into the output window, but I can't figure how to display that text in the list box.
[Code]...
I am trying to load a listbox through xml and my script does not seem to work at adding the items. Here it is...
[Code]...
i have an xml file set up like this.
[Code]...
'list' is the instance name i gave the ListBox Component. But when i test it the list box says Undefined, Undefined?
I am trying to load a listbox through xml and my script does not seem to work at adding the items. Could someone please look over the script and tell me what is wrong? Here it is...
Code:
Prog_xml.load(Programs.xml)
xml.onLoad = function (success){[code]....
How do i loop through a listbox looking for a specific value??
View 1 RepliesHere's my listBox code for a listBox called myList (pretty basic):
var xml:XML;
function onLoaded(e:Event):void {
xml = new XML(e.target.data);
[Code].....
In addition to the text label (to the left of it, actually), I'd like to have a square icon (an image thumbnail) with each row in the list.
I'm working to update a project that was created by someone else who left our company. It was done in AS2, so I'd like to keep it that way (without updating all the code to AS3). Here is a section of code that currently works:
var item = {Rank:rank, City:city, Reps:representatives, RepsWithSales:RepsWithSales, Appts:appts, AvgSales:FormatAsDollars(average)};
topSales.addItem(item);
[code].....
i have a listbox which gets data striaght from my sql database and i was wondering how i could link each value with in the list box to each frame so that when a item is selected in the list box it goes to a frame like how button uses gotoandplay as such
this is my code which i use to get the data from the database
var theXML:XML = new XML();
theXML.ignoreWhite = true;
theXML.onLoad = function() {
[Code].....
I have created a button when clicked it validates A listbox checking for a value if the selected index =0. I want it to run another .swf
Here is ActionScript Code:
submit_btn.addEventListener(MouseEvent.CLICK, play);
function validate(event:MouseEvent):void{
if (question1_combo.selectedIndex ==0)
(RUN SWF here)
else
trace ("not worked");
}
I searched and didn't find quite the right solution. Please bare with me as I am a complete infant with this.Using a component listbox in CS4. I have figured out how to call in formatting to the text by using this:Code: Select allimport fl.managers.StyleManager; var tf:TextFormat = new TextFormat(); at the head, and referring to it below, with:
Code: Select alltf.font = "Arial";
tf.size = 10;
tf.bold = false;
[code]....
I know how to change the font in a listbox, but when I do it (to a font like courier, for example) all of the "deep" characters get cropped (gjpqy).
I can't find the StyleProperty that controls line height or line spacing.
I just want to deselect everything in a listbox. I have tried:
[AS]
myList_list.selectedItem = null;
myList_list.selectedItem = undefined;[/AS]
but it wont work.
Kudos to the person who can successfully change the rowHeight of this listbox. It's a V1 Component and that seems to be the problem since using this code: songList_lb.rowHeight = 30; works for me in V2 but not in V1. Since I need to customize the look of the listbox scrollers I have to stay with V1.
View 1 RepliesI used Digitalosophy's tute to create my Flash form using ASP to write to an Access DB with 1 deviation. In addition to 5 text inputs I used a Flash component list box. It is the only element that is passing empty data to the DB. I have both label & data fields filled out and I am using the following AS on the submit button
on(press){
loadVariablesNum
("processForm.asp",0,"post");
gotoAndStop(5);
}
I am guessing I need to use AS to assign a variable to the list box component as it only has an instance name field, unlike the dynamic text fields. Not having any luck googling the correct syntax though as most examples are of querying a data base not writing.
flash cs3 here I cant change the compnonent lists font values - in particular the font color...
I can use this and it works fine
Code:
playList.setStyle("contentPadding", 50);
but this has no effect?!?!
Code:
playList.setStyle("color", "red");
Does anyone have a list of styles that can be changed in a list? or a reference to them?
i want to fill a listbox with data from a MySql table. the code ive gotten working is for static data from an xml file. here it is:
var options:XML = new XML();
options.ignoreWhitespace = true;
var loader:URLLoader = new URLLoader(new URLRequest("fillRegions.xml"));
[Code]....
this creates an echod file that looks just like the above xml example. so, how do i change my original AS3 code to pull data from this php file rather then the xml file?
I am working on a selector that uses 2 list boxes. Standard stuff, you can move items from the left box with arrow buttons to the right box. However I can't seem to get the annoying green "halo" to go away whenever one of the boxes is selected. I have tried
lstbox._focusrect = false;
lstbox.enabled = false;
lstbox.setStyle("themeColor", "Sample");
Nothing seems to stop that highlight box from popping up. Funny thing is it doesn't pop up in the IDE only when I view the movie online in production.
Is there a way I can change the stage colour using a list box for example Inside a list colours -
-Red
-Green
-Blue
When the user chooses red, the stage colour would change to red.
I suppose to load a xml into flash n convert it into an array. After which im suppose to place them in listbox so that ppl are able to select them to view different stuff. Apparently, im unable to get the selected value of the listbox. With this, the users cannot select n the whole thing doesnt work. With array, im suppose to use getSelectedItem to get the value.. but it always ends up in a error "[type function]"
Code:
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("../XMLs/features_index.xml");
[code]....