# VideoError example syntax error

**URL:** <https://forum.kirupa.com/t/videoerror-example-syntax-error/264774>\
**Category:** Uncategorized\
**Created:** [June 30, 2008, 12:57pm UTC](https://forum.kirupa.com/t/videoerror-example-syntax-error/264774 "2008-06-30T12:57:30Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Johnnymac](https://avatars.discourse-cdn.com/v4/letter/j/e9c0ed/32.png) [@Johnnymac](https://forum.kirupa.com/u/Johnnymac)\
**Post date:** [June 30, 2008, 12:57pm UTC](https://forum.kirupa.com/t/videoerror-example-syntax-error/264774/1 "2008-06-30T12:57:30Z")

</div>

Hi.

Can someone help me out with this:

I took the following exapmle from the Adobe site, but when I run it I get the following error:

1084: Syntax error: expecting identifier before assign.

It says this is the offending line:

VideoPlayer.netStreamClientClass = null;

Code is as follows:

// Place the FLVPlayback component on the Stage at 0,0 and provide the instance name myflvPlayback.  
import fl.video.  
VideoPlayer.netStreamClientClass = null;  
try {  
myflvPlayback.play(‘test.flv’);  
} catch (e:VideoError) {  
if (e.code =VideoError.NETSTREAM\_CLIENT\_CLASS\_UNSET) {  
trace(‘I forced this error on purpose’);  
}  
}

Any help would be great… i’m a total newbie.

John

---

<div class="post-metadata">

**Author:** ![wvxvw](https://avatars.discourse-cdn.com/v4/letter/w/a9a28c/32.png) [@wvxvw](https://forum.kirupa.com/u/wvxvw)\
**Post date:** [July 1, 2008, 3:14pm UTC](https://forum.kirupa.com/t/videoerror-example-syntax-error/264774/2 "2008-07-01T15:14:38Z")

</div>

these two lines are incorrect:

```auto
import fl.video.
VideoPlayer.netStreamClientClass = null;

```

It should be:

```auto
import fl.video.*; // <- the problem was here actually
VideoPlayer.netStreamClientClass = null;

```

---

<div class="post-metadata">

**Author:** ![Johnnymac](https://avatars.discourse-cdn.com/v4/letter/j/e9c0ed/32.png) [@Johnnymac](https://forum.kirupa.com/u/Johnnymac)\
**Post date:** [July 1, 2008, 3:30pm UTC](https://forum.kirupa.com/t/videoerror-example-syntax-error/264774/3 "2008-07-01T15:30:13Z")

</div>

Thanks for your reply.

I made the change, but now it’s giving me the following error for this line:

if (e.code =VideoError.NETSTREAM\_CLIENT\_CLASS\_UNSET) {

1059: Property is read only.

---

<div class="post-metadata">

**Author:** ![Johnnymac](https://avatars.discourse-cdn.com/v4/letter/j/e9c0ed/32.png) [@Johnnymac](https://forum.kirupa.com/u/Johnnymac)\
**Post date:** [July 1, 2008, 3:33pm UTC](https://forum.kirupa.com/t/videoerror-example-syntax-error/264774/4 "2008-07-01T15:33:00Z")

</div>

Ahhhhhhh, it needed to be as follows:

if (e.code == VideoError.NETSTREAM\_CLIENT\_CLASS\_UNSET) {

Thanks again for your help!

John

---

<div class="post-metadata">

**Author:** ![wvxvw](https://avatars.discourse-cdn.com/v4/letter/w/a9a28c/32.png) [@wvxvw](https://forum.kirupa.com/u/wvxvw)\
**Post date:** [July 1, 2008, 6:13pm UTC](https://forum.kirupa.com/t/videoerror-example-syntax-error/264774/5 "2008-07-01T18:13:51Z")

</div>

you’re welcome 😉
