PDA

View Full Version : Need help


pyrael
05-04-2008, 03:49 AM
ok, i have been working on a folding at home statistics project. Which gets statistics via a php script per user and then displays the stats.

here is what I have so far: linky (http://www.pyrael.com/stats/statspy_endor.swf?un=pyrael&bg=6.jpg&clr=0x0000FF)

I cheated a little with this. I have a bunch of different flash files - one for each different font. The vars that can be passed are un= (user name), bg= (background image), clr= (text color)

I wanted to make this thing MORE dynamic and add individual computer information.

Basically, the php script has been re-written to send not only data based upon user, but also based on team and individual computers per user. What I would like to do is have flash display the Team Stats as the first keyframe (easily done) and the user overall stats on the next keyframe and then a separate keyframe to display each individual computer's stats (belonging to that user) on a separate keyframe each.

My problem is that some users have 1 or 2 computers, others have 5 or 6 and some even more. So I wanted to have flash add keyframes based upon a var passed by the php called rig_count=n that would tell flash to make n amount of frames and populate the info for each separate rig. I saw a thread under JSFL that mentioned adding frames with:

fl.getDocumentDOM().getTimeline().insertFrames();

I am assuming I could use insertKeyframe or insertBlankKeyframe to add the frames, but the question is can I also add text feilds in the same manner?

here's a sample of what the php script sends:
1_ppd=796
1_state=Ok
1_prog=56
1_eta=1d 04h 05mn
1_name=fah smp
1_value=2144
1_unit=3065
2_ppd=499
2_state=Async
2_prog=93
2_eta=7h 19mn
2_name=AG8
2_value=2539
2_unit=3060

the number is the rig number (assigned and appended by the php script).
i would like to name each dynamic text box so that it will receive these variables. i.e.:
flash makes a frame where text is displayed for each variable:
ppd=
state=
progress=
eta=
name=
points value=
unit number=

and then in a dyn txt box next to them displays the data from those vars

i am thinking that the text boxes would have to be given instance names (where the #_ part would come in to play) and would have to be called 2_unit and 2_unit_val respectively.

so, my question: can this be done? and if so, how?

Thanks in advance

Py