Hi, Paul,
Currently, in each loop you are overwriting the text in the field (it's not
like trace() ).
If you're using AS2, use the += operator instead of =
If you're using AS3, use appendText() (although I'm not
currently remembering the htmlText / appendText interactions)
-jonathan
On Tue, Jul 8, 2008 at 12:56 PM, Paul Jinks <[EMAIL PROTECTED]> wrote:
> Apologies for last post: it got sent before I'd finished. That'll teach me
> to try to use the tab key using IMAP ;-). Here's the message again in
> full:
>
> I'm new to coding and I'm having a problem getting a for loop to do what I
> want it to. I think this is pretty basic, but I'll let you be the judge.
>
> I have a project to play through an flv which fires event cue points at
> certain points. At these points, text appears at the side of the video
> window as summaries of what's being said. The summary text is the name of
> the cue point and is added to an array called cueArray after checking that
> it doesn't already exist. So far so good.
>
> The last step is to output the full array to the text field and it's at
> this point that I'm at hitting head against wall pitch. I just can't get
> it to output the whole array in sequence. What I'm using is:
> var len2 = cueArray.length;
> for (var i = 0; i<len2; i++)
> {
> mainText.htmlText = "<b>"+cueArray[i]+"</b>";
> }
> But what this does is print only the last item in the array, whereas I'm
> expecting it to print the array in full.
>
> TIA
>
> Paul
>
>
> _______________________________________________
> Flashcoders mailing list
> [email protected]
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
--
-jonathan howe :: 404.434.2321 :: 180 High St Apt 26 Portland, ME 04101
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders