Google
 
Webnews.only-4-geeks.com
Interesting places
news.only-4-geeks.com Forum Index » Flash - ActionScriptGoto page 1, 2  Next

Closed Captioning

 
Jump to:  
 
David Stiller
PostPosted: Fri Jul 04, 2008 1:36 pm    Post subject: Re: Closed Captioning
       
yevri,

I notice that in your addEventListener() method, you gave
"MetadataEvent" a capital D. If that's the issue, it doesn't especially
seem to match the error message you got (at least, to me), but it's easy
enough to test. :)


David Stiller
Co-author, Foundation Flash CS3 for Designers
LINK
"Luck is the residue of good design."
 

 
David Stiller
PostPosted: Fri Jul 04, 2008 2:02 pm    Post subject: Re: Closed Captioning
       
yevri,

Quote:
Thanks for the reply, David. I changed that and it didn't
help, but I appreciate you checking my code!

Are you still getting an error message? If so, what is it?


David Stiller
Contributor, How to Cheat in Flash CS3
LINK
"Luck is the residue of good design."
 

 
yevri
PostPosted: Fri Jul 04, 2008 3:20 pm    Post subject: Re: Closed Captioning
       
Thanks for the reply, David. I changed that and it didn't help, but I appreciate you checking my code!
 

 
David Stiller
PostPosted: Mon Jul 07, 2008 12:28 pm    Post subject: Re: Closed Captioning
       
Yevri,

This indeed looks as if you're mixing ActionScript 2.0 with ActionScript
3.0, which would sum up your issue right there. They can't be mixed in the
same SWF file.

Quote:
captionsXML.onLoad = function():Void {
captions = this.firstChild.childNodes;

For example, these lines are AS2 (you can tell by the uppercase "V" in
"Void").

In your original post, you had code like this:

vid.addEventListener(MetaDataEvent.CUE_POINT, cueText);

.... which is AS3 (you can tell by the uppercase CUE_POINT event constant).

To move forward, you'll have to decide -- from a bird's eye view -- what
language you want to develop this project in as a whole. Then you'll have
to revise all code to suit that version of the language (cue points are
possible in AS2 as well as AS3).

Does that steer you in the right direction?


David Stiller
Adobe Community Expert
Dev blog, LINK
"Luck is the residue of good design."
 

 
David Stiller
PostPosted: Mon Jul 07, 2008 2:00 pm    Post subject: Re: Closed Captioning
       
Quote:
Thanks for the code and advice, FrankErazo.

Heh, looks like I replied to FrankErazo thinking it was Yevri (doh!).

Quote:
Is this actionscript 2 or 3?

FrankErazo's code is AS2.

Quote:
I planned to use ActionScript 2 and my FLA is set up for that, but
was grabbing code without thinking about version (thanks for the
warning, David).

Sure thing. Your code, from your first post, is AS3.


David Stiller
Adobe Community Expert
Dev blog, LINK
"Luck is the residue of good design."
 

 
yevri
PostPosted: Mon Jul 07, 2008 3:33 pm    Post subject: Re: Closed Captioning
       
Thanks for the code and advice, FrankErazo. Is this actionscript 2 or 3? I
planned to use ActionScript 2 and my FLA is set up for that, but was grabbing
code without thinking about version (thanks for the warning, David).
 

 
yevri
PostPosted: Mon Jul 07, 2008 9:44 pm    Post subject: Re: Closed Captioning
       
Thanks for the help David. FrankErazo, thanks for the script. I haven't quite
got it to work yet. I get nothing when I run the file. Do I make the dynamic
text field a movieClip with the instance name of txtCaption? I've tried it that
way and with no movieClip with an instance name and without the instance name
but with the variable name as txtCaption. Can you clarify? When I run the file
with instance and variable name set to txtCaption, I get this in the dynamic
text field: _level0.vidholder.txtCaption (I have the FLV called into a swf that
I then call into a movieClip on level 0 - the movieClip has the name
vidholder). When I run the swf by itself, I get this in the text field:
_level0.txtCaption.

Any ideas on what I'm doing wrong? In case anyone wants to view these, the
FLAs are posted here: LINK

There is an intro.flv file up there to if you need that:
LINK
 

 
FrankErazo
PostPosted: Mon Jul 14, 2008 5:26 pm    Post subject: Re: Closed Captioning
       
Yevri:

Go to my website (www.frankerazo.com) and click on the link labeled My
Work
. On that page, you will find a zip file labeled nature.zip.
That file contains all the information you need.

Since you said you were on a time crunch, I figured sending you the FLA would
be better than having you spend time trying to figure out how to make one work.
Besides, you can always go back and look a this later to study.

And yes...I am using ActionScript 2.0 with Flash 8.

Let me know if it works...enjoy! :beer;
 

 
erlendbv
PostPosted: Tue Jul 15, 2008 5:29 pm    Post subject: Re: Closed Captioning
       
Dear FrankErazo.

Thanks for providing the FLA-source on your site. The code is really neat, and
you seem to have control of what you're doing ( in contrast to my coding
sessions based on trial and error Smile ).

I have a question for you (or anybody else who can contribute). This may be
slightly off-topic, but it's still closely related;

I have a task to provide exactly what you have provided, but for a
movieclip. I will load an external SWF into the movieclip, and present
subtitles as they are shown in your project, based on cue points in the SWF.
The problem, of course, is that I can't use the FLV-playback. And that means
that I don't have any addASCuePoint(). I think.

Now, what should I do to reach this goal? All suggestions will be greatly
appreciated, as I'm pushed towards a deadline and find myself short of the
intelligence to figure out a solution. Sad - Thanks in advance!

Best Regards,
ErlendBV
 

Page 1 of 2 .:. Goto page 1, 2  Next

Google
 
Webnews.only-4-geeks.com

Windows Update | C++ | C | PHP | JavaScript | Photoshop | Programming | Windows 2000 | Python | Windows XP | Object | Flash | Flash - ActionScript | Paint Shop Pro | Excel | PowerPoint | Access | Word | Windows 98 | Internet Explorer 6.0 | CorelDraw12 | Java | XML | asm x86 | Linux Mandrake | Linux RedHat | Outlook |  | news from newsgroups |_ | s

Web Templates

Awesome Website Templates ©

odżywki fakty tvn 24 bieszczady noclegi artykuły biurowe Choroba alkoholowa