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








Populate Combobox From SQL W/ ASP


I need help populating a combo box in flash MX from a SQL server 2K DB using ASP. Does anyone have an actionscript and asp page to do this? Any help would be greatly appreciated!




DevShed > Flash Help
Posted on: July 28th, 2003, 04:22 PM


View Complete Forum Thread with Replies

Sponsored Links:

How To Populate A ComboBox?
OK, so i need to populate a comboBox component with an XML file. Here is how my XML reads-

<?xml version="1.0"?>
<cellPhoneText>
<downLoadRingToneText>TEXT HERE</downLoadRingToneText>
<ringtoneText>RINGTONE</ringtoneText>
<youHaveSelectedText>YOU HAVE SELECTED:</youHaveSelectedText>
<previewText>PREVIEW</previewText>

<selectYourWirelessCarrierText>
<company companyName="Company"></company>
<company companyName="Company"></company>
<company companyName="Company"></company>
<company companyName="Company"></company>
<company companyName="Company"></company>
</selectYourWirelessCarrierText>
</cellPhoneText>

Here is how my Actionscript reads-

getXML("cellphone.xml", "xmlData", nextStep);
function nextStep() {
gotoAndPlay("2");
}

//////// This is the code on frame 2 that I need to edit

downLoadRingToneText_mc.txt.autoSize = "left";
downLoadRingToneText_mc.txt.wordWrap = false;
downLoadRingToneText_mc.txt.text = xmlData.cellPhoneText.downLoadRingToneText._value;

ringtoneText_mc.txt.autoSize = "left";
ringtoneText_mc.txt.wordWrap = false;
ringtoneText_mc.txt.text = xmlData.cellPhoneText.ringtoneText._value;

youHaveSelectedText_mc.txt.autoSize = "left";
youHaveSelectedText_mc.txt.wordWrap = false;
youHaveSelectedText_mc.txt.text = xmlData.cellPhoneText.youHaveSelectedText._value;

preview_mc.previewText_mc.txt.autoSize = "left";
preview_mc.previewText_mc.txt.wordWrap = false;
preview_mc.previewText_mc.txt.text = xmlData.cellPhoneText.previewText._value;


//selectCarrier_cb.autoSize = "left";
//.wordWrap = false;
selectCarrier_cb.list = xmlData.cellPhoneText.selectYourWirelessCarrierTex t._value;
//selectCarrier_cb.selectWirelessArrow_mc._x = selectCarrier_mc.selectYourWirelessCarrierText_mc. _width+2;

OK, the comboBox name is "selectCarrier_cb". How do I populate it with the <selectYourWirelessCarrierText> node?

View Replies !    View Related
[CS3] Populate Combobox With XML
How can I populate this XML in a combobox using AS2?

<shop> as label and <email> as data.



Code:
<document>
<item>
<shop>Shop 1</shop>
<email>Email 1</email>
</item>
<item>
<shop>Shop 2</shop>
<email>Email 2</email>
</item>
</document>

View Replies !    View Related
Populate A Combobox
Hello,

I am trying to figure out how to populate a combobox from a text file. Can anyone help me. I have seen the tut in kirupa but it is not clear enough for me.

Can someone help me?

Thank you

Barzalou

View Replies !    View Related
Populate Combobox
Is there a way to load an external txt file into a combo box.

View Replies !    View Related
Populate ComboBox From Database?
On my website, I want to have a Flash ComboBox menu of countries, and when a country from the menu is selected, the browser (GetURL) goes to a specified page.

I have an Access database that lists the countries. Using ASP, how do I populate the Flash ComboBox menu from that database? I want to pull out the list of country names from the database and have them appear in the ComboBox menu.

