Ok, i know it sounds like the problem that had been done over and over again, but none of the search results helped me solve it.
I send flashvars to flash. Those variables are one user id variable and unknown number of corresponding friend and relation vars (friend1, friend2, relation1, relation and so on, all the items from DB).
I get the of course from an object:
and check how many friends did the php send to me . There is one user id variable and an even number of friends and relations so the way i check how many mates do i have is:Code:var flashVars=this.root.loaderInfo.parameters;
Simple so far. Now, what i need from you guys is help in creating a loop, which would assign meaningful names to those variables. I already have the mates variable which would be used to control the loop, and I want it to look (work?) something like that:Code:for each (var prop in flashVars) { varValueArray.push(prop); } var helpNum = varValueArray.length; mates = (helpNum-1)/2;
Where of course the >count< would be a number incrementing each time the loop is ran.Code:for (var count=1 ; count<=mates ; count++){ friend>count< = this.root.loaderInfo.parameters.friend>count< relation>count<= this.root.loaderInfo.parameters.relation>count< }
Can't get over this one. Please help


Reply With Quote
