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




[help][as 1.0/arrays] Nestedarrays Data Collision?



i've got a CELL MOVIECLIP with 3 (or more) nodes, those 3 nodes then change the values of a g_NodeArray when dragged. here's the code for this movieClip:

CELL MOVIECLIP

ActionScript Code:
g_NodeArray = [];g_NodeArray.push([0, 0, node_00, 000, -45, 10, 90]);g_NodeArray.push([1, 0, node_01, 005, -15, 10, 90]);g_NodeArray.push([2, 1, node_02, -40, 000, 15, -90]);function initialise() {    trace("-------------+ init");    //-----------------------------------------------    for (var n = 0; n<g_NodeArray.length; n++) {        node = "cn_"+n;        node = this.attachMovie("controlNode", node, 101+n);        trace(node);        node._x = g_NodeArray[n][3];        node._y = g_NodeArray[n][4];        node.index = g_NodeArray[n][0];        node.parent = g_NodeArray[n][1];        //record the new name in the nodeArray        g_NodeArray[n][2] = node;        node.onEnterFrame = function() {            if (this.active) {                this._parent.g_NodeArray[this.index][3] = int(this._x);                this._parent.g_NodeArray[this.index][4] = int(this._y);            }        };    }}initialise();this.onEnterFrame = function() {    text_display1 = g_NodeArray[0];    text_display2 = g_NodeArray[1];    text_display3 = g_NodeArray[2];};

ok, that all works. when i click a controlNode (which makes it active) it updates the g_NodeArray - which i trace in that onEnterFrame function. i've stripped the file down a bit, obviously i use g_NodeArray to store other variables as well..

now. i want the CELL MOVIECLIP to update an array within a frameHolder which consists of a series of frames. this is the setup for the FRAMEHOLDER MOVIECLIP:


ActionScript Code:
//--------------------------------------------------------//set up//--------------------------------------------------------i = 0;amountofFrames = 3;buildFrames();activateFrame(frame0);//--------------------------------------------------------//functions//--------------------------------------------------------function buildFrames() {    for (i=0; i<amountofFrames; i++) {        frame = "frame"+i;        frame = this.attachMovie("frame", frame, i);        frame._x = 100*i;        frame._xscale = frame._yscale=200;        frame.i = i;        frame["arr_"+i] = [i];    }}function activateFrame(whichFrame) {    //inactive frames    for (i=0; i<amountofFrames; i++) {        frame = "frame"+i;        frame = this[frame];        frame.gotoAndStop("passive");    }    //active frame    whichFrame.gotoAndStop("active");    this._x = -whichFrame._x/1.175;    this.activeFrame = whichFrame;    this.activeFrameIndex = whichFrame.i;}function editFrame(nArray, nConnectionList) {        targetFrameIndex = activeFrameIndex;    targetFrame = "frame"+targetFrameIndex;    targetFrame = this[targetFrame];    trace("editFrame"+"|"+targetFrame);    targetFrame.nodeArray = nArray;    activateFrame(targetFrame);}

the code builds a series of frames (no problem), activates a frame when rolled over (no problem) and then i want to allow a frame to be edited, which basically takes the CELL MOVIECLIP and broadcasts that g_NodeArray into the active frame's nodeArray. it's all works, but problem is that even though every frame now holds it's own nodeArray, every time i update g_nodeArray by dragging one of the controlNodes every array in every frame gets updated!

here is the code for the FRAME MOVIECLIP:


ActionScript Code:
#initclip// [ INITIALISE ]----------------------------------------------------------------]function frame_Class() {    //create an array  to keep track of nodes    this.nodeArray = [];    //general housekeeping    this.stop();    this.btn.useHandCursor = false;}// [ SET UP ]--------------------------------------------------------------------]frame_Class.prototype = new MovieClip();frame_Class.prototype.onEnterFrame = function() {    this.displayText = this.nodeArray;};// [ INSTANTIATE ]----------------------------------------------------------------]Object.registerClass("frame", frame_Class);#endinitclip  

obviously i want only the activeFrame's nodeArray to update, not all of them! any help would be greatly appreciated. obviously there is a bit more code on buttons etc, so i have posted the fla here .



Ultrashock Forums > Flash > ActionScript
Posted on: 2004-05-12


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Game Help(Arrays And Collision)
Haven't seen anything that forbids help topics, so here's my problem. Any help would be greatly appreciated.
I'm trying to get the collision to work (for five hours), I started out without the array and someone helped me out and said that arrays were needed for the enemies. So, I put the array in, now there's a problem with "enemyarray.push(Enemy)" that outputs :

TypeError: Error #1009: Cannot access a property or method of a null object reference.
at Game_fla::MainTimeline/spawnEnemy()[Game _fla.MainTimeline::frame1:27]
at flash.utils::Timer/_timerDispatch()
at flash.utils::Timer/tick()

Many times.
And many times more.

The Game: http://www.trportfolio.net/upload/view_u pload.php?id=20102
-When missles and enemies collide, they're supposed to die.
-Not actually what happens anymore, broken now.

Attached the file. Thanks to all those who try.

How Do You Detect Collision With The Bitmap Data Of A Symbol With AS3?
I mean I have a symbol that I am exporting for as3 that has another symbol in it with an instance name. And that symbol has some bitmap data that I made by cropping a rectangle in the flash ide. How do you manipulat the bitmap data?

Pulling Data Out Of Arrays
Okay so what I want to do is this:

I have an array pulled in from a .csv file.
Looks something like this after I turn the String into an Array:

myArray =["productA"|"companyA"|"myProductA"|"productB"|"com panyB"|"myProductB"] etc... etc....

What I want to do is only List the "myProductA" out of this Array. All of the myProducts actually: myProductA, myProductB, etc.

How would I go about extracting a list from the Array and creating a newArray? How would I loop it maybe? Say every 3rd item pull somehow?

Time is of the essense here for me so I appreciate all of your help!!

Thanks!

Arrays... Splitting Data?
hello, i have been trying to figure this out, and can't find an answer anywhere. i am trying to split the following data into separate variables.

i have a variable
code:
mapTarget = <mapsegment>zaa4445.jpg</mapsegment>


i want to split the above data so that i can then define a new variable from that data as follows

code:
mapTarget2 = zaa4445.jpg


i have been messing with arrays, but nothing seems to work for me. is there a way i can split the data into an array, or something along those lines, then set a variable for part of an the array?

i could change the orginal data to:
code:
mapTarget = <mapsegment>-zaa4445.jpg-</mapsegment>


could the data then be split by the "-" ?

I would appreciate the help.
thanks!

Question About Data Arrays
Hello, I'm creating a very unique game for flash and it will utilize a 52 deck of cards. The code needs to randomly pick a card every time the user clicks on the card movie clip.(I Made a 53 frame movie clip on each frame is a different card. The last frame is blank) When the last card is drawn the movie clip will need to goto the 53 frame and dissapear until the the user clicks the reset button, which should shuffle the cards and reset the movie. I made my own way of doing this using If statements.

The problem is I have to declare a variable for each card. Then have a function generate number, then have a function check if a card has been drawn, then use a variable to count when all 52 cards are used.

Here's a generic thing showing yall what I mean.

Frame1 code: _global.aceclub = 0
_global.club2 = 0
_global.club3 = 0
This is the variable I created to keep track of when the card is used the first time it's variable is then set to 1 which means already used.

On the deal function:
if(ccount > 52){ // This keeps track of each time a card is used
_root.Redeal();
}
_global.draw = random(51);

The next part the deal function:

if(draw == 0 && aclub == 1){
_root.DrawCycle();
}
if(draw == 1 && club2 == 1){
_root.DrawCycle();
}
if(draw == 2 && club3 == 1){
_root.DrawCycle();
}

Those statements were made to check if the cards been used and if so recall the draw function.

The next part of the draw function has a player 1 fuction in it

if(draw == 0 && aclub == 0){
_root.deck.gotoAndStop(2);
aclub = 1;
ccount += 1;
}
So you can see how overcomplicated the if statement process makes preforming this simple task. So far I've been able to use Long If statements in VB knowing there was a better way but to used to doing it that way. Flash however gave me a more than 256 recursion error and after research I learned it was because of two many Ifs' being generated. I think I can do this much simpler using array but can't find a web site to show me how to do this. If any body was able to find any scripts or knows how to do this already please help.

1.To recap basically I need a random number generated 1-52 or or 0-51.

2.I need to have my movie clip play the correct frame based on what number was drawn.
3.The code needs to know when it has already used a number and draw another random number.
4.The code needs to know when all 52 possibilities are up .
5.It then needs to call to reset itself. and lthe movie clip.

-------------------------
That about sums it up By the way in this game the playing cards will never actually move and this is why it's all in one clip. Thanks to any who know the solution.

Pushing Arrays From XML Data
I have written the following XML file to incorporate 3 image galleries as such.


Code:
<?xml version="1.0" encoding="ISO-8859-1"?>

<gallery>

<bkOne url="bookOne/food_001.jpg" />
<bkOne url="bookOne/food_002.jpg" />
<bkOne url="bookOne/food_003.jpg" />
<bkOne url="bookOne/food_004.jpg" />
<bkOne url="bookOne/food_005.jpg" />
<bkOne url="bookOne/food_006.jpg" />
<bkOne url="bookOne/food_007.jpg" />
<bkOne url="bookOne/food_008.jpg" />
<bkOne url="bookOne/food_009.jpg" />
<bkOne url="bookOne/food_010.jpg" />
<bkOne url="bookOne/food_011.jpg" />
<bkOne url="bookOne/food_012.jpg" />
<bkOne url="bookOne/food_013.jpg" />
<bkOne url="bookOne/food_014.jpg" />
<bkOne url="bookOne/food_015.jpg" />

<bkTwo url="bookTwo/food_001.jpg" />
<bkTwo url="bookTwo/food_002.jpg" />
<bkTwo url="bookTwo/food_003.jpg" />
<bkTwo url="bookTwo/food_004.jpg" />
<bkTwo url="bookTwo/food_005.jpg" />
<bkTwo url="bookTwo/food_006.jpg" />
<bkTwo url="bookTwo/food_007.jpg" />
<bkTwo url="bookTwo/food_008.jpg" />
<bkTwo url="bookTwo/food_009.jpg" />
<bkTwo url="bookTwo/food_010.jpg" />
<bkTwo url="bookTwo/food_011.jpg" />
<bkTwo url="bookTwo/food_012.jpg" />
<bkTwo url="bookTwo/food_013.jpg" />
<bkTwo url="bookTwo/food_014.jpg" />
<bkTwo url="bookTwo/food_015.jpg" />
<bkTwo url="bookTwo/food_016.jpg" />

<personal url="personal/pers_001.jpg" />
<personal url="personal/pers_002.jpg" />
<personal url="personal/pers_003.jpg" />
<personal url="personal/pers_004.jpg" />
<personal url="personal/pers_005.jpg" />
<personal url="personal/pers_006.jpg" />
<personal url="personal/pers_007.jpg" />
<personal url="personal/pers_008.jpg" />
<personal url="personal/pers_009.jpg" />
<personal url="personal/pers_010.jpg" />
<personal url="personal/pers_011.jpg" />
<personal url="personal/pers_012.jpg" />

</gallery>
My aim is to create (push) 3 arrays for each of the "galleries" in this XML file. Here is my attempt, which is not working. Anyone know what I'm doing wrong here?


Code:
var feedXML = new XML();
feedXML.ignoreWhite = true;

var bkOneUrls:Array = new Array();
var bkTwoUrls:Array = new Array();
var personalUrls:Array = new Array();
var whoIsOn:Number;

feedXML.onLoad = function(success) {
var photos_bkOne:Array = this.firstChild.childNodes.nodeName[bkOne];
for(i = 0; i < photos_bkOne.length; i++) {
bkOneUrls.push(photos_bkOne[i].attributes.url);
}

var photos_bkTwo:Array = this.firstChild.childNodes.nodeName[bkTwo];
for(i = 0; i < photos_bkTwo.length; i++) {
bkTwoUrls.push(photos_bkTwo[i].attributes.url);
}

var photos_personal:Array = this.firstChild.childNodes.nodeName[personal];
for(i = 0; i < photos_personal.length; i++) {
personalUrls.push(photos_personal[i].attributes.url);
}
holder.loadMovie(bkOneUrls[0]);
whoIsOn = 0;
trace(photos_bkOne.length);
}

feedXML.load("images.xml");
Thanks / help appreciated

Displaying Data With Arrays?
Hi guys,

I'm working on a project. I have encountered some problems with an array in a textfield. When I click on an item on the array the relevant information should appear downstairs in the black area.

I have made a screenhost as example:
screenshot

greetz,

ryu

Accessing Data From XML Arrays?
I keep getting 'undefined' if I ask for the value of a variable from an array into which XML data has been loaded. Any ideas?


Code:
// * XML ARRAYS
var unitName:Array = new Array();
var unitFacing:Array = new Array();
var unitPosition:Array = new Array();
var unitMenu1Txt:Array = new Array();
var unitMenu2Txt:Array = new Array();
var unitMenu3Txt:Array = new Array();
var unitMenu4Txt:Array = new Array();
var unitMenu5Txt:Array = new Array();
var unitSubMenu1Txt1:Array = new Array();
var unitSubMenu1Txt2:Array = new Array();
var unitSubMenu1Txt3:Array = new Array();
var unitSubMenu1Txt4:Array = new Array();
var unitSubMenu1Txt5:Array = new Array();
var unitSpeed:Array = new Array();
// * PARSE DATA
var dataXML = new XML();
dataXML.ignoreWhite = true;
dataXML.onLoad = parseXML;
function parseXML(success) {
if (success) {
var rtNode = dataXML.firstChild;
totalUnits = rtNode.childNodes.length;
var curNode = rtNode.firstChild;
for (var i = 0; i<=totalUnits; i++) {
unitName.push(curNode.childNodes[0].firstChild.nodeValue);
unitFacing.push(curNode.childNodes[1].firstChild.nodeValue);
unitPosition.push(curNode.childNodes[2].firstChild.nodeValue);
unitMenu1Txt.push(curNode.childNodes[3].firstChild.nodeValue);
unitMenu2Txt.push(curNode.childNodes[4].firstChild.nodeValue);
unitMenu3Txt.push(curNode.childNodes[5].firstChild.nodeValue);
unitMenu4Txt.push(curNode.childNodes[6].firstChild.nodeValue);
unitMenu5Txt.push(curNode.childNodes[7].firstChild.nodeValue);
unitSubMenu1Txt1.push(curNode.childNodes[8].firstChild.nodeValue);
unitSubMenu1Txt2.push(curNode.childNodes[9].firstChild.nodeValue);
unitSubMenu1Txt3.push(curNode.childNodes[10].firstChild.nodeValue);
unitSubMenu1Txt4.push(curNode.childNodes[11].firstChild.nodeValue);
unitSubMenu1Txt5.push(curNode.childNodes[12].firstChild.nodeValue);
unitSpeed.push(curNode.childNodes[14].firstChild.nodeValue);
nextNode = curNode.nextSibling;
curNode = nextNode;
}
// * PLACE UNITS, FACING, UNIT MENU, POSITIONS
for (var i = 0; i<=15; i++) {
tempUnit = "unit"+i;
_root.attachMovie("unit", tempUnit, getNextHighestDepth());
eval(tempUnit).speed = _root.unitSpeed[i];
}
}
}
dataXML.load("tactics.xml");
For example on "eval(tempUnit).speed = _root.unitSpeed[i]", I should be able to ask "trace(unit1.speed)" and get a number, but it returns undefined?

Here's my xml:


Code:
<army>

<unit0>
<unitName>Pyromancer</unitName>
<unitFacing>faceUp</unitFacing>
<unitPosition>79</unitPosition>
<unitMenu1Txt>Attack</unitMenu1Txt>
<unitMenu2Txt>Pyromancy</unitMenu2Txt>
<unitMenu3Txt>Items</unitMenu3Txt>
<unitMenu4Txt>Parry</unitMenu4Txt>
<unitMenu5Txt>Pass</unitMenu5Txt>
<unitSubMenu1Txt1>Fireball</unitSubMenu1Txt1>
<unitSubMenu1Txt2>Magic Missile</unitSubMenu1Txt2>
<unitSubMenu1Txt3>Fire Shield</unitSubMenu1Txt3>
<unitSubMenu1Txt4>Melf's Meteors</unitSubMenu1Txt4>
<unitSubMenu1Txt5>Inferno</unitSubMenu1Txt5>
<unitSpeed>0</unitSpeed>
</unit0>

<unit1>
<unitName>Pyromancer</unitName>
<unitFacing>faceUp</unitFacing>
<unitPosition>80</unitPosition>
<unitMenu1Txt>Attack</unitMenu1Txt>
<unitMenu2Txt>Pyromancy</unitMenu2Txt>
<unitMenu3Txt>Items</unitMenu3Txt>
<unitMenu4Txt>Parry</unitMenu4Txt>
<unitMenu5Txt>Pass</unitMenu5Txt>
<unitSubMenu1Txt1>Fireball</unitSubMenu1Txt1>
<unitSubMenu1Txt2>Magic Missile</unitSubMenu1Txt2>
<unitSubMenu1Txt3>Fire Shield</unitSubMenu1Txt3>
<unitSubMenu1Txt4>Melf's Meteors</unitSubMenu1Txt4>
<unitSubMenu1Txt5>Inferno</unitSubMenu1Txt5>
<unitSpeed>0</unitSpeed>
</unit1>

<unit2>
<unitName>Pyromancer</unitName>
<unitFacing>faceUp</unitFacing>
<unitPosition>81</unitPosition>
<unitMenu1Txt>Attack</unitMenu1Txt>
<unitMenu2Txt>Pyromancy</unitMenu2Txt>
<unitMenu3Txt>Items</unitMenu3Txt>
<unitMenu4Txt>Parry</unitMenu4Txt>
<unitMenu5Txt>Pass</unitMenu5Txt>
<unitSubMenu1Txt1>Fireball</unitSubMenu1Txt1>
<unitSubMenu1Txt2>Magic Missile</unitSubMenu1Txt2>
<unitSubMenu1Txt3>Fire Shield</unitSubMenu1Txt3>
<unitSubMenu1Txt4>Melf's Meteors</unitSubMenu1Txt4>
<unitSubMenu1Txt5>Inferno</unitSubMenu1Txt5>
<unitSpeed>0</unitSpeed>
</unit2>

<unit3>
<unitName>Pyromancer</unitName>
<unitFacing>faceUp</unitFacing>
<unitPosition>82</unitPosition>
<unitMenu1Txt>Attack</unitMenu1Txt>
<unitMenu2Txt>Pyromancy</unitMenu2Txt>
<unitMenu3Txt>Items</unitMenu3Txt>
<unitMenu4Txt>Parry</unitMenu4Txt>
<unitMenu5Txt>Pass</unitMenu5Txt>
<unitSubMenu1Txt1>Fireball</unitSubMenu1Txt1>
<unitSubMenu1Txt2>Magic Missile</unitSubMenu1Txt2>
<unitSubMenu1Txt3>Fire Shield</unitSubMenu1Txt3>
<unitSubMenu1Txt4>Melf's Meteors</unitSubMenu1Txt4>
<unitSubMenu1Txt5>Inferno</unitSubMenu1Txt5>
<unitSpeed>0</unitSpeed>
</unit3>

<unit4>
<unitName>Pyromancer</unitName>
<unitFacing>faceUp</unitFacing>
<unitPosition>83</unitPosition>
<unitMenu1Txt>Attack</unitMenu1Txt>
<unitMenu2Txt>Pyromancy</unitMenu2Txt>
<unitMenu3Txt>Items</unitMenu3Txt>
<unitMenu4Txt>Parry</unitMenu4Txt>
<unitMenu5Txt>Pass</unitMenu5Txt>
<unitSubMenu1Txt1>Fireball</unitSubMenu1Txt1>
<unitSubMenu1Txt2>Magic Missile</unitSubMenu1Txt2>
<unitSubMenu1Txt3>Fire Shield</unitSubMenu1Txt3>
<unitSubMenu1Txt4>Melf's Meteors</unitSubMenu1Txt4>
<unitSubMenu1Txt5>Inferno</unitSubMenu1Txt5>
<unitSpeed>0</unitSpeed>
</unit4>

<unit5>
<unitName>Pyromancer</unitName>
<unitFacing>faceUp</unitFacing>
<unitPosition>84</unitPosition>
<unitMenu1Txt>Attack</unitMenu1Txt>
<unitMenu2Txt>Pyromancy</unitMenu2Txt>
<unitMenu3Txt>Items</unitMenu3Txt>
<unitMenu4Txt>Parry</unitMenu4Txt>
<unitMenu5Txt>Pass</unitMenu5Txt>
<unitSubMenu1Txt1>Fireball</unitSubMenu1Txt1>
<unitSubMenu1Txt2>Magic Missile</unitSubMenu1Txt2>
<unitSubMenu1Txt3>Fire Shield</unitSubMenu1Txt3>
<unitSubMenu1Txt4>Melf's Meteors</unitSubMenu1Txt4>
<unitSubMenu1Txt5>Inferno</unitSubMenu1Txt5>
<unitSpeed>0</unitSpeed>
</unit5>

<unit6>
<unitName>Pyromancer</unitName>
<unitFacing>faceUp</unitFacing>
<unitPosition>85</unitPosition>
<unitMenu1Txt>Attack</unitMenu1Txt>
<unitMenu2Txt>Pyromancy</unitMenu2Txt>
<unitMenu3Txt>Items</unitMenu3Txt>
<unitMenu4Txt>Parry</unitMenu4Txt>
<unitMenu5Txt>Pass</unitMenu5Txt>
<unitSubMenu1Txt1>Fireball</unitSubMenu1Txt1>
<unitSubMenu1Txt2>Magic Missile</unitSubMenu1Txt2>
<unitSubMenu1Txt3>Fire Shield</unitSubMenu1Txt3>
<unitSubMenu1Txt4>Melf's Meteors</unitSubMenu1Txt4>
<unitSubMenu1Txt5>Inferno</unitSubMenu1Txt5>
<unitSpeed>0</unitSpeed>
</unit6>

<unit7>
<unitName>Pyromancer</unitName>
<unitFacing>faceUp</unitFacing>
<unitPosition>86</unitPosition>
<unitMenu1Txt>Attack</unitMenu1Txt>
<unitMenu2Txt>Pyromancy</unitMenu2Txt>
<unitMenu3Txt>Items</unitMenu3Txt>
<unitMenu4Txt>Parry</unitMenu4Txt>
<unitMenu5Txt>Pass</unitMenu5Txt>
<unitSubMenu1Txt1>Fireball</unitSubMenu1Txt1>
<unitSubMenu1Txt2>Magic Missile</unitSubMenu1Txt2>
<unitSubMenu1Txt3>Fire Shield</unitSubMenu1Txt3>
<unitSubMenu1Txt4>Melf's Meteors</unitSubMenu1Txt4>
<unitSubMenu1Txt5>Inferno</unitSubMenu1Txt5>
<unitSpeed>0</unitSpeed>
</unit7>

<unit8>
<unitName>Pyromancer</unitName>
<unitFacing>faceDown</unitFacing>
<unitPosition>16</unitPosition>
<unitMenu1Txt>Attack</unitMenu1Txt>
<unitMenu2Txt>Pyromancy</unitMenu2Txt>
<unitMenu3Txt>Items</unitMenu3Txt>
<unitMenu4Txt>Parry</unitMenu4Txt>
<unitMenu5Txt>Pass</unitMenu5Txt>
<unitSubMenu1Txt1>Fireball</unitSubMenu1Txt1>
<unitSubMenu1Txt2>Magic Missile</unitSubMenu1Txt2>
<unitSubMenu1Txt3>Fire Shield</unitSubMenu1Txt3>
<unitSubMenu1Txt4>Melf's Meteors</unitSubMenu1Txt4>
<unitSubMenu1Txt5>Inferno</unitSubMenu1Txt5>
<unitSpeed>0</unitSpeed>
</unit8>

<unit9>
<unitName>Pyromancer</unitName>
<unitFacing>faceDown</unitFacing>
<unitPosition>9</unitPosition>
<unitMenu1Txt>Attack</unitMenu1Txt>
<unitMenu2Txt>Pyromancy</unitMenu2Txt>
<unitMenu3Txt>Items</unitMenu3Txt>
<unitMenu4Txt>Parry</unitMenu4Txt>
<unitMenu5Txt>Pass</unitMenu5Txt>
<unitSubMenu1Txt1>Fireball</unitSubMenu1Txt1>
<unitSubMenu1Txt2>Magic Missile</unitSubMenu1Txt2>
<unitSubMenu1Txt3>Fire Shield</unitSubMenu1Txt3>
<unitSubMenu1Txt4>Melf's Meteors</unitSubMenu1Txt4>
<unitSubMenu1Txt5>Inferno</unitSubMenu1Txt5>
<unitSpeed>0</unitSpeed>
</unit9>

<unit10>
<unitName>Pyromancer</unitName>
<unitFacing>faceDown</unitFacing>
<unitPosition>10</unitPosition>
<unitMenu1Txt>Attack</unitMenu1Txt>
<unitMenu2Txt>Pyromancy</unitMenu2Txt>
<unitMenu3Txt>Items</unitMenu3Txt>
<unitMenu4Txt>Parry</unitMenu4Txt>
<unitMenu5Txt>Pass</unitMenu5Txt>
<unitSubMenu1Txt1>Fireball</unitSubMenu1Txt1>
<unitSubMenu1Txt2>Magic Missile</unitSubMenu1Txt2>
<unitSubMenu1Txt3>Fire Shield</unitSubMenu1Txt3>
<unitSubMenu1Txt4>Melf's Meteors</unitSubMenu1Txt4>
<unitSubMenu1Txt5>Inferno</unitSubMenu1Txt5>
<unitSpeed>0</unitSpeed>
</unit10>

<unit11>
<unitName>Pyromancer</unitName>
<unitFacing>faceDown</unitFacing>
<unitPosition>11</unitPosition>
<unitMenu1Txt>Attack</unitMenu1Txt>
<unitMenu2Txt>Pyromancy</unitMenu2Txt>
<unitMenu3Txt>Items</unitMenu3Txt>
<unitMenu4Txt>Parry</unitMenu4Txt>
<unitMenu5Txt>Pass</unitMenu5Txt>
<unitSubMenu1Txt1>Fireball</unitSubMenu1Txt1>
<unitSubMenu1Txt2>Magic Missile</unitSubMenu1Txt2>
<unitSubMenu1Txt3>Fire Shield</unitSubMenu1Txt3>
<unitSubMenu1Txt4>Melf's Meteors</unitSubMenu1Txt4>
<unitSubMenu1Txt5>Inferno</unitSubMenu1Txt5>
<unitSpeed>0</unitSpeed>
</unit11>

<unit12>
<unitName>Pyromancer</unitName>
<unitFacing>faceDown</unitFacing>
<unitPosition>12</unitPosition>
<unitMenu1Txt>Attack</unitMenu1Txt>
<unitMenu2Txt>Pyromancy</unitMenu2Txt>
<unitMenu3Txt>Items</unitMenu3Txt>
<unitMenu4Txt>Parry</unitMenu4Txt>
<unitMenu5Txt>Pass</unitMenu5Txt>
<unitSubMenu1Txt1>Fireball</unitSubMenu1Txt1>
<unitSubMenu1Txt2>Magic Missile</unitSubMenu1Txt2>
<unitSubMenu1Txt3>Fire Shield</unitSubMenu1Txt3>
<unitSubMenu1Txt4>Melf's Meteors</unitSubMenu1Txt4>
<unitSubMenu1Txt5>Inferno</unitSubMenu1Txt5>
<unitSpeed>0</unitSpeed>
</unit12>

<unit13>
<unitName>Pyromancer</unitName>
<unitFacing>faceDown</unitFacing>
<unitPosition>13</unitPosition>
<unitMenu1Txt>Attack</unitMenu1Txt>
<unitMenu2Txt>Pyromancy</unitMenu2Txt>
<unitMenu3Txt>Items</unitMenu3Txt>
<unitMenu4Txt>Parry</unitMenu4Txt>
<unitMenu5Txt>Pass</unitMenu5Txt>
<unitSubMenu1Txt1>Fireball</unitSubMenu1Txt1>
<unitSubMenu1Txt2>Magic Missile</unitSubMenu1Txt2>
<unitSubMenu1Txt3>Fire Shield</unitSubMenu1Txt3>
<unitSubMenu1Txt4>Melf's Meteors</unitSubMenu1Txt4>
<unitSubMenu1Txt5>Inferno</unitSubMenu1Txt5>
<unitSpeed>0</unitSpeed>
</unit13>

<unit14>
<unitName>Pyromancer</unitName>
<unitFacing>faceDown</unitFacing>
<unitPosition>14</unitPosition>
<unitMenu1Txt>Attack</unitMenu1Txt>
<unitMenu2Txt>Pyromancy</unitMenu2Txt>
<unitMenu3Txt>Items</unitMenu3Txt>
<unitMenu4Txt>Parry</unitMenu4Txt>
<unitMenu5Txt>Pass</unitMenu5Txt>
<unitSubMenu1Txt1>Fireball</unitSubMenu1Txt1>
<unitSubMenu1Txt2>Magic Missile</unitSubMenu1Txt2>
<unitSubMenu1Txt3>Fire Shield</unitSubMenu1Txt3>
<unitSubMenu1Txt4>Melf's Meteors</unitSubMenu1Txt4>
<unitSubMenu1Txt5>Inferno</unitSubMenu1Txt5>
<unitSpeed>0</unitSpeed>
</unit14>

<unit15>
<unitName>Pyromancer</unitName>
<unitFacing>faceDown</unitFacing>
<unitPosition>15</unitPosition>
<unitMenu1Txt>Attack</unitMenu1Txt>
<unitMenu2Txt>Pyromancy</unitMenu2Txt>
<unitMenu3Txt>Items</unitMenu3Txt>
<unitMenu4Txt>Parry</unitMenu4Txt>
<unitMenu5Txt>Pass</unitMenu5Txt>
<unitSubMenu1Txt1>Fireball</unitSubMenu1Txt1>
<unitSubMenu1Txt2>Magic Missile</unitSubMenu1Txt2>
<unitSubMenu1Txt3>Fire Shield</unitSubMenu1Txt3>
<unitSubMenu1Txt4>Melf's Meteors</unitSubMenu1Txt4>
<unitSubMenu1Txt5>Inferno</unitSubMenu1Txt5>
<unitSpeed>0</unitSpeed>
</unit15>

</army>

Incrementing Within Arrays Using XML Data
I'm working with a gallery grabbing images from data extracted from an external XML file, and I'm trying to make it work in a hierarchical or folder like structure in Flash 8. For instance, thumbnails are displayed on load, and when a thumbnail is clicked, more thumbnails specific to the image clicked are displayed. As sort of a beginner to Flash and ActionScript, I've been working with this project for a couple months.

There is one obstacle I'm facing within the 'for' loops I'm using. First, an example of my XML file is like this:

Code:
<art>
<imageName>images/art01_main.jpg</imageName>
<thumbName>images/art01_thumb.jpg</thumbName>
<fullName>images/art01_full.jpg</fullName>
<description>This is a description for Art 01.</description>
<products>
<prod>
<imageName>products/prod01_main.jpg</imageName>
<thumbName>products/prod01_thumb.jpg</thumbName>
<fullName>products/prod01_full.jpg</fullName>
<description>Product 01</description>
</prod>
<prod>
<imageName>products/prod02_main.jpg</imageName>
<thumbName>products/prod02_thumb.jpg</thumbName>
<fullName>products/prod02_full.jpg</fullName>
<description>Product 02</description>
</prod>
<prod>
<imageName>products/prod03_main.jpg</imageName>
<thumbName>products/prod03_thumb.jpg</thumbName>
<fullName>products/prod03_full.jpg</fullName>
<description>Product 03</description>
</prod>
</products>
</art>
As you may be able to tell, it's basically a catalog type of organization. I have the 'art' images displayed as I need them, but my problem is making the 'products' images work.

My ActionScript extracting the products images looks like this:

Code:
numOfProd = this.firstChild.childNodes[4].childNodes.length;
for (j=1; j<=numOfProd; j++) {
prodImageURL[j]=this.childNodes[0].childNodes[4].childNodes[j-1].childNodes[0].childNodes[0].nodeValue;
prodThumbURL[j]=this.childNodes[0].childNodes[4].childNodes[j-1].childNodes[1].childNodes[0].nodeValue;
prodFullURL[j]=this.childNodes[0].childNodes[4].childNodes[j-1].childNodes[2].childNodes[0].nodeValue;
prodDes[j]=this.childNodes[0].childNodes[4].childNodes[j-1].childNodes[3].childNodes[0].nodeValue;
}
This way displays the catalog look just as I'd like, but it is only good for the first piece of art since this 'for' loop only loops through the <products> node within the first <art> node. Now, if I change 'this.childNodes[0]' to 'this.childNodes[1]', I can display the <products> for the next <art> node.

The part that I have not been able to figure out is how to increment that 'this.childNodes[x]' so that I can use it in an onRelease function. I know this is an awful lot of info for a post, but I couldn't see any other way to attempt to clearly ask this question. Any help would be greatly appreciated as I've searched for quite awhile to no avail. I can provide an .fla if it would help to find the magic code. THANKS!

Xml, Arrays And Data Types
I'm making a website for a DJ. He wants a calendar on it which will show people when he has a show booked so that they don't bother calling him asking for days when he's busy. This sounded simple enough. I built all the calendar, an SQL database to store the days currently booked and an PHP page to get the data from the database and format it into XML for Flash to read.

The calendar is set up as a movieclip for the year which contains movieclips for each month which, in turn, contain movieclips for each day. Like this: http://www.dynamicentry.co.uk/stuff/calendar.jpg. Each has an instance name 'y2009' for the 2009 year movieclip, 'd04' for the 4 day of a month... So the 1st January 2009 would be 'y2009.m01.d01'. Each of the day movieclips has a blank version on frame 1 and a version with 'Booked' stamped accross it on frame 2. So inorder for a day to show as booked, we need to move it from frame 1 to 2.

So I make the XML file (i'll just post the result since the PHP query to get the data works fine):

Code:

<?xml version="1.0"?>
<bookings>
    <books day = "y2009.m01.d01"/>
</bookings>


So far, so good. I've got the reference I need to make a booking on January 1st 2009. Then I wrote the Flash side:

Code:

var bdayarray:Array = new Array();
var loader:URLLoader = new URLLoader();
loader.addEventListener(Event.COMPLETE, onLoaded);

var xml:XML;

function onLoaded(e:Event):void {

   xml = new XML(e.target.data);
   var cl:XMLList = xml.books;
   for (var i:Number=0; i<cl.length(); i++) {
      bdayarray.push(cl[i].attribute("day"));
   }
   
   for (var n:Number=0; n<bdayarray.length; n++) {
      var cd;
      cd = bdayarray[n];
      cd.gotoAndStop(2);
   }
}


loader.load(new URLRequest("bookings.php"));

Looks good to me. No luck though. I did a few traces and got some results. When I traced bdayarray[0] after the populating it in the first loop, I got 'y2009.m01.d01' like I was expecting. Surely this is fine, as that would make the line 'cd.gotoAndStop(2);' mean 'y2009.m01.d01.gotoAndStop(2);' like I want. But then I tried tracing 'y2009.m01.d01' and got '[object daybox_18]'.

Uh oh. I think I know what the problem is. I think the XML is coming though as the wrong type of data, possibly as a string rather than as a reference to the object I want. Does anyone know how I can convert the XML data into what I actually need it to be?

Thanks in advance for any help.

Accessing Data From Dynamic Gen Arrays...
Okay guys, here's what I'm doing. In part one I'm parsing the XML data and the pushing all of the text data into arrays, dynamically.

Using a "for" loop I'm using the attachMovie to generate and place buttons on the stage using the array.length property. So, basically what I want to do is to be able to click on one of the buttons(movieclip) and have it display in a text field. For some reason it's not displaying the text properly. If I write the following...



genreName_txt.text = genre_array[i];

it will not display the text in the text field and it will return "undefinded" when running a trace. But if I write

genreName_txt.text = genre_array[3];

for example, it displays the proper text in the text field.

Why can't I use the "genre_array[i]" to access text within the genre_array?



genreXML = new XML();
genre_array = new Array();
ginfo_array = new Array();
genreXML.ignoreWhite = true;
genreXML.load("Genrelist.xml");
genreXML.onLoad = function(success) {
if (success) {
var rootNode = this.firstChild;
var children = rootNode.childNodes;
for (i=0; children[i]; i++) {
var Genre = children[i].attributes.genre;
var List = children[i].firstChild.nodeValue;
//trace ("Genre : "+Genre);
genre_array.push(Genre);
ginfo_array.push(List);
}
buildIt();
}
};


//-------Build Genre Buttons----------
function Buildit() {
for (i=1; i<=genre_array.length; i++) {
attachMovie("daButton_mc", "genre_mc"+i, i);
this["genre_mc"+i]._x = 95+(i-1)*10;
this["genre_mc"+i]._y = 498;
this["genre_mc"+i]._xscale = 60;
this["genre_mc"+i]._yscale = 90;
this["genre_mc"+i].id = i;
this["genre_mc"+i].onRollover = function() {
rollOver(this);
genreName_txt.text = genre_array[i];
};
this["genre_mc"+i].onRollOut = function() {
rollOut(this);
genreName_txt.text = "";
};
}
}

Data Arrays? Infinite Loop?
Hello again, I'm still having problems with this code I've been trying to do this by myself but I just can't figure it out. Thanks again Dricciotti for the start but I haven't made much progress. If you or anyone else could please help me with this code and show me a site maybe that will teach me a good amount about arrays that would be great. I really want to learn how they work and how to use them.

The problem is this code, as it is, makes the flash player give the error:

"An script in this movie is causing flash player to run slow. If you continue your computer may become unresponsive...."

I believe it may have soemthing to do with the shuffle function because it is drawing the random cards and displaying them correctly.
************************************
Here is the code I currently have and what I think it does:
************************************
stop();
deck = new Array; // Tells the Program that deck is now known as an array
shuffle(); // Shuffles the deck when the frame first loads

function shuffle() // the function set up to shuffle cards
{

for(i=0; i<52; i++) // i is a variable to keep track of cards? It only does this
// until all 52 cards are set to 0? What is the i++ for also?
{
deck[i]=0; // unsure of this variable as well
}
cardsDrawn = 0; // resets the cards drawn to 0
}

function drawCard() // function used when uses gets a card
{

if(cardsDrawn == 52) // if all the cards have been drawn reshuffle
{
shuffle(); // calls the shuffle function
carddeck.gotoAndStop(53); // goes to the blank card picture
}else // if it hasn't reached 52 yet continue also is this number 52 because
// random starts at 0. Thus it should be 0-51 for the cards?
{
do // this sounds stupid but why is do here?
{
card = random(52); // generates random number for card value each time
}while(deck[card]); // unsure of what this does
cardsDrawn++; // adds 1 to the cardsDrawn variable?
deck[card]=1; // Unsure of what this is doing as well
carddeck.gotoAndStop(card+1); // If this is plus one its because there is no
// correct?
}
}

I had to change the movie clip instance to carddeck to seperate the deck variable and the actual movieclip. I will repost this on the main forum as well uncase you don't see it here. Thanks for the offer to help Dricciotti and believe me your name will be recognized in the game for your help in this crucial part of the program.

Thanks all.

Sending Data String To Arrays
Im working on a project that involves multiple sensors from a microcontroller coming into flash - the first number is the value of the moisture sensor, and the second is the light sensors. The data (dataVal) that Flash picks up looks something like this:

0 // Moisture
15 // Light
0 // Moisture
20 // Light...
0
13
0
16
...

the code ive got so far works but only for one value:

if (dataVal >= soilThreshold){
threshReached = threshReached +1;
}

if (threshReached == 1){
_root.plant.gotoAndPlay(2); //triggers animation
}

what i cant work out is how to make flash determine which is a moisture value, and which is a light value... I was thinking possibly create two arrays (moistArray and lightArray) then for Flash to push every first value to moistArray and every second value to lightArray, which would look like this for the above sample data:

moistArray[0,0,0,0]

lightArray[15,20,13,16]


Then have a search that searches the arrays and works on the basis of the original code, ie when light treshold is reached, an animation is triggered, just like for the moisture threshold. Anyone know how I would go about this?

Loading Data From XML Into Nested Arrays
Essentially, I'm trying to make a spreadsheet. I want to dynamically update a spreadsheet of dates, times, places, etc. for performances from an XML document. I understand how to script arrays a little but don't know what I need to do to make one multi-dimensional and load data from XML. Any help would be greatly appreciated.

The XML will be something like this:

<eventList>
<event name="name" date="date" time="time" place="place" city="city" cost="cost" comment="comment" />
<event name="name" date="date" time="time" place="place" city="city" cost="cost" comment="comment" />
</eventList>


Again, thanks in advance for any advice!

Problems With Storing CSV Data In Arrays
Hello.

I recently used a script I found on the net: The script allows CSV data to be taken and be stored in an array. The problem I am having is that it used the LoadVars() thing, I don't really understand what this does. The whole process looks like it works within a function, which is called upon loading of a file. The data is successfully transferred into an array, but I can't use that same array at some later point in the program. Here's the basic script:

var record_arr = [];
var fieldnames_arr = [];
var pos_arr = [];
var loader = new LoadVars();
var n = [];

/*** load the file ***/
loader.load(fileload);
/*** functions ***/
// use onData because text file is not of the form var=value&...
loader.onData = function(dat) {
// split on
for files on windows server
var input_arr = dat.split('
');
// split on
for files on linux servers
if (input_arr.length == 1) {
input_arr = dat.split('
');
}
fieldnames_arr = input_arr[0].split(',');
p = 0;
for (var i = 1; i<input_arr.length; i++) {
var fields_arr = input_arr[i].split(',');
record_arr.push({});
for (var j = 0; j<fields_arr.length; j++) {
record_arr[i-1][fieldnames_arr[j]] = fields_arr[j];
n[p] = record_arr[i-1][fieldnames_arr[j]];

}
}
[ here would be some maths that deal with the data in n[p]. I can only do the maths here and not outside this function]

};

As you can see, i've bolded out the important bit here. n[p] is the array where I store the data. At the moment If I were try try and access n[p] outside this function (say in scene 1, frame 20) then I wouldn't get anything returned. I can only do anything usefull within the function. Which means having to reload the same frame, taking all the data again, and doing a slightly different operation on data which hasn't changed (since I want a 1 sec delay I am jumping 12 frames then coming back).

What I wanted to know, is if there is a way to permanantly store this information so that I can access it anywhere without having to continously run the same resourse taking script over and over again?

Cheers,
Joe

Arrays Not Formatting Data - Smart Clip
I have a drop down menu smart clip that I need to populate with data from a product database. I can get the data fine, using ASP like this -

Code:
<!-- #include file="includes/db.asp" -->
<%
dim rs, StrNewsResults, StrNewsTitleResults
dim StrNewsID, StrNewsTitle
set rs = conn.execute("SELECT newsid, title FROM news")
While not rs.EOF
StrNewsResults = StrNewsResults & """" & rs("newsid") & ""","
StrNewsTitleResults = StrNEwsTitleResults & """" & rs("title") & ""","
rs.movenext
wend
rs.close
set rs = nothing

StrNewsResults = LEFT(StrNewsResults, LEN(StrNewsResults) -1)
StrNewsTitleResults = LEFT(StrNewsTitleResults, LEN(StrNewsTitleResults) -1)



response.write "NewsID=" & StrNewsResults & "&NewsTitle=" & StrNewsTitleResults

%>
Problem is, the data in flash isnt formating as an array, and keeps displaying as one big string -

"1","2","3","4"

Has anyone had any experience using the menu smart clip and populated it with external data? Let me know if you have any insight

- Brad

The code I'm using in flash is this -

[code]
loadVariables ("test.asp", _level0.list);

onClipEvent (load) {

menuArray = new Array(_root.NewsID);
this.items = menuArray;

function onMenu (item, label) {
labelArray = new Array(_root.NewsTitle);
val = labelArray[item];
_root.list.gotoAndStop(val);
}

Store Returned Data Set In Object Arrays...how?
Hello all,

I have used flash remoting to return a table of data from my database. Works great. Now I would like to take that data and store them by columns in arrays. How would I do this? Thanks!

T

Help Storing Data In Flash For Later Use, Maybe Regarding Arrays Or Object
I got a bunch of data off an XML file, player node with name, score etc

I need to store these data so I can manipulate it so I can re-write the XML file.

I can think of one way of doing it,simply create a bunch of duplicate movieclips, one for each player with variables appended to it, one for score, one for name etc.

However I am sure there must be a way of doing this without using movieclips. Basically what I need is the data to be accessible something like this:

player1.name = rob
player1.score = 200
player2.name = robert
player2.score = 100

I thought Array or Object would do the trick, but I have not used either before and they don't seem to do anything this straight forward, most likely because I am doing something wrong.

Can anybody help me?

Data Encapsulation FLAW On Arrays In Actionscript 2.0?
I have been programming in Actionscript 2.0 using the class constructs and I have run into something which is kind of curious which I would like to share with you all. It would seem that Actionscript 2.0 has a flaw in handling data encapsulation in dealing with Arrays.
Try this: create a class, say Car, and define it this manner:

ActionScript Code:
class Vehicle {
   private var numberOfWheels:Number;
   private var vehicleName:String;
   private var occupants:Array = new Array();
   public function Car (vName:String, nWheels:Number) {
      vehicleName=vName;
      numberOfWheels=nWheels;
   }
   public function addOccupant (occ:Occupant):Void {
      occupants.push(occ);
   }
   public function numberOfOccupants():Number {
      return occupants.length;   
   }
   public function listOccupants():Void {
      for (var i:Number=0; i<occupants.length;i++) {
      trace(occupants[i].getName());   
      }
   }
}
Now create the class to hold the occupants as follows:

ActionScript Code:
class Occupant {
   private var nameOfOccupant:String;
   private var ageOfOccupant:Number;
   private var isDriver:Boolean;
   public function Occupant (oName:String, oAge:Number, oIsDriver:Boolean) {
      nameOfOccupant=oName;
      ageOfOccupant=oAge;
      isDriver=oIsDriver;    
   }   
   public function getName():String {
    return nameOfOccupant;   
   }
}
Finally, create this code at the movie root:

ActionScript Code:
// create a new vehicle and fill it with 3 occupants
var car:Vehicle= new Vehicle("Jeep", 3)
// now fill it up with 3 passengers
var occ:Occupant =new Occupant ("Marco", 46, true);
car.addOccupant(occ);
occ=new Occupant ("Mary", 42, false);
car.addOccupant(occ);
occ=new Occupant ("John", 12, false);
car.addOccupant(occ);
// now the car has three passengers
// you can confirm it here:
trace(car.numberOfOccupants());
// now let's create a completely different vehicle:
var bike:Vehicle= new Vehicle("bicicle", 1)
// and let's add the passsenger for the bike
occ=new Occupant ("Tom", 16, true);
bike.addOccupant(occ);
// NOW watch this:
trace(car.numberOfOccupants());
// returns 4 and not 3!
trace(bike.numberOfOccupants());
// returns 4 and not 1!
// both arrays, instatiated as private variables in separate instances, point to the same data!
bike.listOccupants()
// you get:
//Marco
//Mary
//John
//Tom
It seems as though Actionscript is not properly encapsulating the arrays. All the other private data items (names, number of wheels, and so on) are being dealt with correctly but arrays are not.

As I am not an expert on Actionscript I may be misunderstanding the nature of the Array type but I would expect it to have created two completely independent arrays and not be addressing the same one!
Am I doing something wrong? What do you think?
BTW: I have tried this with Flash MX 2004 Professional and with Flash 8 with the same results.

XML And Arrays - Matching Data To Button (Flash 8)
Greetings!

I've got an XML document that I'm loading into Flash. Based on the data in the XML document, I'm dynamically creating buttons for a menu, using a "for" loop and an array. this works fine - no problem here.
ActionScript Code:
//where buttonHolder is a movie clip to hold the button instances
//btnCount and btnYspace distribute the instances
btnArray = new Array();
for (i=0; i<this.firstChild.childNodes.length; i++) {

buttonHolder.attachMovie("theBtn", "theBtn"+i, i);
btnArray[i] = buttonHolder["theBtn"+i];
btnArray[i]._y = btnCount*btnYspace;
btnCount++;
}




What I want to happen is this: When you press a particular button, text is loaded into dynamic text boxes. This data needs to correspond to the button instance pressed. So, if btnArray[i] instance is button 3, I need to load all the XML data for button 3.

I've placed the additional XML data in another array. I can trace that fine, so I know all the data works. The problem is linking the two. How can I determine which item in the btnArray is pressed, and load the appropriate information from the data Array?

I tell you, I'm stumped!

Display Data In Arrays In Sequence While Click Button....
i m doing a program which contain few text.
When i click a button,'step 1' text will be view.
When i second, 'step 2 ' text will be load out and 'step 1' text is still in the stage..
the method i m using is array.i put my text in an arrays..but i face problem with that..pls help me......

Transferring Array Data Between Arrays While Keeping Them Multidimensional
Hey guys, I need a little help. So I'm trying to set up a system for quests in an RPG. The idea is that you get quests, and don't have to finish them in any particular order, so when trying to remove the quest from the array i can't use shift() or pop(). So I've made a function to delete the quest should it be in the middle.

The parameter sent is the ID number of the quest.


Code:
function RemoveQuest(ID#:Number){
for(i=0; i<Quests.length; i=0){
if (Quests[0][0] == eval(ID#)){
found=true;
AddToTalk("Quest Complete: " + Quests[i][1]);
AddToTalk("Gained EXP: 15");
Char_EXP += 15;
Quests.shift();
//trace(Quests[0]);
for (k=0; k<Temp.length; k=0){
j = Temp.length - 1;
//trace("Temp.length = " + j);
//trace("Temp[j] = " + Temp[j]);
//trace("Adding " + Temp[j] + " in to Quests");
Quests.unshift(Temp[j]);
//trace("Done");
//trace("Quests now says: " + Quests);
Temp.pop();
}
} else if (found==false){
j = Temp.length;
//trace(j);
//trace("Adding " + Quests[i] + " into Temp");
Temp[j] = Quests.slice(0,1);
//trace("Done");
Quests.shift();
//trace(Temp[j]);
}
}
}
That works fine, except for one small thing. This piece of code also stores all of the quests before the one that gets deleted into a temporary array called Temp. Once it has deleted the appropriate quest, it moves the values in Temp back into Quests using the unshift() method. Now here's my problem; before i move Quests into Temp, Quests looks like this:


Code:
i = Quests.length;
Quests[i] = ["02", "Getting Some", "The Quest Giver says I won't be ready to become a true hero until I get some. I'll have to find out what 'some' is..."];
This of course spits out Quest[0][0] as "02"; Quest[0][1] as "Getting Some" etc.

Once I move this into Temp using my RemoveQuest() function with the following code:


Code:
j = Temp.length;
Temp[j] = Quests.slice(0,1);
Temp looks like this:

"02, Getting Some, The Quest Giver says I won't be ready to become a true hero until I get some. I'll have to find out what 'some' is..."

For those who can tell, this has now become a singular array, where Temp[0][0] is "02, Getting Some, The Quest Giver says I won't be ready to become a true hero until I get some. I'll have to find out what 'some' is..."; Temp[0][1] is undefined and Temp[0][2] is undefined.

This totally destroys everything. Help please?

Shared Object Arrays - More Efficient Than Calling Several Data.variables?
Lost in the concept...

I am using several shared objects..

defined as :
so.data.a = 1;
so.data.b = 2;
so.data.c = 5;....etc. (never ending list of real values)

Is it more efficient to define the shared object as an array, as far as memory is concerned?

I know it's more easier for me to read the array, but I was wondering if there's a difference in the processing of data per say.

thanks

[CS3] Issues Creating Multiple MC From Multiple Variable Data Arrays.
I have had some great help with this from some very kind FlashKit members. However I have played with the code extensively and am having an issue getting multiple MC's from the global variable arrays "V_1", "V_2" and "V_3".

Right now I have the code set to build up a scalable graph for array V_1. I have not had it working "properly" to show the other values in graphs side by side for V_2 and V_3. I have had some weird Frankenstein looking results that led me to believe I was on the right track, but only to find that I could not figure it out. I have a g_seperator variable that I was hoping to use to determine the space between each column of data.

Can anyone out there help me please?

Thank you.

here is my code reprinted here, since my flavor of Flash may not export to a version compatible with some of your working versions.



Code:
stop();
//BAR ATTRIBUTES
_global.g_x = 240;// chart starting x position
_global.g_seperator = 130;// distance between bars
_global.g_width = 50;// graph segments width
_global.g_base = 450;// graph starting Y position
_global.g_alpha = 40;
//BOX VALUES
_global.v_1 = new Array(20, 40, 1, 10, 12, 10, 20, 15, 5, 21, 31, 50, 20, 10, 20);
_global.v_2 = new Array(60, 70, 1, 10, 42, 10, 50, 15, 30, 21, 31, 10, 20, 10, 20);
_global.v_3 = new Array(20, 70, 1, 10, 12, 10, 20, 25, 10, 31, 31, 10, 20, 10, 20);
_global.color_set = new Array(0x000099, 0x00FF00, 0xddddd, 0xcccccc, 0x990000d, 0xff9900, 0x99eeee, 0x99cccc, 0xf21000, 0xffdddddd, 0x005900, 0xff00ff, 0x0ff000, 0xff9999, 0xf2f321);
_global.pos_name = new Array("Site3", "Site5", "Site7");

var home = this;

draw1NPositions("mc_pos"+[p],pos_name[p],g_seperator);

function draw1NPositions(mc_pos, positionName, gap) {
this.createEmptyMovieClip(mc_pos,1000);
for (i=0; i<v_1.length; ++i) {
makeBox(i,g_x,g_base,g_width,v_1[i],color_set[i]);
}
}
function drawBox(mc, w, h, color) {
mc.beginFill(color);
mc.lineStyle(0,color,100);
mc.moveTo(0,0);
mc.lineTo(0,-h);
mc.lineTo(w,-h);
mc.lineTo(w,0);
mc.lineTo(0,0);
mc.endFill();
}
function makeBox(num, posX, posY, wide, tall, color) {
var myBox = home.createEmptyMovieClip("box_mc"+num, num);
myBox._x = posX;
myBox._y = posY;
myBox.num = num;
myBox.dragging = false;
drawBox(myBox,wide,tall,color);
myBox.onMouseUp = function() {
this.dragging = false;
};
myBox.onMouseDown = function() {
if (this.hitTest(_xmouse, _ymouse) && !this.dragging) {
this.startY = _ymouse;
this.startX = _xmouse;
this.startH = this._height;
this.dragging = true;
}
};
myBox.onEnterFrame = function() {
for (var i = 1; i<v_1.length; i++) {
boxes[i-1].y = home["box_mc"+(i-1)]._y=home["box_mc"+i]._y-home["box_mc"+i]._height;
}
};
myBox.onMouseMove = function() {
if (this.dragging) {
dist = this.startH-(_ymouse-this.startY);
boxes[this.num].h = this._height=(dist>1) ? dist : 1;
_root.boxValue.text = this._height;
}
};
Mouse.addListener(myBox);
}

Arrays In A Text File To Arrays In Flash
What i am wanting to do is get an array list from an external file and put it into flash arrays, the code i tryed to use was this:


PHP Code:



            for (i=1; i<33; i++) {
                
                if(id=="undefined" || id=="NaN"){
                    
                } else {
            
                id[i] = id(i)

                               }

                         } 




But that dosent work obviously.

I know ive got the
PHP Code:



id[i] 




bit right, but i dont know how to do the bit from the text file.

in the file it goes like this:


PHP Code:



id1=432&id2=324 ect 




So basically what i am trying to ask is how to in a look do variables using the i (id plus the i at the end). Anyone got any ideas?

Sorting Arrays...2-Dimensional Arrays
How would I go about sorting two dimensional arrays using the sort() function. What I'd like to do is organize the arrays inside of an array by a certain variable...

i.e:

array1 = new Array("Name", "State1", "Cost");
array2 = new Array("OtherName", "AnotherState", "OtherCost");
array3 = new Array("DifferentName", "YetAnother", "AndAnother");
allarrays = new Array(array1, array2, array3);

Now, let's say I want to sort the arrays in allarrays by their state variable. In other words, I want to sort them so allarrays would look something like this (if sorted by state):

allarrays:
array2,
array1,
array3

Any suggestions or past experiences with this sort of sorting? Would I use the Sort() fuction? or would I have to make my own sort function? Thanks in advance for any help you can provide.

Arrays: Cleaning Up Empty Arrays
Hi,
So, I have an array generator, and its not worth explaining the details, but long story short, I end up with an array in which some of the slots are "undefined". How can I go through and remove just those slots? Eg this this my Array

myArray[1] = "red"
myArray[2] = "blue"
myArray[3] = undefined
myArray[4] = "pink"
myArray[5] = "undefined

and what I want to end up with is:

myArray[1] = "red"
myArray[2] = "blue"
myArray[3] = "pink"

thx!

-Z

Arrays/Arrays/Arrays/and Functioning.
Can someone please , tell me how to shorten that Rescale function to just do all the movies in one shot ? and also to add an array for the delay which is the ( o.2, 0.4,0.6 ) so i need to shorten all this to do something like this


Code:
rescale = function(){
this.scaleTo(100,2,"easeOutElastic",this.speed);
this.alphaTo(100,2,"linear",this.speed);
}
//... the next line is inserted within the duplicate movie loop
eval("item"+a).speed = 0.2*a


Instead of all this..

Code:
// Callback Function for lacos to tell when to rescale/alpha back to 100 percent
reScale = function(){
//How can I shorten this by just making an array and doing this in One shot ? is the only problem
item0.scaleTo(100,2,"easeoutElastic",0.2);
item0.alphaTo(100,2,"linear",0.2);
item1.scaleTo(100,2,"easeoutElastic",0.4);
item1.alphaTo(100,2,"linear",0.4);
item2.scaleTo(100,2,"easeoutElastic",0.6);
item2.alphaTo(100,2,"linear",0.6);
item3.scaleTo(100,2,"easeoutElastic",0.8);
item3.alphaTo(100,2,"linear",0.8);
item4.scaleTo(100,2,"easeoutElastic",1);
item4.alphaTo(100,2,"linear",1);
item5.scaleTo(100,2,"easeoutElastic",1.2);
item5.alphaTo(100,2,"linear",1.2);
item6.scaleTo(100,2,"easeoutElastic",1.4);
item6.alphaTo(100,2,"linear",1.4);
item7.scaleTo(100,2,"easeoutElastic",1.6);
item7.alphaTo(100,2,"linear",1.6);
item8.scaleTo(100,2,"easeoutElastic",1.8);
item8.alphaTo(100,2,"linear",1.8);
item9.scaleTo(100,2,"easeoutElastic",2);
item9.alphaTo(100,2,"linear",2);
item10.scaleTo(100,2,"easeoutElastic",2.2);
item10.alphaTo(100,2,"linear",2.2);
item11.scaleTo(100,2,"easeoutElastic",2.4);
item11.alphaTo(100,2,"linear",2.4);
item12.scaleTo(100,2,"easeoutElastic",2.6);
item12.alphaTo(100,2,"linear",2.6);

};

//Duplicate method puts all movieclips on stage at 0 alpha so the user doesnt see the placement
for (a=0; a<titles.length; a++) {
duplicateMovieClip("item", "item"+a, a+1);
//eval("item"+a).alphaTo(0,0,null);
eval("item"+a).item_txt.text = titles[a];
eval("item"+a).tween("_x", [posX[a]], 4, "easeoutElastic");
eval("item"+a).tween("_y", [posY[a]], 4, "easeoutElastic", 0.1);
//Callback function is set here
eval("item"+a).scaleTo(0,0.2,"easeoutElastic",0.1,reScale);
item._visible = false;
}

Arrays Referencing Other Arrays?
Picture this... I declare two arrays:

array1= new Array();
array2 = new Array();

Then I went through some data and added values to "array1". For this example, let's say it has 20 values. (length = 20)

I want array2 to be a "backup" of this data, so I did this:

array2 = array1;

I would expect array2 to simply be a copy of the contents of array1. But, whenever I .pop() a value off of array1, array2 ALSO loses that same value! How is this possible? Is array2 only a "reference" to array1??

Only Arrays Or Arrays And Objects
Hi

I've been told not to do this with an array...


PHP Code:



var travelbooks:Array = new Array();
travelbooks.push({titel: "Madrid", release: 2004, pages: 248});
travelbooks.push({titel: "Barcelona", release: 2003, pages: 224});
travelbooks.push({titel: "Tenerife", release: 2002, pages: 124});
travelbooks.push({titel: "Malaga", release: 2005, pages: 172});

for (var i=0; i < travelbooks.length; i++) {
     trace(travelbooks[i].release + " - " + travelbooks[i].titel);





... but to do this...


PHP Code:



var travelbooks:Array = new Array();

var book_1:Object = {titel: "Madrid", release: 2004, pages: 248};
var book_2:Object = {titel: "Barcelona", release: 2003, pages: 224};
var book_3:Object = {titel: "Tenerife", release: 2002, pages: 124};
var book_4:Object = {titel: "Malaga", release: 2005, pages: 172};

travelbooks.push(book_1, book_2, book_3, book_4);
trace(book_1.titel);
trace(travelbooks);
trace(book_releases);

function book_releases():void {
    for (var i:Number = 0; i < travelbooks.length; i++) {
        trace(travelbooks[i].release + " - " + travelbooks[i].titel);
    }





Could you tell me why i'm not supposed to use the first example? And why example 2 doesn't work?

Thank you
Ferran

Creating Arrays From Arrays?
I'm not sure this is possible but...

I'm trying to create a series of arrays from one main array.

My main array [main_elements] contains four items - interactive, motion, print and illustration. This main_elements array is dynamically created from an xml file.

I'm wanting to create a set of arrays based on the content within this initial 'main_elements' array.

So i would end up with an interactive array, motion array , print array and an illustration array.

currently i'm at this stage with it...although i've tried every other combination i can think of to get it working.


ActionScript Code:
for(q=0; q<work_elements; q++){
 
    main_elements[q] = xmlDoc_xml.firstChild.childNodes[1].childNodes[q].nodeName
    //this is the actual categories of work - the areas - interactive,motion,print,illustration
   
    var Vname = work_elements_ARRAY[q]
    //i need to create an array based on the names in the work elements area
    //ie i need an interactive array - motion array etc
    Vname = new Array
                   
    trace("Vname-- "+interactive.length)
    //this trace should pick up the newly created interactive array but it doesn't exsits...???
    }//end of second for
 


I would then fill these arrays with the work items.

As you can guess its a menu system of the simplest kind i'm trying to build.

Is there a better way to be doing this or is it a case of correct syntax / approach??

# Of Arrays - Length Of Arrays
Is a length of 540 to long for an array?
If so what a good limit to cap it at?

What # arrays of max limit are to many for a flash movie?
10?
100?
1000?

I'm just curious as i need to track the _x and _y of a dragable MC for as long as possible - 3 to 4 minutes if i can squeeze that. It needs to have smooth motion when it's played back, so the cord's need to be stored about 3 times a second. I was just wondering if anybody has an idea of how much data is too much?


All comments are welcome. Thx

Arrays In Arrays Trouble
does AS3 have capability to do multidimensional arrays? My computer won't let me download it because I have edu version. 2D arrays would make this a lot easier. Here's the class:

Code:

class com.samainsworth.math.matrix {
   
   var arr:Array;
   var r:Number;
   var c:Number;
   
   public function matrix(r:Number, c:Number) {
      this.arr = new Array(c);
      for(var i in this.arr) {
         this.arr[i] = new Array(r);
      }
      
      this.r = r;
      this.c = c;
   }
   
   public function getPos(r:Number, c:Number) {
      return this.arr[c][r];
   }
   
   public function fillPos(val, r:Number, c:Number):Boolean {
      if(r <= this.r && c <= this.c) {
         this.arr[c][r] = val;
         return true;
      }
      else {
         return false;
      }
   }
}

here's the code in the movie:

Code:

import com.samainsworth.math.matrix;

var m:matrix = new matrix(2, 2);

trace(m.fillPos(1, 0, 0));
m.arr[0][0] = 1;

trace(m.getPos(0, 0));

and last but not least here's error:

Code:

true
undefined


I'm trying to work on 3D which requires a lot of matrices work even though flash doesn't support 3D you can fake it with a lot of math - http://www.kirupa.com/developer/actions ... onCube.swf

Mx.data.components - Unable To Declare Data Component Types In External Class Files
Hi all,

FlashMX 2004, v7.2:

I am trying to declare instances of data-components (DataSet and DataHolder) in external classfiles, but Flash can't find the sourcefiles for any of the data component classes in the classpath.

According to the help-files, the classname for the DataHolder component is:

Code:
mx.data.components.DataHolder


Similarly, the classname for the ComboBox component is:
mx.controls.ComboBox

Code:
mx.data.components.DataHolder


In the following, the ComboBox gets declared, and the DataHolder generates a "Class can't be loaded" error:


Code:
class my_class extends MovieClip {

var my_cbox:mx.controls.ComboBox;
var my_data:mx.data.components.DataHolder;

function my_class() {
// constructor function
}

}


Sure, it fails because there is no "components" folder in the mx.data folder (at least on my system), and I have been unable to find any DataHolder.as file anywhere either, even though the documentation gives examples that reference the mx.data.components-folder for various data components. I even tried re-installing to make sure I had not accidentally deleted any classfiles, but still no luck.

Am I missing something really obvious here? Does anyone know how to successfully import, declare or otherwise make use of data-components in external class files? Any help greatly appreciated.

Send Form Data To A Php Script Which Writes The Data To A .txt File
Hi!

Ok, this might be very easy but I´m new to both AS and PHP so I´m struggling here and I havent found any useful tutorials to use only small bits here and there.

What I want to do: I have a form which send data to a php script which then writes the data to a .txt. This .txt file is then used by a .swf file to display certain values.
I also have 1 field that I want to use as a validation field as a simple(but yes, not very safe) way to make sure only the right persons submit information.

I have got the .swf file to read the .txt file so thats no problem.

Has anyone got any suggestions about how I do this?

I have an idea of letting the validation field be checked against a .txt file and if one of the lines in the .txt file matches the validation field the rest of the information is submitted and sent to the php script.
Difficult?

Many thx in advance!

Is There Anyway To Read Data In From A Text File And Populate An Array With The Data?
hello,
i'm new to flash, and i'm trying to create a photo gallery. however, the photos may not always be the same, and i need to have a way to easily change the pictures without having to go back into flash to change the code everytime. i thought a good way to do this would be to read the names of the pictures in from a text file and then use those names to populate an array, similar to the tutorial on creating a photo gallery on kirupa.com. the problem is, i have no idea how to do this. anyone have any ideas?
thanks

Converting Internal Array Data Into External XML Data [renamed]
I have this code inside my flash to name my navigation menu. Now I want to put this outside flash and load it via XML. How do save my different arrays into a variable for later use in my code?

In my nav fla (what i want to load from XML):

Code:
// MAIN MENU ARRAY
var mm_array:Array = ["MAIN1", "MAIN2", "MAIN3", "MAIN4"];

// SUB MENU ARRAY
var sm1_array:Array = ["sub1", "sub2"];
var sm2_array:Array = ["sub1", "sub2", "sub3"];
var sm3_array:Array = ["sub1", "sub2", "sub3"];
var sm4_array:Array = ["sub1", "sub2", "sub3", "sub4"];
var submenu_array:Array = [];
XML loading code

Code:
// LOAD MY XML
var myXML:XML = new XML();
myXML.ignoreWhite = true;
myXML.onLoad = function (success:Boolean):Void {
if (success) {
// what goes here to define: mm_array, sm1_array, sm2_array etc
myXML.load("myXML.xml")
XML file something like this:

PHP Code:



<navigation>
    <menu>
        <mm_array>main1</mm_array>
        <sm_array>sub1</sm_array>
        <sm_array>sub2</sm_array>
    </menu>
    <menu>
        <mm_array>main2</mm_array>
        <sm_array>sub1</sm_array>
        <sm_array>sub2</sm_array>
        <sm_array>sub2</sm_array>
    </menu>
</navigation> 

XML Data Displayer, Help Adding Multiple Data Fields Relating To XML
I recently used the Displaying XML Data tutorial, but cant seem to figure out how to add more dynamic text fields and populate them with more <person> and <comment> attributes.

Here is my code:

function loadXML(loaded) {
if (loaded) {
_root.inventor = this.firstChild.childNodes[2].childNodes[0].firstChild.nodeValue;
_root.comments = this.firstChild.childNodes[2].childNodes[1].firstChild.nodeValue;
name_txt.text = _root.inventor;
comment_txt.text = _root.comments;
} else {
content = "file not loaded!";
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("inventors.xml");

and xml:

<?xml version="1.0"?>

<inventors>
<person>
<name>Thomas Edison</name>
<comment>Inventor of many things such as the incandescent lightbulb.</comment>
</person>
<person>
<name>Doug Engelbart</name>
<comment>Invented the mouse at the Stanford Research Institute</comment>
</person>
<name>Patrick</name>
<comment>did this xml file</comment>

</person>
</inventors>

I am trying to display Patrick - and did this xml file.

Could you please help me figure out what I am doing wrong here?

Is There Anyway To Read Data In From A Text File And Populate An Array With The Data?
hello,
i'm new to flash, and i'm trying to create a photo gallery. however, the photos may not always be the same, and i need to have a way to easily change the pictures without having to go back into flash to change the code everytime. i thought a good way to do this would be to read the names of the pictures in from a text file and then use those names to populate an array, similar to the tutorial on creating a photo gallery on kirupa.com. the problem is, i have no idea how to do this. anyone have any ideas?
thanks

Help Me Define My Search.. ( Sound Data To Graphic Data)
I don't know what the actual terminology is so my searches are tanking. What I want to do is to take an audio file and based on the tones and whatnot generate graphics that move with the music. The visualizations in Windows Media Player do exactly what I want but I don't know what it is actually called.

Any help to point me in the right direction is much appreciated.

Thanks

Scroll Bar Works For External Data But Not Internal Data
Howdy,

I have a dynamic text box named 'outputbox'. This is set for multiline. I have an associated scroll bar.

I make a lot of these kind of calls:


PHP Code:



history.onPress = function() {
    outputbox._visible = true;
    loader = new LoadVars();
    loader.load("history.txt");
    loader.onLoad = function() {
        outputbox.text = this.history;
    }; 




This works great, the scrollbar becomes active when the text goes beyond the outputboxes boarders.

In addition, this 'outputbox' also has a variable (Var) associated with it named 'myTally'. At some particular frames I am generating content for this variable thusly:


PHP Code:



for (receipt = 0; receipt<23; receipt++) {
    
    description = _root["config"+receipt][1];
    price =  _root["config"+receipt][2];
    if (description != 0) {
    mytally = (mytally+"
" +description+" "+ price); }





Indeed, the outputbox certainly gets populated but the scrollbar does not work. When I select-and-drag the text it definitely goes beyond the boarders of the outputbox. If I change the font size of this outputbox (8pt to 16pt) then the scrollbar *does* work.

Why does the scrollbar react to an external file and not my dynamically generated variable? Is something not scoped or in focus? I really have no idea. Anyhow, any suggestions of where to look for resolution would be greatly appreciated.

Thanks,
Cheez

Flash Data Intergratino Useing Xml Data Bases
im not huge newbee to this , iv overcome the majority of the studid little qustions but i ask you this , how do you create adatebasse of say mp3s thru flash using a xml database. first, how do you embeed say mp3 files into a xml document and so on and so on

How To Drag Column Data From One Data Grid To The Anther?
How to drag column data from one Data Grid to the anther?
Hi,
I build an application in mx2004 and I have 2 dataGrid instants containing data.
I am looking for a way to let the user drag a row of data from a data grid and drop it in anther data grid.
I have an “EventListener” on “myListener.cellPress” caching the data, but I could not find a way to determine where to drop the data and how to insert it to the destination dataGrid.
Thank
Nimrod

Flash Sends Data To PHP, Browser Waiting For Data
Hi,

I have the following problem. I'm implementing a flash form mailer using PHP to send out the mail. I'm doing this in the actionscript to sed out the data:

_root.mcDataField.loadVariables("form.php", "POST");

Then my PHP script looks like this:

$sendTo = "xyz@server.com";
$subject = "Some title here";

$headers = "From: " . $_POST["Name"]. "<" . $_POST["Email"] . ">
";
$headers .= "Reply-To: " . $_POST["Email"] . "
";
$headers .= "Return-Path: " . $_POST["Email"];

$message = $_POST["Message"];
$retVal = mail($sendTo, $subject, $message, $headers);


When I sendthe data, it gets emailed, but the browser shows (in the bottom left corner): "Waiting for xyz.com", where xyz.com is the server I have my files on.

Any idea would be greatly appreciated! Thank you!

How To Drag Column Data From One Data Grid To The Anther?
How to drag column data from one Data Grid to the anther?
Hi,
I build an application in mx2004 and I have 2 dataGrid instants containing data.
I am looking for a way to let the user drag a row of data from a data grid and drop it in anther data grid.
I have an “EventListener” on “myListener.cellPress” caching the data, but I could not find a way to determine where to drop the data and how to insert it to the destination dataGrid.
Thank
Nimrod

MyComboBox.addItem(label [,data]) How To Add Data?
The Flash help says to add an item to a ComboBox using myComboBox.addItem(label [,data]). I have no problem adding the label but my data is two items: unit and value. How do I add these two pieces of data?

An example of a comboBox listing might be:
Label: Rope
Unit: Feet
Value: 2.00

So if a user selects Rope, they will see it's $2.00 a foot.

Thanks for any help.

Data Connection/Data Holder Comps
I do a lot of developing with SQL->PHP->XML->FLASH, and end up having to deal with a LOT of data that I both recieve and send. I really just noticed the Data Connection/Data Holder comps like...today and I dont really see how they are all that much better than just using my own array's and objects. Perhaps my limited understanding of them prohibits my appreciation. Anyone care to enlighten?

AS2: Data Bind SQL Query Data To ComboBox
Can anyone point me in the right direction - I'm using Flash remoting with CFCs and I'm trying to pull query data from SQL and populate a ComboBox with AS2 components.

I have a CFC called "states.cfm" and Flash Remoting is set up and connecting properly (AS2 components). It's pulling 2 columns from the states table, "state" and "stateValue". In the flash movie there's a dropdown with an instance name "dd_states". I've searched all over (Using Flash,macromedia,google,flashkit) and I can't find a clear example using the AS2 databinding components using data from a SQL Query....

ThxInAdv

Data Grid Versus Data Connection Kit
can anybody explain me an advantage of data connection kit
over data grid, is it realy better? there is no test version of firefly so u can not test it.

i mean does anybody used the data grid and than chaned to
firefly?is this connector-resolver stuff that usefull? is it worth 299$

thanks nermin

Copyright © 2005-08 www.BigResource.com, All rights reserved