I'm afraid I don't understand some of your code; my direct experience with
using cuepoints isn't up-to-date.  Havn't used it in a couple of years. >.<



But there is one part of your code that might be off:


                if (contains("texthtml", cueArray) == -1) {



Shouldn't it be:

                if (contains(texthtml, cueArray) == -1) {

 ...otherwise you're comparing the string value "texthtml" rather than the
value of the texthtml String variable.



--------------------------------
Andrew Murphy
Interactive Media Specialist
[EMAIL PROTECTED]

Delvinia
214 King Street West, Suite 214 
Toronto Canada M5H 3S6

P 416.364.1455 ext. 232  F 416.364.9830  W www.delvinia.com

CONFIDENTIALITY NOTICE
This email message may contain privileged or confidential information. If
you are not the intended recipient or received this communication by error,
please notify the sender and delete the message without copying or
disclosing it.

AVIS DE CONFIDENTIALITÉ
Ce message peut contenir de l'information légalement privilégiée ou
confidentielle. Si vous n'êtes pas le destinataire ou croyez avoir reçu par
erreur ce message, nous vous saurions gré d'en aviser l'émetteur et d'en
détruire le contenu sans le communiquer a d'autres ou le reproduire.


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Paul Jinks
Sent: Tuesday, July 08, 2008 10:07 AM
To: Flash Coders List
Subject: RE: [Flashcoders] Basic loop problem (with end of message)

Thanks to everyone who replied on this, mostly with the same solution:

On Tue, July 8, 2008 1:07 pm, Andrew Murphy wrote:
> mainText.htmlText = "";
> for(var i:uint = 0; i < cueArray.length; ++i) {
>       mainText.htmlText += "<b>" + cueArray[i] + "</b>"; }

Unfortunately, this doesn't fix the problem, which makes me think I have an
additional problem elsewhere (see below). Here's what I see when I play past
cue point 1:
Cue Point 1
But if I review it and play it again I get this:
Cue Point 1
Cue Point 1 and so on...
In other words, it's as if it's just adding the last cue point every time.
>:(

I suspect there's something hokey with the way I'm treating my array?
Here's the relevant code:

vidList.cuePoint = function(cues) {
        texthtml = ("<p>")+cues.info.name;
        if (cues.info.type == "event") {
                if (contains("texthtml", cueArray) == -1) {
                        len = cueArray.length;
                        cueArray[len] = texthtml;
                        var len2 = cueArray.length;
                        mainText.htmlText = "";
                        for (var i = 0; i<len2; i++) {
                                mainText.htmlText +=
"<b>"+cueArray[i]+"</b><br>";
                        }
                }
        }
};
caption_flvp.addEventListener("cuePoint", vidList);

If you're still reading and thinking it through, many, many thanks.

Paul

_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to