How do I do that? (I have no clue and I haven't been able to find a tutorial on it.)

Some background info: The site can run ASP and Access. I am using the ComboBox UI component in MX.

Any help you can offer is greatly appreciated! Thanks!!

View Replies !    View Related
[as3] Populate A Combobox From External Xml?
Howdy
What I have atm is a combobox with types of products in it. Thanks to arsenik I've finally gotten to the next frame (whoo). My question now is, how do I populate a new combobox using the product names from an external xml file?
I've already loaded the xml file so I don't need that code.
What I want is for the names of the products in the label and the child number in the data field (product.type.name[n] - I want n in the data field).

Has been driving me mad for nearly two days! (have been working on this while trying to get the previous frame to work right as well)

View Replies !    View Related
Populate Array From ComboBox
Hi,

I'm currently working on a project where I have a user defined list of urls which is saved in a local SO. When the movie is loaded the ComboBox is populated with the values from the SO (Stored as array inside SO).

I want to give users the option to remove items from this list. So far I have managed to remove the selected item from the combo box, clear out the SO and loop the remaining ComboBox items, but, when I try and load these item into an array to parse back to the SO, the array is created and creates the correct amount of elements, but, each element is populated with only the data from the 0 index item of the ComboBox. Anyone got any ideas? :? :? :?

My code so far: (This sits inside a button component and is invoked onClick)

_root.ComboBox.removeItemAt(_root.ComboBox.selectedIndex);
_root.ComboBox.selectedIndex = 0;


_root.local_data.clear();

var dataArray = new Array();
newFeed = new Object();

for (var i=0; i<_root.ComboBox.length; i++) {

newFeed.site = _root.ComboBox.getItemAt(i).data;
newFeed.siteurl = _root.ComboBox.getItemAt(i).label;

dataArray.push(newFeed);

}

_root.local_data.data.myList = dataArray;
_root.local_data.flush();

Thanks in advance.

View Replies !    View Related
Populate Both Data And Labels Into ComboBox
How can I tell the comboBox through ActionScript what its Data is (i.e., 0,1,2,3,...) and to function based on that and still load Labels in though Script also? (All examples I've found function on the Label.)

I have created a slide show that uses a Flash MX comboBox as a jump menu. It also has next and previous buttons to advance one slide at a time. It works fine if I load the Labels and Data in the Properties Inspector.

I can successfully populate the comboBox using ActionScript with Labels, but I want to add the ActionScript so it will function based on Data 0,1,2,3,4,... (rather than function based on the Label title).


Here's my code:

slideTitles = "Slide 1|Slide 2|Slide 3";
theSlideTitles = slideTitles.split("|");

//Populate Combo Box
for (i=0; i<theSlideTitles.length; i++) {
comboBox.addItemAt(i, theSlideTitles[i], theSlideTitles[i]);
}

// Sort the List
comboBox.sortItemsBy("Label", "ASC");

NEED HELP ON CODE AROUND HERE.

function jump() {
theItem = comboBox.getSelectedIndex();
theValue = comboBox.getValue(theItem);
if (theValue == 0) {
gotoAndStop("L1");
slideNumber = "Slide "+1;
loadMovie("movie.swf", 1);


Thanks for any help.

SeeMore

View Replies !    View Related
Populate Flash2004Pro ComboBox With XML String
Hi,

I have a combobox, and an XML string (which comes from a web service):

code:
<countries><country label="Andorra" data="37" /><country label="Austria " data="38" /><country label="Belgium" data="39" /><country label="Bulgaria" data="40" /><country label="Croatia" data="41" /><country label="Cyprus" data="42" /><country label="Czech Republic" data="43" /><countries>

.... etc

I want to bind the combobox to the XML string. How do I go about this. I know that I can iterate through the XML nodes and use the addItem method, but I believe that this is slower than binding to a dataset.

Any help appreciated.
GW

View Replies !    View Related
Populate Combobox With Titles And Url Links
Hi all - okay I'm trying to populate a combobox with links and urls from an xml file. I've got the xml data no worries, but I'm having fun getting it into the combo box.

I want the box to show the title and to follow the link when selected. Any help please! Preferrably in code form as I've looked over several tuts on this site and others to no avail.

I'm using 04pro.

thanks

frank

View Replies !    View Related
Populate ComboBox Inside AttachedMovie?
I can NOT seem to target my comboBoxes that are inside a movieClip that is being attached to the stage from the library.

Is this a known bug or issue?..I can populate my comboBox anywhere else..even nested inside other movieClips (created at authoring time)..

Is there a way to "pause" your code..after I attach the clips to the stage..and before I loop through my XML to populate the combo boxes??

the reason I ask..is I have been searching & searching...and I stumbled upon a thread that stated he thought the combo boxes were created/initialized fast enough to be populated.... possible scenario??

can anyone else sucessfully populate a comboBox (externally)inside of a clip you attach to the stage from the library?

Thanks..

View Replies !    View Related
Populate Array From Combobox Items
Hi,

I'm currently working on a project where I have a user defined list of urls which is saved in a local SO. When the movie is loaded the ComboBox is populated with the values from the SO (Stored as array inside SO).

I want to give users the option to remove items from this list. So far I have managed to remove the selected item from the combo box, clear out the SO and loop the remaining ComboBox items, but, when I try and load these item into an array to parse back to the SO, the array is created and creates the correct amount of elements, but, each element is populated with only the data from the 0 index item of the ComboBox. Anyone got any ideas?

My code so far: (This sits inside a button component and is invoked onClick)

_root.ComboBox.removeItemAt(_root.ComboBox.selecte dIndex);
_root.ComboBox.selectedIndex = 0;


_root.local_data.clear();

var dataArray = new Array();
newFeed = new Object();

for (var i=0; i<_root.ComboBox.length; i++) {

newFeed.site = _root.ComboBox.getItemAt(i).data;
newFeed.siteurl = _root.ComboBox.getItemAt(i).label;

dataArray.push(newFeed);

}

_root.local_data.data.myList = dataArray;
_root.local_data.flush();

Thanks in advance

View Replies !    View Related
How To Populate A ComboBox Properly With Flash Remoting
Hi

Got a question about ComboBox, I am populating a ComboBox with Flash Remoting. Currently I want to pull a Name column from a database. Right now I am populating a dataset. The ComboBox pulls from the dataset. However the Combobox displays the Name column plus two other columns.

How can I send out from the dataset just the Name Column to the ComboBox?

I include some code if it helps.
Thank you


Code:
#include "NetServices.as"
var frGatewayURL = "http://localhost/flashremoting/gateway.aspx";
var frServiceName = "test";

this.onLoad = function() {
NetServices.setDefaultGatewayUrl(frGatewayURL);
var frConnection = NetServices.createGatewayConnection();
var frService = frConnection.getService(frServiceName, this);

frService.getProjects();
}
function getProjects_Result(result) {
//projects is a dataset
projects.dataProvider = result;
}

function getProjects_Status(error) {
trace("-------- Remoting Error ---------");
this.type_txt = error.type;
this.desc_txt = error.type;
trace(error.type);
trace(error.description);
trace("---------------------------------");
}

View Replies !    View Related
How To Populate A ComboBox Properly With Flash Remoting
Hi

Got a question about ComboBox, I am populating a ComboBox with Flash Remoting. Currently I want to pull a Name column from a database. Right now I am populating a dataset. The ComboBox pulls from the dataset. However the Combobox displays the Name column plus two other columns.

How can I send out from the dataset just the Name Column to the ComboBox?

I include some code if it helps.
Thank you


Code:
#include "NetServices.as"
var frGatewayURL = "http://localhost/flashremoting/gateway.aspx";
var frServiceName = "test";

this.onLoad = function() {
NetServices.setDefaultGatewayUrl(frGatewayURL);
var frConnection = NetServices.createGatewayConnection();
var frService = frConnection.getService(frServiceName, this);

frService.getProjects();
}
function getProjects_Result(result) {
//projects is a dataset
projects.dataProvider = result;
}

function getProjects_Status(error) {
trace("-------- Remoting Error ---------");
this.type_txt = error.type;
this.desc_txt = error.type;
trace(error.type);
trace(error.description);
trace("---------------------------------");
}

View Replies !    View Related
Populate Combo Box With XML
If i have this XML..

<?xml version="1.0"?>
<creature>
<category id="mammal" has="hairy_skin,mouth,warm_blood">
<species id="cat" has="fur,tail,whiskers">
<breed id="tiger" has="stripey_fur"/>
<breed id="lion" has="brown_fur,mane"/>
<breed id="panther" has="black_fur"/>
</species>
<species id="dog" has="hair,tail,wet_nose">
<breed id="labrador" has="soft_hair"/>
</species>
<species id="pig" has="snout,trotters"/>
<species id="cow" has="nose,hooves"/>
</category>
<category id="reptile" has="scaly_skin,mouth,cold_blood">
<species id="lizard" has="tail,legs">
<breed id="iguana" has=""/>
</species>
<species id="snake" has="tail,no_legs,forked_tongue">
<breed id="cobra" has="hooded_head">
<subbreed id="greatcobra" has="big_hood"/>
</breed>
</species>
</category>
<category id="bird" has="feathers,beak,wings,warm_blood" />
<category id="fish" has="scales,mouth,cold_blood">
<species id="mullet" has="thick_lips"/>
<species id="pike" has="sharp_teeth"/>
</category>
</creature>

would there be a way to get all the breed and subbreeds to fill up a combo box?

Does any one have any actionscript examples?
many thanks

View Replies !    View Related
Xml Won't Populate My Stuff Man
this is what my component looks like...
All traces work, but my text fields and my empty movie clip won't load the xml. What's wrong in here?

#initclip
XMLNav = function () {
this.PlayerPic = new Array();
this.PlayerName = new Array();
this.PlayerStats = new Array();
this.PlayerPosition = new Array();
};
XMLNav.prototype = new MovieClip();
XMLNav.prototype.parentXML = function(node) {
var subNode = node.firstChild;
while (subNode != null) {
this.PlayerPic.push(subNode.childNodes[0].childNodes[0]);
this.PlayerName.push(subNode.childNodes[0].childNodes[1]);
this.PlayerStats.push(subNode.childNodes[0].childNodes[2]);
this.PlayerPosition.push(subNode.childNodes[0].childNodes[3]);
subNode = subNode.nextSibling;
}
this.setupCards();
};
XMLNav.prototype.setupCards = function() {
trace("setting up cards!");
for (i=0; i<=this.PlayerPic.length; i++) {
card = this.attachMovie("cardClip", "cardClip"+i, this.getTopDepth);
card._x = 20;
card._y = 20*i;
card.pic.loadMovie(this.PlayerPic[i]);
card.playerName.text = this.PlayerName[i];
card.playerStats.text = this.PlayerStat[i];
card.playerPosition.text = this.PlayerPosition[i];
}
};
XMLNav.prototype.getTopDepth = function() {
if (this.myTopDepth == null) {
this.myTopDepth = 100;
return this.myTopDepth;
} else {
this.myTopDepth++;
return this.myTopDepth;
}
};
//object registration
Object.registerClass("XMLNavLoader", XMLNav);
#endinitclip
I know my xml is cool. What could be wrong here?
Thanks

View Replies !    View Related
Populate A Datagrid
Hello, i must create a system of static in flash.
The date are received into flash by socket, but i try with a file txt.
I want to use the datagrid component but a have some problem to populate dinamically the component.

I have some problems to add item beacuse this action is wrong:


var anObject= {name:"Jim!!", age:30};
var addedObject = myGrid.addItem(anObject);

dinamically

// after populate two array:

var anObject= {name_array[0]:data_array[0]}
var addedObject = myGrid.addItem(anObject);

If i write name of column all work.

i make an example:

www.prestigiacomouomo.it/grid.zip


sorry for my english but i'm an italy web developer

View Replies !    View Related
How Do I Populate A List Box Through XML?
I have a list box containing a set of links.. and i need to my client to be able to add links on their own (and they obviously can't change the Flash files...or they wouldn't have hired me in the first place) currently i have a list box compoinent being populated through code... i need to do it through XML... HOW WOULD I GO ABOUT DOING THIS?.... here is the code i currently have populating the list box:
Code:
this._lockroot = true;
//=================================//
// import the class
import mx.controls.List;
// the instance name
var myListBox:List;
// an array which holds the data and labels used in the combobox
var myDataProvider:Array = new Array();
//============= LINKS ARRAY =============//
myDataProvider = [{label:"CURRENT LISTINGS", data:"/BCPshowsheet_updated.html"},
{label:"MLS PIN", data:"http://www.mlspin.com"},
{label:"GREATER BOSTON REAL ESTATE BOARD", data:"http://www.gbreb.com"},
{label:"OGUNQUIT SUNRISE PROPERTIES", data:"http://www.ogunquitsunriseproperties.com"},
{label:"ELEO REAL ESTATE", data:"http://www.eleorealestate.com"},
{label:"BOSTON.COM", data:"http://www.boston.com"},
{label:"APARTMENTS.COM", data:"http://www.apartments.com"},
{label:"REALTOR.COM", data:"http://www.realtor.com"},
{label:"WEATHER.COM", data:"http://www.weather.com"}];
// specify that the array is the listbox's dataProvider
myListBox.dataProvider = myDataProvider;
// create a on object
var myListBoxListener:Object = new Object();
myListBoxListener.change = function() {
// for debugging purposes only: make sure you have the correct data selected
trace(myListBox.selectedItem.data);
getURL(myListBox.selectedItem.data, "_blank");
};
// make the object a listener, which "listens" when you select an item
myListBox.addEventListener("change", myListBoxListener);


thanks in advance

View Replies !    View Related
Populate Combo Box Via XML
I have a combo box that I would like to populate with the data in the first node (node name is Honor) of my xml file using actionscript. I'm using Flash 8. How do I do that?

I have this to make the combo box which is fine...
var testBox:ComboBox = attachMovie("ComboBox", "test_cb", this.getNextHighestDepth());
testBox._x = 300;
testBox._y = 100;

I have this as well...
var xmlQuery = new XML();
xmlQuery.ignoreWhite = true;

View Replies !    View Related
[F8] Is It Possible To Populate An Array With...
...file names from a local folder?

I know this is possible using php, but I was wondering if it could be accomplished using flash alone and if anybody had any ideas how to do it.

Thanks in advance.

View Replies !    View Related
[CS3] How To Populate This Script From Xml
Hi,

How do I rewrite this to populate the memberInfo from xml? I also need to include an image.

[color=Navy]
//Array with all our information
memberInfo = [["Name", "My hobbies and aothe info", "http://www.lala.com/forum/member.php?u=1"], ["B.Rich", "Basketball, Golf, Web Media.", "http://www.lala.com/forum/member.php?u=4513"], ["Senocular", "Fun stuff, like Flash", "http://www.lala.com/forum/member.php?u=2867"]];
//Starting x & y values
var xPos = 150;
var yPos = 60;
//For loop to attach our container movieclip and pass the array information
for (i=0; i<memberInfo.length; i++) {
//attach the container clip
attachMovie("container", "new"+i, i, {_x:xPos, _y:yPos});
//increase the y postion each time
yPos += this["new"+i]._height+5;
//add the information
this["new"+i].name.text = memberInfo[i][0];
this["new"+i].interest.text = memberInfo[i][1];
this["new"+i].link = memberInfo[i][2];
}

Tx, B

View Replies !    View Related
Populate Combo Box
Hi
I have a combox in my mxml application with id "ncmb3".It should have
values "AM/PM","AM","PM".
I need to acces these values from an xml file.The xml file is uploaded
But iam not able to access the values.
My mxml code is as follows:

[Bindable]
public var externalXML:XML;
public function initDemoApp():void
{
var loader:URLLoader = new URLLoader();
var request:URLRequest = new URLRequest("ScheduledConf.xml");
loader.load(request);
loader.addEventListener(Event.COMPLETE, onComplete);
}


public function onComplete(event:Event):void
{
var loader:URLLoader = event.target as URLLoader;
if (loader != null)
{
externalXML = new XML(loader.data);
trace(externalXML.toXMLString());
loadProperties(externalXML);
populatecombo(externalXML);
}
else {
trace("loader is not a URLLoader!");
}
}


private function populatecombo(externalXML:XML):void
{
var comboArray:ArrayCollection = new ArrayCollection();
for (var i:int=0;i<externalXML.list.length();i++)
{
ncmb3.text=externalXML.list.rampm[i];
comboArray.addItem({label:ncmb3.text});
}

}


<mx:ComboBox id="ncmb3" width="76" styleName="datePage" height="22"
fontSize="9" textAlign="left"/>

The XML file is as follows:


<properties>
<list>
<rampm label ="AM/PM"></rampm>
<rampm label ="AM"> </rampm>
<rampm label ="PM"> </rampm>
</list>
<properties>
Can anyone tell where am i going wrong?


Thanx in advance
Sheetal

View Replies !    View Related
Populate A Grid With Different Mcs
Code:
var xPosition:Number = 195;
var yPosition:Number=100;

for(var i=0;i<6;i++) //left to right cube row
{
for (var j= 1; j<=6; j++) //up to down cube row
{
depth = getNextHighestDepth();
attachMovie("cube5", "cube1"+depth, depth);
this["cube1"+depth]._x = xPosition;
this["cube1"+depth]._y = yPosition;
xPosition += this["cube1"+depth]._width + 10;
}
xPosition=195;
yPosition+=this["cube1"+depth]._height + 10;
}
Ok, I have this code to make a 6 x 6 cube grid... so I have 36 cubes attached on my stage, but every cube is the same movie clip and I have 6 different cube movie clips on my library... how can I do to populate this grid using random mcs so I will get a new grid every time grid is created???


Thanks

View Replies !    View Related
Populate Text Box
Hi,
I have a dynamic text box on stage. I have a programme which loops through numbers 1 to 5 (when a button is pressed). I want the numbers to be displayed, on different lines in the text box. However I only get the last number,5 displayed. What I want in the text box is:
1
2
3
4
5


How can this be done ?

Thanks,
Paul








Attach Code

placeTxt_btn.onRelease = function (){
for (var J:Number = 1; J < 6; J++) {
my_ta.text = "The No. is " + J +"
";
}
}

View Replies !    View Related
Form To Populate SQL DB?
Hi:
I have been tasked with creating an online course evaluation form. This form will be used by our client students to give us feedback on the courses they take with us.

I have two needs:

ONSITE - I need a good tutorial on how to create a form in Flash that will populate a SQL DB. Students will complete the form when onsite at our HQ. This form will be on our intranet and will directly feed the SQL DB.

OFFSITE - OK. This is the more challenging issue. Our trainers tell us that many of our clients (believe it or not) do not have or allow internet access to the PCs used for training at their site. So, the students cannot use our online form (even though we could put it on the internet).

Can I modify the Flash form used for onsite, for the offsite? The trainer would install the file and the Flash plug-in if needed on the client's PC. The student would complete the form and the Flash form would store their responses to their local PC. The trainer would then copy the output file to a jump drive. When the trainer returns to HQ, he/she would need to be able to import those responses to the SQL DB.

How can I do this and make it relatively simple for the trainer?

Thanks,
Loren

View Replies !    View Related
Dynamically Populate XML
I would like to make a player that viewers could upload a song or a flv and they would be automatically added to the XML play list. Is that possible with modest programming skills?

View Replies !    View Related
Populate Combo Box With XML
if i have this XML..

<?xml version="1.0"?>
<creature>
<category id="mammal" has="hairy_skin,mouth,warm_blood">
<species id="cat" has="fur,tail,whiskers">
<breed id="tiger" has="stripey_fur"/>
<breed id="lion" has="brown_fur,mane"/>
<breed id="panther" has="black_fur"/>
</species>
<species id="dog" has="hair,tail,wet_nose">
<breed id="labrador" has="soft_hair"/>
</species>
<species id="pig" has="snout,trotters"/>
<species id="cow" has="nose,hooves"/>
</category>
<category id="reptile" has="scaly_skin,mouth,cold_blood">
<species id="lizard" has="tail,legs">
<breed id="iguana" has=""/>
</species>
<species id="snake" has="tail,no_legs,forked_tongue">
<breed id="cobra" has="hooded_head">
<subbreed id="greatcobra" has="big_hood"/>
</breed>
</species>
</category>
<category id="bird" has="feathers,beak,wings,warm_blood" />
<category id="fish" has="scales,mouth,cold_blood">
<species id="mullet" has="thick_lips"/>
<species id="pike" has="sharp_teeth"/>
</category>
</creature>

is there any standard code that i could use to fill up a combo/pull down menu with this information?

many thanks

View Replies !    View Related
Populate Arrays Dynamically?
I have a 3d array which I need to populate. i have 3 sections each with 3 pages, each with 3 dynamic text boxes.

section - new Array();
page = new Array();
elements = new Array();

section = page[elements[x]];

so i can reference any value eg

// reference the 3rd text box on page 2 of section 1 =
textvalue = section[0][1][2];

my problem is the setting up of the arrays and input text to set a value to the 3d array:

inputtext = _root.section[page[element[1]]];

does not work.

Can anybody suggest a way to do this dynamically ?

Thanks

View Replies !    View Related
How Do I Populate A Chart From Components W MX
I have an MX movie with variables: Yr1, Yr2, Yr3.... and Sum1, Sum2, Sum3....
I want to show these values in a chart from Charting Components
I want to set the Chart xAxis Labels to Yr1,... and the Chart y Values to Sum1,...
My chart instance is named MyChart.
Obviously in the parameters section I can hardcode these labels and data values but I want them dynamic.
===============================================
The following works for setting other attributes:
MyTitle="My Own Chart"
MyChart.setChartTitle(MyTitle);
or
MyChart.setChartTitle("My Own Chart");
similarly:
MyChart.setxAxisTitle("Years")
================================================
but I haven't figured out how to populate the meat of the chart.
These don't work:
MyChart.setValueSource(Sum1,Sum2....)
or
var ArrValues[Sum1,Sum2...]
MyChart.setValueSource(ArrValues)
or
MyChart.setDataProvider(ArrValues)

Any Help?

View Replies !    View Related
How To Populate The TREE Component?
I am trying to dynamically populate the tree component either by using XML or PHP. I am using Flash MX 2004 Pro but ideally I am looking for a solution to the original FTree component(version 1 architecture) instead of the new Tree component that comes with MX 2004 but I'll take anything I can get.

Does it have anything to do with setDataProvider ???
Thanks
John

View Replies !    View Related
Populate Dataset From Array
Hi,

I have a 2 dimensional array which I want to use as a data source for a datagrid.

The array is something like this:

source = new Array(new Array("COL1-ROW1","COL2-RO"1","COL3-ROW1"), new Array("COL1-ROW2","COL2-ROW2","COL3-ROW2"), new Array("COL1-ROW3","COL2-ROW3","COL3-ROW3"));

How do I map this to my datagrid?

Thanks in advance.
GW

View Replies !    View Related
Using A For Loop To Populate An Array
Really trying to get my head around this but still need help... please.

What I am trying to achieve is to populate 8 instances of orange_mc, 6 instances of pear_mc etc. etc. and drag and drop them over different target area. I am thinking that the trace should give me the following: orange_mc1, orange_mc2, orange_mc3 etc. Neither this nor the drag is working. What am I missing? Want to repeat this for all items in the array.

code:
var fruit:Array = new Array();

fruit[0] = "orange_mc";
fruit[1] = "pear_mc";
fruit[2] = "apple_mc";
fruit[3] = "banana_mc";
fruit[4] = "kiwi_mc";

var newOrange
for (var i=0; i<8; i++){
newOrange[i] = newOrange["orange_mc", + i];
trace(newOrange);

_root.newOrange.onPress=function() {
this.startDrag();
}
}

View Replies !    View Related
Populate Array From A Database?
can anyone help me figure out how to populate an array based on a flash search sent to ASP and from ASP to a MS Access database... like a set of instructions..

ex. you search for step 2 to 5. flash sends the variables 2 and 5 to the ASP, asp searches in the database for the steps, the steps return (2,3,4,5) to asp and somehow display some instructions to flash to execute the array in that order.

i might be totally off by the logical flow, could someone help me out? thanks!

View Replies !    View Related
Populate Textboxes From Database
My application has 4 text boxes and I would like to use webservices to read in values from a database. (Database fields are: UserID, UserName, UserEmail, UserPhone)

I am able to use the WebServiceConnector to read the UserName value into the textbox. What I'd like to do is have all the textboxes populated for a particular UserID. How can I do this?

Thanks in advance!!

View Replies !    View Related
Combo Box Populate With PHP Question.
I have a PHP page which gives me this information.
pics=6&pic1=image/seaside1.jpg&pic2=image/seaside2.jpg&pic3=image/seaside3.jpg&pic4=image/seaside4.jpg&pic5=image/seaside5.jpg&pic6=image/stjoseph1.jpg&var=pics=6&pic1=image/seaside1.jpg&pic2=image/seaside2.jpg&pic3=image/seaside3.jpg&pic4=image/seaside4.jpg&pic5=image/seaside5.jpg&pic6=image/stjoseph1.jpg

I would like a combo box to show me a list of the items and then upload the image in flash. I placed a combo box on the stage and called it combo. I somehow need it to list "seaside1.jpg", "seaside2.jpg" . . . . and so on. Then upload that image. Here is all that I have so far. Whats next?

combo.addItem("-- select image --");
loadVariablesNum("image/jpeegs.php", 0, "POST");

View Replies !    View Related
Populate DataGrid Dynamically
Hi,

I have been looking at some tutorials on the net on how to populate the DataGrid component dynamically; however, all of them used XML files!

I actually want to link a DataGrid in Flash to MYSQL database through PHP.
Is there any simpler way of doing that please?

Any suggestions will be very appreciated.

Thanks in advance.

RE

View Replies !    View Related
Trying To Populate Datagrid, With Xml, From Within Class
Don't know if this is possible, but I would like to populate a datagrid that is on the stage with some loaded xml, but I would also like to keep it inside of a class rather than having the functions reside in the fla. Here is my stab at it that obviously isn't working.
code: class Tester extends MovieClip {
public function Tester() {
doAction();
}
private function doAction():Void {
makeBox("test3.xml");

}
private function makeBox(path:String):Void {
var xml:XML = new XML();
xml.ignoreWhite = true;
xml.onLoad = function() {
var arr:Array = new Array();
for (var node:XMLNode = xml.firstChild.firstChild; node != null; node=node.nextSibling) {
arr.push(node.firstChild.nodeValue);
}
arr.sort();
trace(arr);
for (var i = 0; i<arr.length; ++i) {
_parent.datagrid1.addItem({name:arr[i]});
}
xml.load(path);
};
}
}


Here is the xml:

PHP Code:



<?xml version="1.0" encoding="iso-8859-1"?>
<people>
<person>Joe Lawyer1</person>
<person>Joe Lawyer2</person>
<person>Joe Lawyer3</person>
<person>Joe Lawyer4</person>
<person>Joe Lawyer5</person>
<person>Joe Lawyer6</person>
<person>Joe Lawyer7</person>
</people>



I have a working version of basically the same code that exists on a first frame of a fla. The datagrid populates correctly and the trace shows up, but I would instead like to keep it all inside of a class because I ultimately would like to pass different paths to seperate xml files dynamically.

Thanks for any advice!

View Replies !    View Related
Populate Cs3 Datagrid From Object
Hi,

In AS2 I would populate a datagrid by setting an object (returned from a coldfusion query using flash remoting) to the dataprovider. In AS3 I can only seem to populate from an array. Eg the following doesn't work:


Code:
// aDg is a datagrid

private function getSitesResultListener(e:Event):void
{
trace(e.target.getSitesResult); // [object Object]

addChild(aDg);
aDg.dataProvider = new DataProvider(e.target.getSitesResult);
}

/* The above give the following error:

TypeError: Error: Type Coercion failed: cannot convert [object Object] to Array or DataProvider.
at fl.data::DataProvider/fl.data:DataProvider::getDataFromObject()
at fl.data::DataProvider$iinit()
at Base/::getSitesResultListener()
at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at classes::RemoteConn/::sitesResponder()
*/


Am I right in thinking that the AS3 datagrid no longer accepts an object as it's dataprovider?

If so, is there a way around this? If anyone can offer some advice or point me to a tuturial of populating the cs3 datagrid from a query it would be appreciated (the only tutorials I can find describe how to populate from a manually created array or an xml file).

Thanks
Robin.

View Replies !    View Related
[F8] Can't Populate Array - Undefined
Hello,

I've been trying to make a word scramble function that selects a random strings from "wordArray", removes spaces, scrambles the text, and repopulates that scrambled text in to "scrambledArray".

But for whatever reason, the scrambledArray comes up undefined when I trace it.

What am I doing wrong? I've checked and rechecked my code but can't figure this out at all! Starting to lose my mind over this. I've been at it for the past 6 hours

This is the exact code i'm using:


PHP Code:



var wordArray:Array = new Array("Words with spaces", "Different words", "single", "more words with spaces", "another string with spaces");
var scrambledArray:Array;
var tempString2:Array;
var tempString3:Array;
//
function scrambleWord():Void{
    //select random string from array
    n = Math.floor(Math.random()*wordArray.length);
    tempString = wordArray[n];
    trace("word: "+tempString);
    //remove spaces
    tempString2 = tempString.split(" ").join("");
    tempString3 = tempString2.split("");
    //scramble words
    duration = tempString3.length;
    for(i=0; i<duration; i++){
        r = Math.floor(Math.random()*tempString3.length);
        t = tempString3.splice(r,1);
        trace("t: "+t);
        scrambledArray.push(t);
    }
    trace("scrambledArray: "+scrambledArray)
}

scrambleWord();




Can someone please shed some light on this? Pretty please?

P.S. using flash 8

View Replies !    View Related
Populate Dynamic Textfield
Hey,

I'm having some problems populating a dynamic text field with data from an XML document. I've got my .fla file reading my XML document just fine and can do a trace() and view what I have in the XML. What I can't seem to figure out is how to assign those values into a dynamic textfield I have placed on the stage. If it helps, I have placed the textfield into a movieclip on the stage. Any suggestions?

View Replies !    View Related
Pre-Populate Mailto: Fields ...
When doing a simple Mailto: link does anyone know how to pre-populate the subject field and the comments field?

Thanks,
-M

View Replies !    View Related
[F8] Using Xml To Populate Dynamic Text Box
I have created a video player that reads in the video titles and urls from an xml file. The titles are displayed in a list box component. That part works just fine. What I am trying to do is include a caption about each video which is displayed in a dynamic text box called captions_txt. The caption is an attribute of the <video> element in the xml file. The caption need to change as different video are selected.
Here is a section of the xml.


Code:
<?xml version="1.0" encoding="UTF-8"?>
<videos>
<video caption="This is the first caption" title="The Delta Farm Tour" url="video_library/video_1.flv" />
<video caption="This is the second caption" title="The Delta Farm Tour pt 2 " url="video_library/video_2.flv" />
</videos>
Here is what I have now:


Code:
var videoXML:XML = new XML();
videoXML.ignoreWhite = true;
var videos:Array = new Array();
var captions:Array = new Array();
videoXML.onLoad = function(success) {
if (success) {
videos = videoXML.firstChild.childNodes;
for (i=0;i<videos.length;i++){
videoList.addItem(videos[i].attributes.title,videos[i].attributes.url);
}
videoList.selectedIndex = 0;
captions_txt.text = videos[i].attributes.caption;
}
else
{
videoList.addItem("Could not load videos");
}
}
videoXML.load("hc_vid_playlist.xml");
The text box captions_txt comes up as undefined as is. Where is/are my errors?

View Replies !    View Related
[CS3] Populate Dynamic Buttons
Hi folks,
I'm currently developing an XML based interactive map project, with search feature.
The idea is, when a user searches and found multiple results, all the results are displayed in clickable list of buttons ( or texts ) which populated dynamically by flash.
Results are stored in array, but i don't have any idea how to populate these list of buttons from the array.
So, any idea what methods or ideas should I use to make it happens ?

Great thanks in advance.

View Replies !    View Related
Getting XML To Populate Dynamic Fields
I've done some looking around and most of the tutorials I find on the net have to do with using the XML components to create lists of data or dropdowns or etc.

All I want to do with the current XML that I'm working with is to have it display text, populate links, and show images. Almost no interactivity (excepting three links).

Could someone direct me where to go from here?

Here's the code I've got:


Code:
// The first step is to activate the XML object
kpxml = new XML();
/*
With the XML Object now active you must now load an XML foramtted document.
Any DTD or XLS formatting will be ignored.
*/
kpxml.onLoad = myLoad;
kpxml.load("kpts.xml");
// Before proceeding to far into the program, make sure the XML document has loaded
// Extract information from the XML file
function myLoad(ok) {
if (ok == true) {
Publish(this.firstChild);
}
}

function Publish(kpXMLNode) {

if (kpXMLNode.nodeName == "datapacket") {
datapacket = kpXMLNode.firstChild;

if (datapacket.firstChild == "features") {
features = datapacket.firstChild;

if (features.firstChild == "feature1") {
feature1 = features.firstChild;

if (feature1.firstChild == "image") {
image = feature1.firstChild;
feat1.feat1image.source = "../"+feature1.image.nodeValue;
}
if (image.nextSibling == "feattitle") {
feattitle = image.nextSibling;
feat1.feat1title.text = feature1.feattitle.nodeValue;
}
if (feattitle.nextSibling == "itemtext") {
itemtext = feattitle.nextSibling;
feat1.btnfeat1.text = feature1.itemtext.nodeValue;
}
if (itemtext.nextSibling == "link") {
feat1.contfeat1.URL = feature1.link.nodeValue;
}
}
if (feature1.nextSibling == "feature2") {
feature2 = feature1.nextSibling;

if (feature2.firstChild == "image") {
image = feature2.firstChild;
feat2.feat2image.source = "../"+feature2.image.nodeValue;
}
if (image.nextSibling == "feattitle") {
feattitle = image.nextSibling;
feat2.feat2title.text = feature2.feattitle.nodeValue;
}
if (feattitle.nextSibling == "itemtext") {
itemtext = feattitle.nextSibling;
feat2.btnfeat2.text = feature2.itemtext.nodeValue;
}
if (itemtext.nextSibling == "link") {
feat2.contfeat2.URL = feature2.link.nodeValue;
}
}
if (feature2.nextSibling == "feature3") {
feature3 = feature2.nextSibling;

if (feature3.firstChild == "image") {
image = feature3.firstChild;
feat3.feat3image.source = "../"+feature3.image.nodeValue;
}
if (image.nextSibling == "feattitle") {
feattitle = image.nextSibling;
feat3.feat3title.text = feature3.feattitle.nodeValue;
}
if (feattitle.nextSibling == "itemtext") {
itemtext = feattitle.nextSibling;
feat3.btnfeat3.text = feature3.itemtext.nodeValue;
}
if (itemtext.nextSibling == "link") {
feat3.contfeat3.URL = feature3.link.nodeValue;
}
}
}
if (features.nextSibling == "programs") {
programs = features.nextSibling;

if (programs.firstChild == "program1") {
program1 = programs.firstChild;

if (program1.firstChild == "image") {
image = program1.firstChild;
prog1.prog1image.source = "../"+program1.image.nodeValue;
}
if (image.nextSibling == "progtitle") {
progtitle = image.nextSibling;
prog1.prog1title.text = program1.progtitle.nodeValue;
}
if (progtitle.nextSibling == "itemtext") {
itemtext = progtitle.nextSibling;
prog1.clipprog1.text = program1.itemtext.nodeValue;
}
}
if (program1.nextSibling == "program2") {
program2 = program1.nextSibling;

if (program2.firstChild == "image") {
image = program2.firstChild;
prog2.prog2image.source = "../"+program2.image.nodeValue;
}
if (image.nextSibling == "progtitle") {
progtitle = image.nextSibling;
prog2.prog2title.text = program1.progtitle.nodeValue;
}
if (feattitle.nextSibling == "itemtext") {
itemtext = progtitle.nextSibling;
prog2.clipprog2.text = program1.itemtext.nodeValue;
}
}
}
}
}
Here is my XML:


Code:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>

<datapacket>
<features>
<feature1>
<image>image1.jpg</image>
<feattitle>Feature</feattitle>
<itemtext>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Vivamus ornare.</itemtext>
<link>something.php</feature1>
</feature1>
<feature2>
<image>image1.jpg</image>
<feattitle>Feature</feattitle>
<itemtext>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Vivamus ornare.</itemtext>
<link>something.php</feature1>
</feature2>
<feature3>
<image>image1.jpg</image>
<feattitle>Feature</feattitle>
<itemtext>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Vivamus ornare.</itemtext>
<link>something.php</link>
</feature3>
</features>
<programs>
<program1>
<image>image1.jpg</image>
<progtitle>Feature</progtitle>
<itemtext>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Vivamus ornare.</itemtext>
</program1>
<program2>
<image>image1.jpg</image>
<progtitle>Feature</progtitle>
<itemtext>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Vivamus ornare.</itemtext>
</program2>
</programs>
</datapacket>
Is this even close to right? Is there an easier way of doing this?

The flash I'm working on is located here. All the images, the 'continued...' links and the latin text is going to be brought through the XML doc.

Thanks.

View Replies !    View Related
Ext. Variables To Populate SharedObjects
I was wondering if it was possible to save variables in a .txt to populate information to a SharedObject. It would be easier for me to update the text file instead of publishing a new swf. This is the code I used:

loadVariables("URLs.txt","");

user_visit = SharedObject.getLocal("user");

if(user_visit.data.month == Month) {
gotoAndPlay("s1a");
}
else {
user_visit.data.month = Month;
}

But when I change Month in the .txt the swf doesn't change. If I was to do it in the swf the code works as it should. Any suggestions?

Thanks,

TOG

View Replies !    View Related
Populate List Of Buttons
Hi folks,
I'm currently developing an XML based interactive map project using AS2, with search feature.
The idea is, when a user searches and found multiple results, all the results are displayed in clickable list of buttons ( or movie clips with buttons ) which populated dynamically by flash.
Example :
Search Results for keywords : "Restaurant"

1. (some restaurant1's name) - (some street address1) - Click here for details
2. (some restaurant2's name) - (some street address2) - Click here for details
3. ...


Results are stored in array, but i don't have any idea how to populate these list of buttons ( or movieclips) from the array.
So, any idea what methods or ideas should I use to make it happens ?

Sorry for my bad English, Great thanks in advance.

View Replies !    View Related
Best Populate Method Flash Mx?
Hi all , I have followed Jesse's tut on loading and parsing xml into flash. I am now looking at the best way to duplicate and then populate a movie clip with info from an xml. I have 2 layers on the main time line the first contains the actions to parse the xml file find the values and also the attributes. The second layer contains an MC called targetClip
Here is my code so far:

Code:
picsMenu_xml = new XML();
picsMenu_xml.ignoreWhite = true;
picsMenu_xml.onLoad = function(sucess) {
if (sucess) {
processMenu(picsMenu_xml);
}
};
// Load up the XML file into Flash
picsMenu_xml.load('xml/mmsmenu.xml');
// This is the function that will be called when
// our XML document is loaded succesfully
function processMenu(picsMenu_xml) {
for (var n = 0; n<PicsMenu_xml.firstChild.childNodes.length; n++) {
trace(picsMenu_xml.firstChild.childNodes[n].firstChild.nodeValue);
trace(picsMenu_xml.firstChild.childNodes[n].attributes.URL);

}
}
I was thinking of using a for while loop to attach the attribute URL & the value of the node in the order its been parsed to a duplicate of the targetClip MC. Is this an efficient way of population or should I be looking at another method????

Any help is much appreciated.

Cheers:-)

View Replies !    View Related
Populate An Array With Push()
Hi
I'm having problems populating an array inside a loop, here's my code:


ActionScript Code:
pic_arr = new Array();

    for ($i=0; i<=5; i++) {
       
        pic_arr.push(eval("this.pic" add i));
};

do you know what's wrong?

ratamaster

View Replies !    View Related
Populate A Table Using A Graphic.
Is it possible to graphically populate a table? Here is what I trying to do. I have a graphic of a cabinet with shelves and slot on each shelf. The cabinet is really a table with rows and slot as data fields.

The field name for the cabinet table would look like this: row, slot, location( which would be the combination of cabinet, row and slot). An example of data in each field would be:
Cabinet=A, Row=01, Slot =02 (or any value from 1-20)and Location would be A0102 for the single slot in the second position on row 1, in case A.

What I would like to do is query another table for information, let's call this query StreetAddress, query the table for a Street Number or Name and have it return all the addresses in the table for that street. Now I want to point to a location on the graphic and have those StreetAddresses populate the cabinet table in the row at the slot picked with the first StreetAddress and populate the next slots consecutive with the other StreetAddresses from the query.

I have looked a couple of FLASH application that come close to doing this, but my big problem is that not all of the StreetAddresses are consecutive. In other words there maybe queries that result in twenty StreetAddresses, but only 10 go in Cabinet A and there others go in cabinet B. Is there away to select from the graphic those that you want to move after they have been inserted.
I way over my head with this concept, can FLASH do this using COLDFUSION??

View Replies !    View Related
Populate An Variable With An Xml Node
Hello
I am making a map that are going to display colors on cities. The colors are set with:
mcCity1.setRGB(((255-"variablename")*65536)+("variablename"*256));

Now I need to populate the variablename with a value from an xml file that match the node city1.
Can anyone help me with this.......?

View Replies !    View Related
Dynamically Populate TileList With MCs
Hi,
i'm loading an undefined number of imagepaths from a xmlfile.
I want to load these images each into a dynamically generated mc(based on a master/class/template), and populate a TileList component with these mc's.
After hours of searching and testing, i just can't figure out, how this can be done in AS3...
Basic problem is to make the mc's with iteration in their names.
Second is to get the Images inside the mc's.
Since i have tried 42 versions of code, i don't know which sample is closest to the solution that i should post here....
Any suggestions, hints, solutions appreciated
Thanks in advance!

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