Skip to main content
Inspiring
May 2, 2006
Frage

Flash 8 video - what am I doing wrong?

  • May 2, 2006
  • 5 Antworten
  • 418 Ansichten
I have a Flash 8 FLVPlayback component on stage, with an instance name of
'vid'. In a frame script I have:

vid.setMedia("dd2.flv");
vid.play();

dd2.flv is in the same folder as the movie. I get an error saying it can't
make connection or find the flv on the server. If I set the component's
contentPath in the parameters to dd2.flv it plays fine... But I want to set
the media dynamically. What am I doing wrong here?

--
Dave -
Adobe Community Expert
www.blurredistinction.com
www.macromedia.com/support/forums/team_macromedia/


Dieses Thema wurde für Antworten geschlossen.

5 Antworten

Inspiring
May 3, 2006
>>So "dd2.flv is in the same folder as the movie" might not have meant a
>>thing.

Good point, thanks for the clarification. The little player I came up with
is here for testing:
http://test.beautyriot.com/BRTV/brtv.php


--
Dave -
Adobe Community Expert
www.blurredistinction.com
www.macromedia.com/support/forums/team_macromedia/


Inspiring
May 2, 2006
PS: One other cautionary point here, which evidently isn't the case this time. Remember the path to external files (including FLVs) is not relative to the swf, but relative to the html page or projector (if you are using those things). So "dd2.flv is in the same folder as the movie" might not have meant a thing.

Just a useful bit of tid for all y'all or anybody else who searches and finds this thread.
Inspiring
May 2, 2006
> I see where I went wrong - those are for the mediaPlayback
> component... and I've already decided to use a video object.
> I was just wanting to put a little test together, but this is better
> anyway.

Agreed. The footprint is about as small as it gets.


David
stiller (at) quip (dot) net
Dev essays: http://www.quip.net/blog/
"Luck is the residue of good design."


Inspiring
May 2, 2006
Thanks David. I see where I went wrong - those are for the mediaPlayback
component... and I've already decided to use a video object. I was just
wanting to put a little test together, but this is better anyway.

--
Dave -
Adobe Community Expert
www.blurredistinction.com
www.macromedia.com/support/forums/team_macromedia/


Inspiring
May 2, 2006
Dave,

> I have a Flash 8 FLVPlayback component on stage, with
> an instance name of 'vid'. In a frame script I have:
>
> vid.setMedia("dd2.flv");
> vid.play();

The FLVPlayback class does not feature a setMedia() method, that I can
see. According to the docs, FLVPlayback "wraps" mx.video.VideoPlayer. Not
sure if that means "inherits," but assuming for sake of argument that it
does, the VideoPlayer class does not faeture a setMedia() method, either.
Unfortunately, the docs get a bit cryptic at this point, IMO. The FLVPlayer
Component has a contentPath property, as you mentioned, but I don't see the
same property in either of the aforementioned classes.

Perhaps something in the inheritance chain provides for a
FLVPlayback.setContent property. I see references to a mx.video.NCManager
class, but can't seem to find that class reference anywhere.

If you can do without the FLVPlayer Component, you may just want to use
a Video object to load your external FLV.

http://www.quip.net/blog/2006/flash/how-to-load-external-video


David
stiller (at) quip (dot) net
Dev essays: http://www.quip.net/blog/
"Luck is the residue of good design."