I am working on a little flash project that deals with instant messaging. the portion i am having a lot of trouble in (for now) is the part that lists all the users who are my friends.
well i know that php can only export values into flash’s variables and not instance names. but in my application that i’m trying to make, i need to create new flash instances for each of my friends’ names. any ideas to go around this?
this is my idea and well, it wasn’t very successful but if someone can help thru this or any other way i’d greatly appreciate it.
i created a movie clip with a dynamic text field inside it with variable name ‘fname’ and instance name ‘fnameinst’. when file is executed, it finds the friends’ names of my username, which is ‘davydany’ and returns how many friends i have. and then it lists my friends’ names in this order:
_root.fuser1=Lambis&
_root.fuser2=Khaled&
_root.fuser3=Blesson&
well my problem now is this. when the loop goes on in flash, like this:
for (i = 0; i < row; i++)
{
attachMovie("friend", "friendName" + i, this.getNextHighestDepth(), {_x:0, _y:ypos});
ypos = ypos + 19;
}
where row = the number of friends I have, in this example, i only have 3 peoples’ names set up in my server.
well so for each new instance name for my friend the movieclip’s instance names are goin go to be:
friendName1
friendName2
friendName3
i tried this
for (i = 0; i < row; i++)
{
attachMovie("friend", "friendName" + i, this.getNextHighestDepth(), {_x:0, _y:ypos});
ypos = ypos + 19;
_root.(friendName+i).fnameinst.text=(fuser+i)
}
and, ofcourse, i get a error. any way to go about dynamically creating movie clips that recieve only one value for which it is assigned from php?